修改一些BUG

修改碳达人问题,增加小数,增加门锁的支持
This commit is contained in:
2026-03-03 17:18:43 +08:00
parent 10e3a135dd
commit 990ba9ce7b
8 changed files with 171 additions and 22 deletions

View File

@@ -73,6 +73,7 @@
<Compile Include="KongQi.cs" />
<Compile Include="LieECOTaskExtra.cs" />
<Compile Include="LingChenECO.cs" />
<Compile Include="LMRegisterInfo.cs" />
<Compile Include="LogRecorrd.cs" />
<Compile Include="LostData.cs" />
<Compile Include="MissionRequestData.cs" />

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CommonEntity
{
public class LMRegisterInfo
{
// 基础信息
public string HotelCode { get; set; }
public string RoomNumber { get; set; }
public string HostNumber { get; set; }
public string MAC { get; set; }
// 网络信息
public string EndPoint { get; set; }
public byte[] Original_Data { get; set; }
public string CurrentDateTime { get; set; }
public long UnixTime { get; set; }
//public string ConfigVersion { get; set; }
//public string SubnetMask { get; set; }
//public string Gateway { get; set; }
//public string DNS { get; set; }
}
}

View File

@@ -21,6 +21,17 @@ namespace CommonEntity
public long deadline { get; set; }
public string refresh_token { get; set; }
}
public class TCLBell
{
public string cuid { get; set; }
public string sceneCode { get; set; }
public string botId { get; set; }
public PPP @params { get; set; }
}
public class PPP
{
public string url { get; set; }
}
public class TCLCommon
{
@@ -59,7 +70,7 @@ namespace CommonEntity
/// <param name="skillid"></param>
/// <param name="sceneCode"></param>
/// <param name="count"></param>
public static void SendData(string hotelcode, string roomnum, string CUID, string skillid, string sceneCode, int count = 0,Dictionary<string,string> extra_params=null)
public static void SendData(string hotelcode, string roomnum, string CUID, string skillid, string sceneCode, int count = 0, Dictionary<string, string> extra_params = null)
{
try
{
@@ -77,7 +88,7 @@ namespace CommonEntity
dic1.Add("cuid", roomnum);
dic1.Add("sceneCode", sceneCode);
dic1.Add("botId", skillid);
dic1.Add("params",Newtonsoft.Json.JsonConvert.SerializeObject(extra_params));
dic1.Add("params", Newtonsoft.Json.JsonConvert.SerializeObject(extra_params));
logger.Error("TCL send data");
@@ -108,12 +119,22 @@ namespace CommonEntity
request1.AddHeader("Authorization", "Bearer " + T.data.access_token);
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("cuid", CUID);
dic.Add("sceneCode", sceneCode);
dic.Add("botId", skillid);
//Dictionary<string, string> dic = new Dictionary<string, string>();
//dic.Add("cuid", CUID);
//dic.Add("sceneCode", sceneCode);
//dic.Add("botId", skillid);
//dic.Add("params", Newtonsoft.Json.JsonConvert.SerializeObject(extra_params));
request1.AddJsonBody(dic);
TCLBell tsa = new TCLBell();
tsa.cuid = CUID;
tsa.sceneCode = sceneCode;
tsa.botId = skillid;
if (extra_params != null && extra_params.Count > 0)
{
tsa.@params = new PPP() { url = extra_params["url"] };
}
request1.AddJsonBody(tsa);
var QQQ = client1.Execute(request1);
string ddd = QQQ.Content;