济南同派增加 高中风换成自动档的功能
This commit is contained in:
@@ -1260,7 +1260,7 @@ namespace RCUHost.Implement
|
||||
byte cmdType = context111.SystemHeader.Value.CmdType;
|
||||
if (cmdType == 0x68)
|
||||
{
|
||||
logger.Error("收到升级返回:" + Tools.ByteToString(gga.Data));
|
||||
//logger.Error("收到升级返回:" + Tools.ByteToString(gga.Data));
|
||||
}
|
||||
ushort MyFrameNO = context111.SystemHeader.Value.FrameNo;
|
||||
|
||||
@@ -1282,7 +1282,7 @@ namespace RCUHost.Implement
|
||||
k.device_id = HostNNN;
|
||||
k.room_id = RoomNUMBER;
|
||||
k.ts_ms = Tools.GetUnixTime_MS();
|
||||
k.current_time = CPUData.GetNowPrecise().ToString("yyyy-MM-dd HH:mm:ss.ffffff") ;
|
||||
k.current_time = CPUData.GetNowPrecise().ToString("yyyy-MM-dd HH:mm:ss.ffffff");
|
||||
CSRedisCacheHelper.Publish("redis-heartbeat", Newtonsoft.Json.JsonConvert.SerializeObject(k));
|
||||
}
|
||||
}
|
||||
@@ -1322,7 +1322,11 @@ namespace RCUHost.Implement
|
||||
{
|
||||
CSRedisCacheHelper.Publish("redis-on_off_line", n);
|
||||
}
|
||||
//6号分区 做离在线数据
|
||||
//但是离线的时候,只能得到Key值
|
||||
CSRedisCacheHelper.Set_PartitionWithTime(EndPointStr, n, 5, 6);
|
||||
|
||||
//所以4号分区再存储一下 详细信息
|
||||
CSRedisCacheHelper.Set_PartitionWithTime(EndPointStr, n, 20, 4);
|
||||
|
||||
|
||||
@@ -1767,6 +1771,7 @@ namespace RCUHost.Implement
|
||||
byte[] framenolist = ts.Item4;
|
||||
byte cmdType = ts.Item5;
|
||||
string EndPoint = ts.Item6;
|
||||
#region 主机重启
|
||||
if (cmdType == 0x33)
|
||||
{
|
||||
|
||||
@@ -1805,6 +1810,8 @@ namespace RCUHost.Implement
|
||||
string mns1 = Newtonsoft.Json.JsonConvert.SerializeObject(ns);
|
||||
CSRedisCacheHelper.Publish("redis-rcu-restart", mns1);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 取电
|
||||
if (cmdType == 0x35)
|
||||
{
|
||||
@@ -1923,7 +1930,6 @@ namespace RCUHost.Implement
|
||||
//P26~P29:通道能耗,单位:Wh(1度电 = 1KWh)
|
||||
//P30~P33:通道总能耗,单位:Wh(1度电 = 1KWh)
|
||||
|
||||
|
||||
#region 定时上报
|
||||
if (cmdType == 0x36)
|
||||
{
|
||||
@@ -2549,6 +2555,27 @@ namespace RCUHost.Implement
|
||||
int temperature = 0;//设定温度
|
||||
int currentTemp = 0;//当前温度(室内温度)
|
||||
KongTiaoReport(StatusReceiver, out status, out temperature, out mode, out fanspeed, out currentTemp);
|
||||
if (hotelCode.Equals("2144"))
|
||||
{
|
||||
if (fanspeed == 2 || fanspeed == 3)
|
||||
{
|
||||
string KKKSpec = HostNNN + "_" + address;
|
||||
if (status == 1)
|
||||
{
|
||||
string ReportTime111 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
//JiNamTongPaiTeShu j111 = new JiNamTongPaiTeShu();
|
||||
//j111.HostNumber = HostNNN;
|
||||
//j111.Address = address;
|
||||
//j111.CurrentTime = ReportTime111;
|
||||
|
||||
CSRedisCacheHelper.HMSet(5, CacheKey.JiNan_TongPai_Spec, KKKSpec, ReportTime111);
|
||||
}
|
||||
if (status == 0)
|
||||
{
|
||||
CSRedisCacheHelper.HDel(5, CacheKey.JiNan_TongPai_Spec, KKKSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
KongTiao kkk = new KongTiao();
|
||||
kkk.state = status;
|
||||
@@ -2686,7 +2713,7 @@ namespace RCUHost.Implement
|
||||
}
|
||||
#endregion
|
||||
|
||||
//向服务器获取房态
|
||||
#region 向服务器获取房态
|
||||
if (cmdType == 0x32)
|
||||
{
|
||||
try
|
||||
@@ -2714,8 +2741,16 @@ namespace RCUHost.Implement
|
||||
logger.Error("CmdType Error" + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}, Tuple);
|
||||
}
|
||||
public struct JiNamTongPaiTeShu
|
||||
{
|
||||
public string HostNumber { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string CurrentTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 空调上报解析
|
||||
|
||||
Reference in New Issue
Block a user