给宝镜增加新的功能字段, PMS系统数据格式 更新

给宝镜推送 新功能,增加  RCU离 在线的功能
This commit is contained in:
2026-01-12 15:37:04 +08:00
parent 910c13953e
commit a4b847ed80
10 changed files with 185 additions and 43 deletions

View File

@@ -7238,6 +7238,11 @@ namespace WebSite.Controllers
//艺龙酒店(绥化北林万达广场店)
{"1668326697184","1213"}
};
public class GGG
{
public string DeviceName { get; set; }
public string Address { get; set; }
}
[HttpPost()]
public ActionResult ETV_Controller()
@@ -7313,7 +7318,7 @@ namespace WebSite.Controllers
IOTMonitorData i = new IOTMonitorData();
i.RemoteIP = IP;
i.Step = 0;
string ti =DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff");
string ti = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff");
i.CreateTime = DateTime.Now;
i.TriggerTime = ti;
i.HotelId = hotelid;
@@ -7417,6 +7422,8 @@ namespace WebSite.Controllers
HttpContext.Cache.Insert(Hkey, hostModals, null, DateTime.Now.AddMinutes(30), Cache.NoSlidingExpiration);
}
}
List<GGG> lla = new List<GGG>();
// hostmodal只需要 address 和type
// device.Address = hostModal.Modal.ModalAddress;
// device.Type = hostModal.Modal.Type
@@ -7433,7 +7440,7 @@ namespace WebSite.Controllers
}
else
{
q1 = hostModals.Where(A => A.Modal.Name.Equals(name)||A.Modal.AliasName.Equals(name)).ToList();
q1 = hostModals.Where(A => A.Modal.Name.Equals(name) || A.Modal.AliasName.Equals(name)).ToList();
}
if (q1 != null && q1.Count > 0)
{
@@ -7452,6 +7459,9 @@ namespace WebSite.Controllers
brightness = 0;
}
Thread.Sleep(50);
GGG vva = new GGG() { DeviceName = item_inter.Modal.Name, Address = item_inter.Modal.ModalAddress };
lla.Add(vva);
HostModalManager.SetDevice(host, item_inter, status, brightness);
}
}
@@ -7570,7 +7580,8 @@ namespace WebSite.Controllers
i.RoomNumber = roomNo;
i.RequestId = msgid;
i.Platform = "ETV";
i.CommandDescription = "success";
i.CommandDescription = "success: 控制设备"+JsonConvert.SerializeObject(lla);
SendMQTTData.Send(i);
}
return Json(new { code = 200, msg = "控制成功" }, JsonRequestBehavior.AllowGet);