diff --git a/CRICS_V3_1124.suo b/CRICS_V3_1124.suo
index 913694f..8ef3c2a 100644
Binary files a/CRICS_V3_1124.suo and b/CRICS_V3_1124.suo differ
diff --git a/CommonEntity/CacheKey.cs b/CommonEntity/CacheKey.cs
index 57f2eda..7bd5d48 100644
--- a/CommonEntity/CacheKey.cs
+++ b/CommonEntity/CacheKey.cs
@@ -128,6 +128,10 @@ namespace CommonEntity
public static string FaultKey_ = "FaultKey_";
public static string ServerStartTime = "ServerStartTime";
+ ///
+ /// 济南同派 特殊处理
+ ///
+ public static string JiNan_TongPai_Spec = "jntp_spec";
}
public class ChangLiangValue
{
diff --git a/RCUHost/Implement/HostServer.cs b/RCUHost/Implement/HostServer.cs
index cbfbace..f8a962c 100644
--- a/RCUHost/Implement/HostServer.cs
+++ b/RCUHost/Implement/HostServer.cs
@@ -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; }
+ }
///
/// 空调上报解析
diff --git a/WebSite/Controllers/ApiController.cs b/WebSite/Controllers/ApiController.cs
index dd23829..b78be13 100644
--- a/WebSite/Controllers/ApiController.cs
+++ b/WebSite/Controllers/ApiController.cs
@@ -6306,7 +6306,7 @@ namespace WebSite.Controllers
var uuu = JsonConvert.DeserializeObject(jsonData);
int roomtypeid = uuu.roomtype_id;
var lll = uuu.CarbonVIPList;
- var rlist = RoomTypeModalManager.LoadAll(roomtypeid, 1);
+ var rlist = RoomTypeModalManager.LoadAll(roomtypeid, 0);
foreach (var item in lll)
{
var add = item.ModalAddress;
@@ -6380,6 +6380,38 @@ namespace WebSite.Controllers
public bool IsUploadBaoJing { get; set; }
}
+ [HttpPost()]
+ public ActionResult JiNanTongPai_Spec()
+ {
+ try
+ {
+
+ var dic = CSRedisCacheHelper.HMGetAll(5, CacheKey.JiNan_TongPai_Spec);
+ foreach (var item in dic)
+ {
+ var k = item.Key;
+ var v = item.Value;
+ DateTime ti = DateTime.Parse(v);
+ if (k.Contains("_"))
+ {
+ var span = DateTime.Now - ti;
+ if (span.TotalSeconds >= 60 && span.TotalMinutes <= 75)
+ {
+ string[] h_a = k.Split('_');
+ Host host = new Host() { HostNumber = h_a[0], MAC = "" };
+ HostModal hostModal = new HostModal() { Modal = new RoomTypeModal() { ModalAddress = h_a[1], Type = DeviceType.AirConditioner } };
+ HostModalManager.SetDevice(host, hostModal, 0, 0, 0, 0);
+ }
+ }
+ }
+ return Json(new { IsSuccess = true, Message = HttpContext.InnerLanguage("SaveSuccess") });
+ }
+ catch (Exception ex)
+ {
+ return Json(new { IsSuccess = false, Message = HttpContext.InnerLanguage("SaveFailedBecause") + ex.Message });
+ }
+ }
+
[HttpGet()]
public ActionResult GetAllModelName()
{
diff --git a/WebSite/Controllers/IoTController.cs b/WebSite/Controllers/IoTController.cs
index 1eaa19b..3c4a29f 100644
--- a/WebSite/Controllers/IoTController.cs
+++ b/WebSite/Controllers/IoTController.cs
@@ -1628,7 +1628,7 @@ namespace WebSite.Controllers
{
string tiaowen = request.header.name;
- if (tiaowen.Equals("IncrementTemperatureRequest") || tiaowen.Equals("IncrementTemperatureRequest"))
+ if (tiaowen.Equals("IncrementTemperatureRequest") || tiaowen.Equals("DecrementTemperatureRequest"))
{
HostModalManager.SetDevice(host, hostModal, 1, 0);
Thread.Sleep(50);