增加一些功能,比如 修正重启后,队列消费会报错的问题

This commit is contained in:
2026-04-02 15:16:13 +08:00
parent 182186e1fb
commit c13ab0cb56
25 changed files with 589 additions and 176 deletions

View File

@@ -47,9 +47,10 @@ namespace WebSite
private IRoomStatusManager RoomStatusManager;
private IDeviceControlReceiver DeviceControlReceiver;
private IOverviewManager OverviewManager { get; set; }
public IHostModalManager HostModalManager { get; set; }
private IHostModalManager HostModalManager { get; set; }
public static IHostServer hostServer { get; set; }
public IRoomTypeModalManager RoomTypeModalManager { get; set; }
//private IGroupManager GroupManager;
//private IHostRoomCardManager HostRoomCardManager;
private syncstatus.syncstatusSoapClient _client = null;//房态同步接口
@@ -95,6 +96,8 @@ namespace WebSite
}
protected override void Application_Start(object sender, EventArgs e)
{
//CSRedisCacheHelper.redis1.Del(UDPAllDataKey);
//CSRedisCacheHelper.redis1.XGroupCreate(UDPAllDataKey, "UDPData", "0", true);
logger.Error("Web重启了");
// 在应用程序启动时调用
PreHot();
@@ -122,10 +125,9 @@ namespace WebSite
}
catch { }
};
SetInitAccount();
StartHostServer();
//StartHostServerNew();
BLWMQTT.StartMqtt();
//if ("1" == send_to_debugger)
//{
// UDPLogServer.Init();
@@ -137,6 +139,10 @@ namespace WebSite
}
//HeartBeat();
QuanJuVar.BaoJingUpLoad = RoomTypeModalManager.LoadAllBaoJingUpload();
StartHostServer();
BLWMQTT.StartMqtt();
long ll1 = CSRedisCacheHelper.ForeverGet<long>(UDPLostKey);
@@ -519,6 +525,7 @@ namespace WebSite
DeviceControlReceiver = (IDeviceControlReceiver)cxt.GetObject("RCUHost.DeviceControlReceiver");
OverviewManager = (IOverviewManager)cxt.GetObject("Manager.Overview");
HostModalManager = (IHostModalManager)cxt.GetObject("Manager.HostModal");
RoomTypeModalManager = (IRoomTypeModalManager)cxt.GetObject("Manager.RoomTypeModal");
_client = new syncstatus.syncstatusSoapClient();
Timer timer2 = new Timer(20000);//每20秒扫描一次
@@ -739,7 +746,7 @@ namespace WebSite
int status_id16 = host.SysHotel.SwitchRoomStatus_PowerOff16;
if (status_id2 != 0 || status_id4 != 0 || status_id8 != 0 || status_id16 != 0)
{
if (status_id2 == roomStatus.ID||status_id4==roomStatus.ID||status_id8==roomStatus.ID||status_id16==roomStatus.ID)
if (status_id2 == roomStatus.ID || status_id4 == roomStatus.ID || status_id8 == roomStatus.ID || status_id16 == roomStatus.ID)
{
HostModal h1 = new HostModal();
h1.Modal = new RoomTypeModal() { ModalAddress = "004000001", Type = DeviceType.ServiceInfo };