修改一些小问题,增加一些监控日志

增加 TCL 多个 电视 也能 息屏的功能
This commit is contained in:
2026-03-09 10:38:05 +08:00
parent a74d6cbe44
commit ed386b0eaf
8 changed files with 71 additions and 30 deletions

View File

@@ -182,7 +182,7 @@ namespace RCUHost.Implement
hostRCU.HotelCode = hotel_code.ToString();
hostRCU.HostID = host_id;
hostRCU.RoomTypeID = roomtype_id;
hostRCU.ConfigVersion = setting_version.Substring(0, 5);
hostRCU.ConfigVersion = setting_version.Substring(0, 6);
var TTT = new Tuple<Host, string>(host, hostRCU.ConfigVersion);
Task.Factory.StartNew((State) =>
@@ -261,7 +261,7 @@ namespace RCUHost.Implement
hostRCU.RoomTypeRemark = roomtype_remark;
hostRCU.UpdateTime = DateTime.Now;
HostRepository.SetModelAndLauncher(host, lan_ip, lan_port, model, launcher_version, hostRCU.ExpireTime, hostRCU.SetExpireTime);
HostRepository.SetModelAndLauncher(host, hostRCU.ConfigVersion, software_version, lan_ip, lan_port, model, launcher_version, hostRCU.ExpireTime, hostRCU.SetExpireTime);
HostRCURepository.SaveOrUpdate(hostRCU);

View File

@@ -604,22 +604,23 @@ namespace RCUHost.Implement
if (VVV.CmdType == 0x01)
{
//后面出问题了,这个功能先不用
//升级之后,会上报注册指令,不能被跳过
string Key = "Upgrade_UpdateSQL_" + hostnumber1;
object OOO1 = MemoryCacheHelper.Get(Key);
if (OOO1 == null)
{
//string RegisterKey2 = "SearchHostFilter";
//string Key = "Upgrade_UpdateSQL_" + hostnumber1;
//object OOO1 = MemoryCacheHelper.Get(Key);
//if (OOO1 == null)
//{
//string RegisterKey2 = "SearchHostFilter";
//上报注册指令太快会被拦截
//string KKK = "RegisterKey_" + hostnumber1;
//object OOO = MemoryCacheHelper.Get(KKK);
//if (OOO != null)
//{
// RCUHost.RCUHostCommon.tools.LanJieData(RegisterKey2, hotelCode);
// return;
//}
}
//上报注册指令太快会被拦截
//string KKK = "RegisterKey_" + hostnumber1;
//object OOO = MemoryCacheHelper.Get(KKK);
//if (OOO != null)
//{
// RCUHost.RCUHostCommon.tools.LanJieData(RegisterKey2, hotelCode);
// return;
//}
//}
}
@@ -2170,10 +2171,12 @@ namespace RCUHost.Implement
if (aaa == 01)
{
= true;
_Int = 1;
}
else if (aaa == 02)
{
= false;
_Int = 2;
}
}
else
@@ -2339,6 +2342,10 @@ namespace RCUHost.Implement
var LiangDu = reader.ReadBytes(4);
Bright_Va = (int)LiangDu[0];
}
if (Bright_Va == -1 || Bright_Va == 0)
{
Bright_Va = 100;
}
var CarbonVIP_NoFilter = CarbonVIP;
byte[] carbon_enum = new byte[] { 0x01, 0x02 };
@@ -2351,10 +2358,12 @@ namespace RCUHost.Implement
if (!string.IsNullOrEmpty(HostID))
{
string KKey = CacheKey.HostModalStatus_Prefix + "_" + HostID + "_" + "054000001";
//var OldHostModal = CSRedisCacheHelper.Get_Partition<HostModal_Cache>(KKey);
//OldHostModal.Status = CarbonVIP;
//CSRedisCacheHelper.Set_Partition<HostModal_Cache>(KKey,OldHostModal);
var OldHostModal = CSRedisCacheHelper.Get_Partition<HostModal_Cache>(KKey);
if (OldHostModal != null)
{
OldHostModal.Status = CarbonVIP;
CSRedisCacheHelper.Set_Partition<HostModal_Cache>(KKey, OldHostModal);
}
StringBuilder sb = new StringBuilder();

View File

@@ -556,7 +556,20 @@ namespace RCUHost.Implement
//004000022
if (device.Value.Address.Equals("004000022"))
{
TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "SLEEP");
if (TCLcuid.Contains(","))
{
string[] cid = TCLcuid.Split(',');
foreach (string ccc111 in cid)
{
TCLCommon.SendData(hotelcode, roomnum, ccc111, skillid, "SLEEP");
//不加这一行调用不成功应该是TCL那边的接口有限制
Thread.Sleep(500);
}
}
else
{
TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "SLEEP");
}
}
//if (hostModal.Modal.Name.Equals("睡眠息屏"))
//{
@@ -565,7 +578,18 @@ namespace RCUHost.Implement
//呼叫前台
if (hostModal.Modal != null && hostModal.Modal.ModalAddress.Equals("004000023"))
{
TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "SIP");
if (TCLcuid.Contains(","))
{
string[] cid = TCLcuid.Split(',');
foreach (string item in cid)
{
TCLCommon.SendData(hotelcode, roomnum, item, skillid, "SIP");
}
}
else
{
TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "SIP");
}
}
//if (hotelcode.Equals("1085"))
@@ -582,10 +606,10 @@ namespace RCUHost.Implement
Dictionary<string, string> ddd = new Dictionary<string, string>();
if (!string.IsNullOrEmpty(ebell_rtsp))
{
ddd.Add("url",ebell_rtsp);
ddd.Add("url", ebell_rtsp);
}
TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "DOORBELL",0,ddd);
TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "DOORBELL", 0, ddd);
}
}