修改一些小问题,增加一些监控日志
增加 TCL 多个 电视 也能 息屏的功能
This commit is contained in:
Binary file not shown.
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -174,6 +174,6 @@ namespace Dao
|
||||
/// <param name="host"></param>
|
||||
/// <param name="model"></param>
|
||||
/// <param name="launcher"></param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ namespace Dao.Implement
|
||||
/// <param name="host"></param>
|
||||
/// <param name="model"></param>
|
||||
/// <param name="launcher"></param>
|
||||
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();
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user