增加日志推送,增加房态变化的时候 断电功能

This commit is contained in:
2026-02-03 08:53:47 +08:00
parent e4610f1ffa
commit 1d77141ffe
21 changed files with 229 additions and 26 deletions

View File

@@ -47,6 +47,7 @@ namespace WebSite
private IRoomStatusManager RoomStatusManager;
private IDeviceControlReceiver DeviceControlReceiver;
private IOverviewManager OverviewManager { get; set; }
public IHostModalManager HostModalManager { get; set; }
public static IHostServer hostServer { get; set; }
//private IGroupManager GroupManager;
@@ -521,6 +522,7 @@ namespace WebSite
RoomStatusManager = (IRoomStatusManager)cxt.GetObject("Manager.RoomStatus");
DeviceControlReceiver = (IDeviceControlReceiver)cxt.GetObject("RCUHost.DeviceControlReceiver");
OverviewManager = (IOverviewManager)cxt.GetObject("Manager.Overview");
HostModalManager = (IHostModalManager)cxt.GetObject("Manager.HostModal");
_client = new syncstatus.syncstatusSoapClient();
Timer timer2 = new Timer(20000);//每20秒扫描一次
@@ -735,6 +737,19 @@ namespace WebSite
Host host = HostManager.GetByRoomNumber(T1.Item2, T1.Item1);
if (host != null)
{
int status_id2 = host.SysHotel.SwitchRoomStatus_PowerOff2;
int status_id4 = host.SysHotel.SwitchRoomStatus_PowerOff4;
int status_id8 = host.SysHotel.SwitchRoomStatus_PowerOff8;
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)
{
HostModal h1 = new HostModal();
h1.Modal = new RoomTypeModal() { ModalAddress = "004000001", Type = DeviceType.ServiceInfo };
HostModalManager.SetDevice(host, h1, 2, 0, 25, 0, 0, 0);
}
}
HostManager.ChangeRoomStatus(host, T1.Item3);
string Key = CacheKey.SyncRoomStatus + "_" + host.HostNumber;
RoomStatusRequest ddd = new RoomStatusRequest();