增加几个功能
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BLWLogProduce\BLWLogProduce.csproj" />
|
||||
<ProjectReference Include="..\CommonEntity\CommonEntity.csproj" />
|
||||
<ProjectReference Include="..\CommonTools\CommonTools.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -11,12 +11,110 @@ namespace ConsoleApp2
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void tsa(string body)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
NengHao? poo = System.Text.Json.JsonSerializer.Deserialize<NengHao>(body);
|
||||
|
||||
if (string.IsNullOrEmpty(poo.HostNumber))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (poo.NengHaoList == null || poo.NengHaoList.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#region 宝镜系统使用的能耗数据结构
|
||||
List<DeviceData> la = new List<DeviceData>();
|
||||
foreach (var item in poo.AllDeviceData)
|
||||
{
|
||||
DeviceData dd = new DeviceData();
|
||||
dd.HostID = item.HostID;
|
||||
dd.DeviceType = item.DeviceType;
|
||||
dd.Address = item.Address;
|
||||
dd.Brightness = item.Brightness;
|
||||
dd.Status = item.Status;
|
||||
dd.CurrentTemp = item.CurrentTemp;
|
||||
dd.SettingTemp = item.SettingTemp;
|
||||
dd.Mode = item.Mode;
|
||||
dd.FanSpeed = item.FanSpeed;
|
||||
dd.Valve = item.Valve;
|
||||
la.Add(dd);
|
||||
}
|
||||
|
||||
|
||||
List<SinglePowerChannelData> nenghaolist = new List<SinglePowerChannelData>();
|
||||
if (poo.NengHaoList != null && poo.NengHaoList.Count > 0)
|
||||
{
|
||||
foreach (var item in poo.NengHaoList)
|
||||
{
|
||||
SinglePowerChannelData gs1 = new SinglePowerChannelData();
|
||||
gs1.Address = item.address;
|
||||
gs1.Dianliu = item.dianliu;
|
||||
gs1.Dianya = item.dianya;
|
||||
gs1.Gonglv = item.gonglv;
|
||||
gs1.Nenghao = item.nenghao;
|
||||
gs1.Zongnenghao = item.zongnenghao;
|
||||
nenghaolist.Add(gs1);
|
||||
}
|
||||
|
||||
}
|
||||
//宝镜系统使用
|
||||
//EnergyConsumption ese = new EnergyConsumption();
|
||||
//ese.HotelCode = poo.HotelCode;
|
||||
//ese.HostNumber = poo.HostNumber;
|
||||
//ese.Mac = poo.Mac;
|
||||
//ese.EndPoint = poo.EndPoint;
|
||||
//ese.PowerChannelList.AddRange(nenghaolist);
|
||||
////ese.V = poo.V;
|
||||
////ese.A = poo.A;
|
||||
////ese.P = poo.P;
|
||||
////ese.EnergyConsumption_ = poo.Energy_Consumption;
|
||||
////ese.SumEnergyConsumption = poo.Sum_Energy_Consumption;
|
||||
//ese.CreateTime = poo.CreateTime;
|
||||
//ese.RoomNumber = poo.RoomNumber ?? "";
|
||||
//ese.IsTakeCard = poo.IsTakeCard;
|
||||
//ese.IsInsertCard = poo.IsInsertCard;
|
||||
//ese.CarbonVIP = poo.CarbonVIP;
|
||||
//ese.DeviceStatusList.AddRange(la);
|
||||
//ese.IdentityInfo = poo.IdentityInfo;
|
||||
//ese.CardEvent = poo.CardEvent;
|
||||
//ese.PMSStatus = poo.PMS_Status;
|
||||
//ese.BrightG = poo.Bright_G;
|
||||
|
||||
//byte[] data = ese.ToByteArray();
|
||||
//string TopicKey1 = KafkaKey.BLWLog4BaoJing_RCU_Topic;
|
||||
//string DetailKey1 = KafkaKey.UDPPackagePowerMonitor;
|
||||
|
||||
|
||||
|
||||
if (poo.HotelCode == 2302)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
Console.WriteLine(ex.StackTrace);
|
||||
}
|
||||
}
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
GoodRedis.redis6.Set("aaa", "bbb", 10);
|
||||
Console.ReadLine();
|
||||
string YYY111111 = File.ReadAllText("2.txt");
|
||||
|
||||
tsa(YYY111111);
|
||||
Console.WriteLine("Hello, World!");
|
||||
|
||||
NengHao? csdn = System.Text.Json.JsonSerializer.Deserialize<NengHao>(YYY111111);
|
||||
|
||||
var o = JsonConvert.DeserializeObject<CommonEntity.OnOffLineData>(YYY111111);
|
||||
string afds = "hello";
|
||||
string dda = afds;
|
||||
|
||||
Reference in New Issue
Block a user