using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using MessagePack; using MongoDB.Bson; namespace CommonEntity { public class KafkaKey { /// /// 自己用 的系统的主题 /// public static string BLWLog_RCU_Topic = "blwlog-rcu-udppackage-topic"; /// /// 新数据会分区 /// public static string BLWLog_RCU_Topic_Partition = "blwlog-data-topic"; //public static string BLWLog_RCU_Topic_Partition = "firsttopic"; /// /// 宝镜系统使用的数据 /// public static string BLWLog4BaoJing_RCU_Topic = "blwlog4BaoJing-rcu-udppackage-topic"; /// /// 设备动作数据 /// public static string UDPPackage_ActionData = "action_change_push"; public static string UDPPackageKey = "blwlog-rcu-topic"; public static string UDPPackageForkSystemKey = "forksystem"; public static string UDPPackageStepMonitor = "stepmonitor"; public static string UDPPackagePowerMonitor = "power"; public static string UDPPackageWholeDataMonitor = "original-power-data"; public static string IotMonitor = "iot"; public static string RCUOnLineStatus = "rcu-status"; public static string TakeCardStatus = "takecard-status"; public static string ServiceInfoStatus = "serviceinfo-status"; public static string InvokceThirdHttpInterface = "invoke3httpinterface"; public static string PMSLogMonitor = "pms"; public static string RCUNewVersion_RestartReason = "restart-reason"; public static string RCUNewVersion_TakeCard = "takecard"; public static string RCUNewVersion_0E = "0X0E"; public static string RCUNewVersion_Register = "0X01"; public static string RCUNewTimerData = "0X34"; } //public class UDPPackage //{ // public string? CommandType { get; set; } // public long TotalCount { get; set; } // public Dictionary FenLei { get; set; } // public string? RemoveTime { get; set; } //} [MessagePackObject] public class UDPPackage { [Key(0)] public string? CommandType { get; set; } [Key(1)] public long TotalCount { get; set; } [Key(2)] public Dictionary FenLei { get; set; } [Key(3)] public string? RemoveTime { get; set; } [Key(4)] public Dictionary ExtraData { get; set; } } [MessagePackObject()] public class StepInfo { [Key(0)] public string MessageId { get; set; } [Key(1)] public string? TriggerTime { get; set; } [Key(2)] public double Step { get; set; } [Key(3)] public string? StepDescription { get; set; } [Key(4)] public byte[]? Content { get; set; } [Key(5)] public long EveryMessageId { get; set; } [Key(6)] public long Monitor_0E_01 { get; set; } [Key(7)] public string? HotelCode { get; set; } [Key(8)] public string? HostNumber { get; set; } } [MessagePackObject()] public class DingShiReportDate { [Key(0)] /// /// HostID /// public int HostID { get; set; } /// /// 设备类型 /// [Key(1)] public string DeviceType { get; set; } /// /// 设备地址 /// [Key(2)] public string Address { get; set; } /// /// 状态:1开,2关 /// [Key(3)] public int Status { get; set; } /// /// 亮度 /// [Key(4)] public int Brightness { get; set; } /// /// 当前温度 /// [Key(5)] public int CurrentTemp { get; set; } /// /// 设定温度 /// [Key(6)] public int SettingTemp { get; set; } /// /// 风速 /// [Key(7)] public int FanSpeed { get; set; } /// /// 模式 /// [Key(8)] public int Mode { get; set; } /// /// 阀门 /// [Key(9)] public int Valve { get; set; } } [MessagePackObject()] public class NengHao { [Key(0)] public long HotelCode { get; set; } [Key(1)] public string? HostNumber { get; set; } [Key(2)] public string? Mac { get; set; } [Key(3)] public string? EndPoint { get; set; } [Key(4)] public string? Version { get; set; } [Key(5)] public bool IsTakeCard { get; set; } [Key(6)] public double V { get; set; } [Key(7)] public double A { get; set; } [Key(8)] public double P { get; set; } /// /// 能耗 /// [Key(9)] public double Energy_Consumption { get; set; } /// /// 总能耗 /// [Key(10)] public double Sum_Energy_Consumption { get; set; } [Key(11)] public long CreateTime { get; set; } [Key(12)] public string? ReportTime { get; set; } [Key(13)] public string? RoomNumber { get; set; } [Key(14)] public int CarbonVIP { get; set; } [Key(15)] public List? AllDeviceData { get; set; } [Key(16)] public int IdentityInfo { get; set; } } [MessagePackObject()] public class NewRoomtusPush { /// /// 酒店编码 /// [Key(0)] public long code { get; set; } [Key(1)] public string hostnumber { get; set; } /// /// 房号 /// [Key(2)] public string roomNumber { get; set; } /// /// 回路地址 /// [Key(3)] public string address { get; set; } /// /// 回路名称 /// [Key(4)] public string name { get; set; } /// /// 状态 /// [Key(5)] public int status { get; set; } /// /// 亮度 /// [Key(6)] public int brightness { get; set; } /// /// 当前温度 /// [Key(7)] public int currentTemp { get; set; } /// /// 设定温度 /// [Key(8)] public int settingTemp { get; set; } /// /// 风速 /// [Key(9)] public int fanSpeed { get; set; } /// /// 模式 /// [Key(10)] public int mode { get; set; } /// /// 阀门 /// [Key(11)] public int valve { get; set; } [Key(12)] public long createtime { get; set; } } [MessagePackObject()] public class OtherServiceInfo { [Key(0)] public string? HotelCode { get; set; } [Key(1)] public string? HostNumber { get; set; } [Key(2)] public string? Address { get; set; } [Key(3)] public ushort StatusReceiver { get; set; } [Key(4)] public DateTime LastUpdateTime { get; set; } } [MessagePackObject()] public class Interface3Log { [Key(0)] public string? HotelCode { get; set; } [Key(1)] public string? HostNumber { get; set; } [Key(2)] public string? RoomNumber { get; set; } [Key(3)] public HttpActionData? ActionData { get; set; } [Key(4)] public DateTime TriggerTime { get; set; } [Key(5)] public string? CommandType { get; set; } } [MessagePackObject()] public class HttpActionData { [Key(0)] public double Step { get; set; } [Key(1)] public string? RequestData { get; set; } [Key(2)] public string? ResponseData { get; set; } } public class Interface3Log_db { public ObjectId _id { get; set; } public string? HotelCode { get; set; } public string? HostNumber { get; set; } public string? RoomNumber { get; set; } public HttpActionData? ActionData { get; set; } public DateTime TriggerTime { get; set; } public string? CommandType { get; set; } } public class StepInfo_db { public ObjectId _id { get; set; } public string MessageId { get; set; } public DateTime? TriggerTime { get; set; } public string? TriggerTimeString { get; set; } public double Step { get; set; } public string? StepDescription { get; set; } public byte[]? Content { get; set; } public long EveryMessageId { get; set; } public long Monitor_0E_01 { get; set; } public string? HotelCode { get; set; } public string? HostNumber { get; set; } } public class UDPPackage_db { public ObjectId _id { get; set; } public string? CommandType { get; set; } public long TotalCount { get; set; } public Dictionary FenLei { get; set; } public Dictionary ExtraData { get; set; } public DateTime RemoveTime { get; set; } public string? RemoveTimeString { get; set; } } public class NengHao_db { public ObjectId _id { get; set; } public long HotelCode { get; set; } public string? HostNumber { get; set; } public string? Mac { get; set; } public string? EndPoint { get; set; } public string? Version { get; set; } public bool IsTakeCard { get; set; } public double V { get; set; } public double A { get; set; } public double P { get; set; } public double Energy_Consumption { get; set; } public double Sum_Energy_Consumption { get; set; } public long CreateTime { get; set; } public DateTime ReportTime { get; set; } public string? RoomNumber { get; set; } public int CarbonVIP { get; set; } public List? AllDeviceData { get; set; } public int IdentityInfo { get; set; } } public class OtherServiceInfo_db { public ObjectId _id { get; set; } public string? HotelCode { get; set; } public string? HostNumber { get; set; } public string? Address { get; set; } public ushort StatusReceiver { get; set; } public DateTime LastUpdateTime { get; set; } } public class QueryDate { public string? HotelCode { get; set; } public string? HostNumber { get; set; } public string? Mac { get; set; } public string Start_Time { get; set; } public string End_Time { get; set; } public int PageSize { get; set; } public int PageIndex { get; set; } } public class TimerData { public int interval_Minutes { get; set; } } public class Root { public List data { get; set; } } public class DataItem { /// /// /// public string ExtendedLocation { get; set; } /// /// /// public string OriginQuery { get; set; } /// /// /// public string appinfo { get; set; } /// /// /// public int disp_type { get; set; } /// /// /// public string fetchkey { get; set; } /// /// 本地局域网 /// public string location { get; set; } /// /// /// public string origip { get; set; } /// /// /// public string origipquery { get; set; } /// /// /// public string resourceid { get; set; } /// /// /// public int role_id { get; set; } /// /// /// public int shareImage { get; set; } /// /// /// public int showLikeShare { get; set; } /// /// /// public string showlamp { get; set; } /// /// IP地址查询 /// public string titlecont { get; set; } /// /// /// public string tplt { get; set; } } }