给选住增加 设备变化 推送接口

This commit is contained in:
2026-01-05 11:11:53 +08:00
parent 7be877418c
commit 599251d91b
7 changed files with 174 additions and 8 deletions

View File

@@ -6741,7 +6741,18 @@ namespace WebSite.Controllers
i.CommandDescription = sss;
SendMQTTData.Send(i);
}
var hostModal = HostModalManager.GetByModalAddress(host.ID, modalAddress);//设备控制
string MKey = "XiaoDuAddress_" + host.ID + "_" + modalAddress;
var ddd = HttpContext.Cache.Get(MKey);
HostModal hostModal = null;
if (ddd != null)
{
hostModal = ddd as HostModal;
}
else
{
hostModal = HostModalManager.GetByModalAddress(host.ID, modalAddress);//设备控制
HttpContext.Cache.Insert(MKey,hostModal,null,DateTime.Now.AddMinutes(30),Cache.NoSlidingExpiration);
}
if (hostModal == null)
{
logger.Error(string.Format("{3}(酒店:{0},房号:{1})未找到对应的回路Address{2}", host.SysHotel.Code + host.SysHotel.Name, host.RoomNumber, modalAddress, platformName));