增加新的功能

This commit is contained in:
2026-03-13 19:28:17 +08:00
parent 4aa6bb31ef
commit 8ce4017100
7 changed files with 58 additions and 29 deletions

Binary file not shown.

View File

@@ -48,7 +48,7 @@ namespace CommonEntity
public string subnet_mask { get; set; }
public string gateway { get; set; }
public string dns { get; set; }
public string version { get; set; }
public string app_version { get; set; }
/// <summary>
/// RCU 时间,年月日 那种
/// </summary>
@@ -68,8 +68,8 @@ namespace CommonEntity
/// <summary>
/// 授权时间
/// </summary>
public long authorization_time { get; set; }
public long authorization_days { get; set; }
public string authorization_time { get; set; }
public string authorization_days { get; set; }
public string room_num_remark { get; set; }
public string room_type_remark { get; set; }
public string room_remark { get; set; }

View File

@@ -263,7 +263,7 @@ namespace RCUHost.Implement
RegisterInfo rsg = new RegisterInfo()
{
ts_ms=Tools.GetUnixTime_MS(),
ts_ms = Tools.GetUnixTime_MS(),
hotel_id = hotel_code,
room_id = host.RoomNumber,
device_id = HostNumberOnly,
@@ -276,7 +276,7 @@ namespace RCUHost.Implement
subnet_mask = subnet_mask,
gateway = gateway,
dns = dns,
version = software_version,
app_version = software_version,
rcu_time = rcuTime,
launcher_version = launcher_version,
mac = mac,
@@ -285,8 +285,12 @@ namespace RCUHost.Implement
room_status = room_status_id,
season = hostRCU.Season,
sys_lock_status = hostRCU.LockStatus,
authorization_time = set_expiration_time,
authorization_days = expiration_time,
//hostRCU.ExpireTime = TimeHelper.ToDateTime(expiration_time);
// hostRCU.SetExpireTime = TimeHelper.ToDateTime(set_expiration_time)
//string ti = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
authorization_time = set_expiration_time.ToString(),
authorization_days = expiration_time.ToString(),
room_num_remark = roomnumber,
room_type_remark = roomtype,
room_remark = room_remark,

View File

@@ -2562,7 +2562,7 @@ namespace RCUHost.Implement
{
if (fanspeed == 2 || fanspeed == 3)
{
string KKKSpec = HostNNN + "_" + address;
string KKKSpec = HostNNN + "_" + address+"_"+HostID;
if (status == 1)
{
string ReportTime111 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
@@ -2593,6 +2593,18 @@ namespace RCUHost.Implement
{
string KKey = CacheKey.HostModalStatus_Prefix + "_" + HostID + "_" + address;
var HHostModalData = CSRedisCacheHelper.Get_Partition<HostModal_Cache>(KKey);
if (HHostModalData==null)
{
HHostModalData = new HostModal_Cache();
HHostModalData.HostID = int.Parse(HostID);
HHostModalData.ModalType = DeviceType.AirConditioner;
HHostModalData.AirConditionData = new AirConditionData();
HHostModalData.Modal = new RoomTypeModalCache()
{
ModalAddress = address
};
}
if (HHostModalData != null)
{
HHostModalData.AirConditionData.AirStatus = status;
@@ -2629,11 +2641,8 @@ namespace RCUHost.Implement
}
CSRedisCacheHelper.Set_Partition(KKey, HHostModalData);
}
}
}
}
#endregion
}

View File

@@ -126,14 +126,15 @@ namespace Service.Implement
device.MusicExecMode = status + (brightness << 12) + (mode << 8);//背景音乐执行方式和内容
//device.ColorTempExecMode = status + (brightness << 12) + (temperature << 8);//色温执行方式和内容
var t = new Tuple<Host, Device>(host, device);
System.Threading.Tasks.Task.Factory.StartNew((state) =>
{
var t1 = state as Tuple<Host, Device>;
var host1 = t1.Item1;
var device1 = t1.Item2;
DeviceControlReceiver.Send(host1, device1);//发送命令
}, t, System.Threading.CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
DeviceControlReceiver.Send(host, device);//发送命令
//var t = new Tuple<Host, Device>(host, device);
//System.Threading.Tasks.Task.Factory.StartNew((state) =>
//{
// var t1 = state as Tuple<Host, Device>;
// var host1 = t1.Item1;
// var device1 = t1.Item2;
// DeviceControlReceiver.Send(host1, device1);//发送命令
//}, t, System.Threading.CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
}

View File

@@ -6385,6 +6385,9 @@ namespace WebSite.Controllers
{
try
{
//Host hostua = new Host() { HostNumber = "096008126073", MAC = "" };
//HostModal hostModal1 = new HostModal() { Modal = new RoomTypeModal() { ModalAddress = "007001000", Type = DeviceType.AirConditioner } };
//HostModalManager.SetDevice(hostua, hostModal1, 0, 0, 25, 0, 1, 0);
var dic = CSRedisCacheHelper.HMGetAll(5, CacheKey.JiNan_TongPai_Spec);
foreach (var item in dic)
@@ -6398,9 +6401,20 @@ namespace WebSite.Controllers
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);
var hostnumber = h_a[0];
var address = h_a[1];
var hostid = h_a[2];
Host host = new Host() { HostNumber = hostnumber, MAC = "" };
HostModal hostModal = new HostModal() { Modal = new RoomTypeModal() { ModalAddress = address, Type = DeviceType.AirConditioner } };
string KKey = CacheKey.HostModalStatus_Prefix + "_" + hostid + "_" + address;
var HHostModalData = CSRedisCacheHelper.Get_Partition<HostModal_Cache>(KKey);
var temp = HHostModalData.AirConditionData.SettingTemp;
var mode = HHostModalData.AirConditionData.Mode;
HostModalManager.SetDevice(host, hostModal, 0, 0, temp, 0, mode, 0);
}
}
}
@@ -6408,6 +6422,7 @@ namespace WebSite.Controllers
}
catch (Exception ex)
{
logger.Error("同派出错:"+ex.Message);
return Json(new { IsSuccess = false, Message = HttpContext.InnerLanguage("SaveFailedBecause") + ex.Message });
}
}

View File

@@ -1576,6 +1576,13 @@ namespace WebSite.Controllers
bool wendu1 = KongTiaoControlName.Equals("IncrementTemperatureRequest") || KongTiaoControlName.Equals("IncrementTemperatureRequest") || KongTiaoControlName.Equals("SetTemperatureRequest");
bool fengsu1 = KongTiaoControlName.Equals("SetFanSpeedRequest") || KongTiaoControlName.Equals("IncrementFanSpeedRequest") || KongTiaoControlName.Equals("DecrementFanSpeedRequest");
bool moshi1 = KongTiaoControlName.Equals("SetModeRequest");
string tiaowen = request.header.name;
if (tiaowen.Equals("IncrementTemperatureRequest") || tiaowen.Equals("DecrementTemperatureRequest"))
{
HostModalManager.SetDevice(host, hostModal, 1, 0, temperature, 0, 0, 0);
Thread.Sleep(50);
}
//特殊酒店
if (AssertFault(hotel_code))
{
@@ -1626,13 +1633,6 @@ namespace WebSite.Controllers
}
else
{
string tiaowen = request.header.name;
if (tiaowen.Equals("IncrementTemperatureRequest") || tiaowen.Equals("DecrementTemperatureRequest"))
{
HostModalManager.SetDevice(host, hostModal, 1, 0);
Thread.Sleep(50);
}
//对房间设备进行操作
HostModalManager.SetDevice(host, hostModal, status, brightness, temperature, fanSpeed, mode, valve);
}