济南同派增加 高中风换成自动档的功能

This commit is contained in:
2026-03-12 13:37:00 +08:00
parent 426d99959c
commit 0f5621a418
5 changed files with 77 additions and 6 deletions

Binary file not shown.

View File

@@ -128,6 +128,10 @@ namespace CommonEntity
public static string FaultKey_ = "FaultKey_";
public static string ServerStartTime = "ServerStartTime";
/// <summary>
/// 济南同派 特殊处理
/// </summary>
public static string JiNan_TongPai_Spec = "jntp_spec";
}
public class ChangLiangValue
{

View File

@@ -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通道能耗单位Wh1度电 = 1KWh
//P30~P33通道总能耗单位Wh1度电 = 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>
/// 空调上报解析

View File

@@ -6306,7 +6306,7 @@ namespace WebSite.Controllers
var uuu = JsonConvert.DeserializeObject<tandaren_upload>(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()
{

View File

@@ -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);