diff --git a/CRICS_V3_1124.suo b/CRICS_V3_1124.suo
index 159b91e..c552fa1 100644
Binary files a/CRICS_V3_1124.suo and b/CRICS_V3_1124.suo differ
diff --git a/CommonEntity/TCLToken.cs b/CommonEntity/TCLToken.cs
index bc10a32..71e0fd2 100644
--- a/CommonEntity/TCLToken.cs
+++ b/CommonEntity/TCLToken.cs
@@ -134,6 +134,7 @@ namespace CommonEntity
tsa.@params = new PPP() { url = extra_params["url"] };
}
+ logger.Error("TCL send data" + Newtonsoft.Json.JsonConvert.SerializeObject(tsa));
request1.AddJsonBody(tsa);
var QQQ = client1.Execute(request1);
string ddd = QQQ.Content;
diff --git a/ConsoleApplication2/Program.cs b/ConsoleApplication2/Program.cs
index d8c0d5a..aa30911 100644
--- a/ConsoleApplication2/Program.cs
+++ b/ConsoleApplication2/Program.cs
@@ -301,6 +301,8 @@ namespace ConsoleApplication2
}
static void Main(string[] args)
{
+ byte[] ss111= Base64Url.Decode("qlUuAFQzU0E01oL4CIZhAQIABgAgAAAAAAAA/wICBwEAAAIbKgcCAAACGyp4Ig==");
+ var vv1= Tools.ByteToString(ss111);
#if AAA
Console.WriteLine("aaaaaaaaaaaaa");
#endif
diff --git a/Dao/IHostRepository.cs b/Dao/IHostRepository.cs
index 6f340a1..4375b9a 100644
--- a/Dao/IHostRepository.cs
+++ b/Dao/IHostRepository.cs
@@ -174,6 +174,6 @@ namespace Dao
///
///
///
- void SetModelAndLauncher(Host host, string lanIP, int lanPort, string model, string launcher, DateTime expireTime, DateTime setExpireTime);
+ void SetModelAndLauncher(Host host,string ConfigVersion,string software_version, string lanIP, int lanPort, string model, string launcher, DateTime expireTime, DateTime setExpireTime);
}
}
diff --git a/Dao/Implement/HostRepository.cs b/Dao/Implement/HostRepository.cs
index 602bc17..7e213bf 100644
--- a/Dao/Implement/HostRepository.cs
+++ b/Dao/Implement/HostRepository.cs
@@ -637,7 +637,7 @@ namespace Dao.Implement
///
///
///
- public void SetModelAndLauncher(Host host, string lanIP, int lanPort, string model, string launcher, DateTime expireTime, DateTime setExpireTime)
+ public void SetModelAndLauncher(Host host,string ConfigVersion,string Version, string lanIP, int lanPort, string model, string launcher, DateTime expireTime, DateTime setExpireTime)
{
string HostNumberOnly = host.HostNumber;
Host host_take = null;
@@ -659,7 +659,7 @@ namespace Dao.Implement
host_take.SubnetMask = host.SubnetMask;
host_take.Gateway = host.Gateway;
host_take.DNS = host.DNS;
- host_take.Version = host.Version;
+ host_take.Version =Version;
host_take.RunTime = host.RunTime;
host_take.LauncherVersion = host.LauncherVersion;
host_take.MAC = host.MAC;
@@ -670,12 +670,15 @@ namespace Dao.Implement
host_take.Season = host.Season;
host_take.RoomNumber = host.RoomNumber;
- host_take.Model = host.Model;
+ //host_take.Model = host.Model;
+ host_take.Model = model;
+ host_take.LauncherVersion = launcher;
+ host_take.ConfigVersion = ConfigVersion;
host_take.UpgradeTime = host.UpgradeTime;
#endregion
}
- string sql = "UPDATE tb_Hosts SET LanIP=?,LanPort=?,Model=?,LauncherVersion=?,ExpireTime=?,SetExpireTime=? WHERE ID=?";
+ string sql = "UPDATE tb_Hosts SET LanIP=?,LanPort=?,Model=?,LauncherVersion=?,ExpireTime=?,SetExpireTime=?,ConfigVersion=?,Version=? WHERE ID=?";
IQuery query = Session.CreateSQLQuery(sql);
query.SetString(0, lanIP);
query.SetInt32(1, lanPort);
@@ -683,7 +686,9 @@ namespace Dao.Implement
query.SetString(3, launcher);
query.SetDateTime(4, expireTime);
query.SetDateTime(5, setExpireTime);
- query.SetInt32(6, host.ID);
+ query.SetString(6, ConfigVersion);
+ query.SetString(7, Version);
+ query.SetInt32(8, host.ID);
query.ExecuteUpdate();
}
///
diff --git a/RCUHost/Implement/HostRegisterReceiver.cs b/RCUHost/Implement/HostRegisterReceiver.cs
index 0706a3e..9af0f20 100644
--- a/RCUHost/Implement/HostRegisterReceiver.cs
+++ b/RCUHost/Implement/HostRegisterReceiver.cs
@@ -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, 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);
diff --git a/RCUHost/Implement/HostServer.cs b/RCUHost/Implement/HostServer.cs
index 9b25380..251823b 100644
--- a/RCUHost/Implement/HostServer.cs
+++ b/RCUHost/Implement/HostServer.cs
@@ -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(KKey);
- //OldHostModal.Status = CarbonVIP;
-
- //CSRedisCacheHelper.Set_Partition(KKey,OldHostModal);
+ var OldHostModal = CSRedisCacheHelper.Get_Partition(KKey);
+ if (OldHostModal != null)
+ {
+ OldHostModal.Status = CarbonVIP;
+ CSRedisCacheHelper.Set_Partition(KKey, OldHostModal);
+ }
StringBuilder sb = new StringBuilder();
diff --git a/RCUHost/Implement/New_RoomStatusReceiver.cs b/RCUHost/Implement/New_RoomStatusReceiver.cs
index 6821c8e..28ca251 100644
--- a/RCUHost/Implement/New_RoomStatusReceiver.cs
+++ b/RCUHost/Implement/New_RoomStatusReceiver.cs
@@ -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 ddd = new Dictionary();
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);
}
}