diff --git a/BLWLogProduce/BLWLogProduce.csproj.user b/BLWLogProduce/BLWLogProduce.csproj.user index 8ecb7ff..401941a 100644 --- a/BLWLogProduce/BLWLogProduce.csproj.user +++ b/BLWLogProduce/BLWLogProduce.csproj.user @@ -4,7 +4,7 @@ http ApiControllerEmptyScaffolder root/Common/Api - E:\tian\BLS\BLWLogServer\BLWLogProduce\Properties\PublishProfiles\FolderProfile.pubxml + E:\tian\chongxin\NewGit\Web_BLSKafka_Server_Prod\BLWLogProduce\Properties\PublishProfiles\FolderProfile.pubxml ProjectDebugger diff --git a/BLWLogProduce/DeviceActionChangeDataPush.cs b/BLWLogProduce/DeviceActionChangeDataPush.cs new file mode 100644 index 0000000..e9dd7dc --- /dev/null +++ b/BLWLogProduce/DeviceActionChangeDataPush.cs @@ -0,0 +1,731 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DeviceActionChangeDataPush.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace BLWData.Entity { + + /// Holder for reflection information generated from DeviceActionChangeDataPush.proto + public static partial class DeviceActionChangeDataPushReflection { + + #region Descriptor + /// File descriptor for DeviceActionChangeDataPush.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static DeviceActionChangeDataPushReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiBEZXZpY2VBY3Rpb25DaGFuZ2VEYXRhUHVzaC5wcm90bxIOQkxXRGF0YS5F", + "bnRpdHkilgIKGkRldmljZUFjdGlvbkNoYW5nZURhdGFQdXNoEgwKBGNvZGUY", + "ASABKAMSEgoKcm9vbU51bWJlchgCIAEoCRISCgpob3N0TnVtYmVyGAMgASgJ", + "EhIKCmRldmljZXR5cGUYBCABKAkSDwoHYWRkcmVzcxgFIAEoCRIMCgRuYW1l", + "GAYgASgJEg4KBnN0YXR1cxgHIAEoBRISCgpicmlnaHRuZXNzGAggASgFEhMK", + "C2N1cnJlbnRUZW1wGAkgASgFEhMKC3NldHRpbmdUZW1wGAogASgFEhAKCGZh", + "blNwZWVkGAsgASgFEgwKBG1vZGUYDCABKAUSDQoFdmFsdmUYDSABKAUSEgoK", + "Y3JlYXRldGltZRgOIAEoA2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::BLWData.Entity.DeviceActionChangeDataPush), global::BLWData.Entity.DeviceActionChangeDataPush.Parser, new[]{ "Code", "RoomNumber", "HostNumber", "Devicetype", "Address", "Name", "Status", "Brightness", "CurrentTemp", "SettingTemp", "FanSpeed", "Mode", "Valve", "Createtime" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// 定义一个Person消息类型 + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceActionChangeDataPush : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceActionChangeDataPush()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BLWData.Entity.DeviceActionChangeDataPushReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceActionChangeDataPush() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceActionChangeDataPush(DeviceActionChangeDataPush other) : this() { + code_ = other.code_; + roomNumber_ = other.roomNumber_; + hostNumber_ = other.hostNumber_; + devicetype_ = other.devicetype_; + address_ = other.address_; + name_ = other.name_; + status_ = other.status_; + brightness_ = other.brightness_; + currentTemp_ = other.currentTemp_; + settingTemp_ = other.settingTemp_; + fanSpeed_ = other.fanSpeed_; + mode_ = other.mode_; + valve_ = other.valve_; + createtime_ = other.createtime_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceActionChangeDataPush Clone() { + return new DeviceActionChangeDataPush(this); + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private long code_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "roomNumber" field. + public const int RoomNumberFieldNumber = 2; + private string roomNumber_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomNumber { + get { return roomNumber_; } + set { + roomNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "hostNumber" field. + public const int HostNumberFieldNumber = 3; + private string hostNumber_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string HostNumber { + get { return hostNumber_; } + set { + hostNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "devicetype" field. + public const int DevicetypeFieldNumber = 4; + private string devicetype_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Devicetype { + get { return devicetype_; } + set { + devicetype_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "address" field. + public const int AddressFieldNumber = 5; + private string address_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Address { + get { return address_; } + set { + address_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 6; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 7; + private int status_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "brightness" field. + public const int BrightnessFieldNumber = 8; + private int brightness_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Brightness { + get { return brightness_; } + set { + brightness_ = value; + } + } + + /// Field number for the "currentTemp" field. + public const int CurrentTempFieldNumber = 9; + private int currentTemp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CurrentTemp { + get { return currentTemp_; } + set { + currentTemp_ = value; + } + } + + /// Field number for the "settingTemp" field. + public const int SettingTempFieldNumber = 10; + private int settingTemp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SettingTemp { + get { return settingTemp_; } + set { + settingTemp_ = value; + } + } + + /// Field number for the "fanSpeed" field. + public const int FanSpeedFieldNumber = 11; + private int fanSpeed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int FanSpeed { + get { return fanSpeed_; } + set { + fanSpeed_ = value; + } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 12; + private int mode_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + /// Field number for the "valve" field. + public const int ValveFieldNumber = 13; + private int valve_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Valve { + get { return valve_; } + set { + valve_ = value; + } + } + + /// Field number for the "createtime" field. + public const int CreatetimeFieldNumber = 14; + private long createtime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Createtime { + get { return createtime_; } + set { + createtime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceActionChangeDataPush); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceActionChangeDataPush other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Code != other.Code) return false; + if (RoomNumber != other.RoomNumber) return false; + if (HostNumber != other.HostNumber) return false; + if (Devicetype != other.Devicetype) return false; + if (Address != other.Address) return false; + if (Name != other.Name) return false; + if (Status != other.Status) return false; + if (Brightness != other.Brightness) return false; + if (CurrentTemp != other.CurrentTemp) return false; + if (SettingTemp != other.SettingTemp) return false; + if (FanSpeed != other.FanSpeed) return false; + if (Mode != other.Mode) return false; + if (Valve != other.Valve) return false; + if (Createtime != other.Createtime) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Code != 0L) hash ^= Code.GetHashCode(); + if (RoomNumber.Length != 0) hash ^= RoomNumber.GetHashCode(); + if (HostNumber.Length != 0) hash ^= HostNumber.GetHashCode(); + if (Devicetype.Length != 0) hash ^= Devicetype.GetHashCode(); + if (Address.Length != 0) hash ^= Address.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); + if (Brightness != 0) hash ^= Brightness.GetHashCode(); + if (CurrentTemp != 0) hash ^= CurrentTemp.GetHashCode(); + if (SettingTemp != 0) hash ^= SettingTemp.GetHashCode(); + if (FanSpeed != 0) hash ^= FanSpeed.GetHashCode(); + if (Mode != 0) hash ^= Mode.GetHashCode(); + if (Valve != 0) hash ^= Valve.GetHashCode(); + if (Createtime != 0L) hash ^= Createtime.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Code != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Code); + } + if (RoomNumber.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoomNumber); + } + if (HostNumber.Length != 0) { + output.WriteRawTag(26); + output.WriteString(HostNumber); + } + if (Devicetype.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Devicetype); + } + if (Address.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Address); + } + if (Name.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Name); + } + if (Status != 0) { + output.WriteRawTag(56); + output.WriteInt32(Status); + } + if (Brightness != 0) { + output.WriteRawTag(64); + output.WriteInt32(Brightness); + } + if (CurrentTemp != 0) { + output.WriteRawTag(72); + output.WriteInt32(CurrentTemp); + } + if (SettingTemp != 0) { + output.WriteRawTag(80); + output.WriteInt32(SettingTemp); + } + if (FanSpeed != 0) { + output.WriteRawTag(88); + output.WriteInt32(FanSpeed); + } + if (Mode != 0) { + output.WriteRawTag(96); + output.WriteInt32(Mode); + } + if (Valve != 0) { + output.WriteRawTag(104); + output.WriteInt32(Valve); + } + if (Createtime != 0L) { + output.WriteRawTag(112); + output.WriteInt64(Createtime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Code != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Code); + } + if (RoomNumber.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoomNumber); + } + if (HostNumber.Length != 0) { + output.WriteRawTag(26); + output.WriteString(HostNumber); + } + if (Devicetype.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Devicetype); + } + if (Address.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Address); + } + if (Name.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Name); + } + if (Status != 0) { + output.WriteRawTag(56); + output.WriteInt32(Status); + } + if (Brightness != 0) { + output.WriteRawTag(64); + output.WriteInt32(Brightness); + } + if (CurrentTemp != 0) { + output.WriteRawTag(72); + output.WriteInt32(CurrentTemp); + } + if (SettingTemp != 0) { + output.WriteRawTag(80); + output.WriteInt32(SettingTemp); + } + if (FanSpeed != 0) { + output.WriteRawTag(88); + output.WriteInt32(FanSpeed); + } + if (Mode != 0) { + output.WriteRawTag(96); + output.WriteInt32(Mode); + } + if (Valve != 0) { + output.WriteRawTag(104); + output.WriteInt32(Valve); + } + if (Createtime != 0L) { + output.WriteRawTag(112); + output.WriteInt64(Createtime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Code != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Code); + } + if (RoomNumber.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomNumber); + } + if (HostNumber.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(HostNumber); + } + if (Devicetype.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Devicetype); + } + if (Address.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Address); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); + } + if (Brightness != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Brightness); + } + if (CurrentTemp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CurrentTemp); + } + if (SettingTemp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SettingTemp); + } + if (FanSpeed != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FanSpeed); + } + if (Mode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Mode); + } + if (Valve != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Valve); + } + if (Createtime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Createtime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceActionChangeDataPush other) { + if (other == null) { + return; + } + if (other.Code != 0L) { + Code = other.Code; + } + if (other.RoomNumber.Length != 0) { + RoomNumber = other.RoomNumber; + } + if (other.HostNumber.Length != 0) { + HostNumber = other.HostNumber; + } + if (other.Devicetype.Length != 0) { + Devicetype = other.Devicetype; + } + if (other.Address.Length != 0) { + Address = other.Address; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Status != 0) { + Status = other.Status; + } + if (other.Brightness != 0) { + Brightness = other.Brightness; + } + if (other.CurrentTemp != 0) { + CurrentTemp = other.CurrentTemp; + } + if (other.SettingTemp != 0) { + SettingTemp = other.SettingTemp; + } + if (other.FanSpeed != 0) { + FanSpeed = other.FanSpeed; + } + if (other.Mode != 0) { + Mode = other.Mode; + } + if (other.Valve != 0) { + Valve = other.Valve; + } + if (other.Createtime != 0L) { + Createtime = other.Createtime; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Code = input.ReadInt64(); + break; + } + case 18: { + RoomNumber = input.ReadString(); + break; + } + case 26: { + HostNumber = input.ReadString(); + break; + } + case 34: { + Devicetype = input.ReadString(); + break; + } + case 42: { + Address = input.ReadString(); + break; + } + case 50: { + Name = input.ReadString(); + break; + } + case 56: { + Status = input.ReadInt32(); + break; + } + case 64: { + Brightness = input.ReadInt32(); + break; + } + case 72: { + CurrentTemp = input.ReadInt32(); + break; + } + case 80: { + SettingTemp = input.ReadInt32(); + break; + } + case 88: { + FanSpeed = input.ReadInt32(); + break; + } + case 96: { + Mode = input.ReadInt32(); + break; + } + case 104: { + Valve = input.ReadInt32(); + break; + } + case 112: { + Createtime = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Code = input.ReadInt64(); + break; + } + case 18: { + RoomNumber = input.ReadString(); + break; + } + case 26: { + HostNumber = input.ReadString(); + break; + } + case 34: { + Devicetype = input.ReadString(); + break; + } + case 42: { + Address = input.ReadString(); + break; + } + case 50: { + Name = input.ReadString(); + break; + } + case 56: { + Status = input.ReadInt32(); + break; + } + case 64: { + Brightness = input.ReadInt32(); + break; + } + case 72: { + CurrentTemp = input.ReadInt32(); + break; + } + case 80: { + SettingTemp = input.ReadInt32(); + break; + } + case 88: { + FanSpeed = input.ReadInt32(); + break; + } + case 96: { + Mode = input.ReadInt32(); + break; + } + case 104: { + Valve = input.ReadInt32(); + break; + } + case 112: { + Createtime = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/BLWLogProduce/Models/WaiBuJianKong.cs b/BLWLogProduce/Models/WaiBuJianKong.cs index 3671ca6..e1573af 100644 --- a/BLWLogProduce/Models/WaiBuJianKong.cs +++ b/BLWLogProduce/Models/WaiBuJianKong.cs @@ -66,6 +66,30 @@ namespace BLWLogProduce.Models public int? Process_TH4 { get; set; } = 0; public int? Process_TH5 { get; set; } = 0; - public string? TotalErrorPackageReceiveCount { get; set; } = "0" ; + public string? TotalErrorPackageReceiveCount { get; set; } = "0"; + + + + public long GetRoomAirList = 0; + public long SetRCUAir = 0; + public long GetRoomSceneList = 0; + public long SetRCUScene = 0; + public long GetRoomLightList = 0; + public long SetRCULight = 0; + public long GetRoomCurtainList = 0; + public long SetRCUCurtain = 0; + public long GetRoomServiceList = 0; + public long SetRCUService = 0; + public long GetOperationLog = 0; + public long GetRoomMusicList = 0; + public long SetRCUMusic = 0; + public long GetRCUStatus = 0; + public long GetAirDetectList = 0; + public long GetHostFaultList = 0; + public long GetRoomTypeAndModalsList = 0; + public long GetRCUInfoForPDU = 0; + public long GetSessionKey = 0; + public long GetPhoneNumber = 0; + public long GetHotelInfoForWX = 0; } } diff --git a/BLWLogProduce/Para_copy.yaml b/BLWLogProduce/Para_copy.yaml index 18892eb..9d4a15f 100644 --- a/BLWLogProduce/Para_copy.yaml +++ b/BLWLogProduce/Para_copy.yaml @@ -83,3 +83,87 @@ Process_TH4 {19} # TYPE Process_TH5 gauge Process_TH5 {20} +# HELP GetRoomAirList counte. +# TYPE GetRoomAirList gauge +GetRoomAirList {22} + +# HELP SetRCUAir counte. +# TYPE SetRCUAir gauge +SetRCUAir {23} + +# HELP GetRoomSceneList counte. +# TYPE GetRoomSceneList gauge +GetRoomSceneList {24} + +# HELP SetRCUScene counte. +# TYPE SetRCUScene gauge +SetRCUScene {25} + +# HELP GetRoomLightList counte. +# TYPE GetRoomLightList gauge +GetRoomLightList {26} + +# HELP SetRCULight counte. +# TYPE SetRCULight gauge +SetRCULight {27} + +# HELP GetRoomCurtainList counte. +# TYPE GetRoomCurtainList gauge +GetRoomCurtainList {28} + +# HELP SetRCUCurtain counte. +# TYPE SetRCUCurtain gauge +SetRCUCurtain {29} + +# HELP GetRoomServiceList counte. +# TYPE GetRoomServiceList gauge +GetRoomServiceList {30} + +# HELP SetRCUService counte. +# TYPE SetRCUService gauge +SetRCUService {31} + +# HELP GetOperationLog counte. +# TYPE GetOperationLog gauge +GetOperationLog {32} + +# HELP GetRoomMusicList counte. +# TYPE GetRoomMusicList gauge +GetRoomMusicList {33} + +# HELP SetRCUMusic counte. +# TYPE SetRCUMusic gauge +SetRCUMusic {34} + +# HELP GetRCUStatus counte. +# TYPE GetRCUStatus gauge +GetRCUStatus {35} + +# HELP GetAirDetectList counte. +# TYPE GetAirDetectList gauge +GetAirDetectList {36} + +# HELP GetHostFaultList counte. +# TYPE GetHostFaultList gauge +GetHostFaultList {37} + +# HELP GetRoomTypeAndModalsList counte. +# TYPE GetRoomTypeAndModalsList gauge +GetRoomTypeAndModalsList {38} + +# HELP GetRCUInfoForPDU counte. +# TYPE GetRCUInfoForPDU gauge +GetRCUInfoForPDU {39} + +# HELP GetSessionKey counte. +# TYPE GetSessionKey gauge +GetSessionKey {40} + +# HELP GetPhoneNumber counte. +# TYPE GetPhoneNumber gauge +GetPhoneNumber {41} + +# HELP GetHotelInfoForWX counte. +# TYPE GetHotelInfoForWX gauge +GetHotelInfoForWX {42} + diff --git a/BLWLogProduce/Services/KafkaProduce.cs b/BLWLogProduce/Services/KafkaProduce.cs index 7fe12eb..2f4317d 100644 --- a/BLWLogProduce/Services/KafkaProduce.cs +++ b/BLWLogProduce/Services/KafkaProduce.cs @@ -71,6 +71,64 @@ namespace BLWLogProduce.Services } })); + ///webapidata 采集数据 + var webapidata_fenxi = ("webapidata_consumer", new Action(async (args) => + { + try + { + string data = args.Body; + var qs = JsonConvert.DeserializeObject>(data); + // 使用 TryGetValue 获取值,不存在则使用0 + qs.TryGetValue("GetRoomAirList", out long l1); + qs.TryGetValue("SetRCUAir", out long l2); + qs.TryGetValue("GetRoomSceneList", out long l3); + qs.TryGetValue("SetRCUScene", out long l4); + qs.TryGetValue("GetRoomLightList", out long l5); + qs.TryGetValue("SetRCULight", out long l6); + qs.TryGetValue("GetRoomCurtainList", out long l7); + qs.TryGetValue("SetRCUCurtain", out long l8); + qs.TryGetValue("GetRoomServiceList", out long l9); + qs.TryGetValue("SetRCUService", out long l10); + qs.TryGetValue("GetOperationLog", out long l11); + qs.TryGetValue("GetRoomMusicList", out long l12); + qs.TryGetValue("SetRCUMusic", out long l13); + qs.TryGetValue("GetRCUStatus", out long l14); + qs.TryGetValue("GetAirDetectList", out long l15); + qs.TryGetValue("GetHostFaultList", out long l16); + qs.TryGetValue("GetRoomTypeAndModalsList", out long l17); + qs.TryGetValue("GetRCUInfoForPDU", out long l18); + qs.TryGetValue("GetSessionKey", out long l19); + qs.TryGetValue("GetPhoneNumber", out long l20); + qs.TryGetValue("GetHotelInfoForWX", out long l21); + + + WaiBuJianKong.data.GetRoomAirList = l1; + WaiBuJianKong.data.SetRCUAir = l2; + WaiBuJianKong.data.GetRoomSceneList = l3; + WaiBuJianKong.data.SetRCUScene = l4; + WaiBuJianKong.data.GetRoomLightList = l5; + WaiBuJianKong.data.SetRCULight = l6; + WaiBuJianKong.data.GetRoomCurtainList = l7; + WaiBuJianKong.data.SetRCUCurtain = l8; + WaiBuJianKong.data.GetRoomServiceList = l9; + WaiBuJianKong.data.SetRCUService = l10; + WaiBuJianKong.data.GetOperationLog = l11; + WaiBuJianKong.data.GetRoomMusicList = l12; + WaiBuJianKong.data.SetRCUMusic = l13; + WaiBuJianKong.data.GetRCUStatus = l14; + WaiBuJianKong.data.GetAirDetectList = l15; + WaiBuJianKong.data.GetHostFaultList = l16; + WaiBuJianKong.data.GetRoomTypeAndModalsList = l17; + WaiBuJianKong.data.GetRCUInfoForPDU = l18; + WaiBuJianKong.data.GetSessionKey = l19; + WaiBuJianKong.data.GetPhoneNumber = l20; + WaiBuJianKong.data.GetHotelInfoForWX = l21; + } + catch (Exception) + { + + } + })); ///udp 采集数据 var xiaofei_fenxi = ("udp_package_consumer", new Action(async (args) => { @@ -106,7 +164,7 @@ namespace BLWLogProduce.Services { var ts = WaiBuJianKong.data.Process_TH4; int? count = ts + 1; - WaiBuJianKong.data.Process_TH4= count; + WaiBuJianKong.data.Process_TH4 = count; } else if (key.Equals("task5")) { @@ -697,6 +755,50 @@ namespace BLWLogProduce.Services #endregion + + //专门给选住的 + var DingYue20 = ("Redis-XuanZhuKafka", new Action(async (args) => + { + try + { + + string body = args.Body; + XuanZhuRequest? poo = System.Text.Json.JsonSerializer.Deserialize(body); + + //string ti = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + DeviceActionChangeDataPush ese = new DeviceActionChangeDataPush(); + ese.Code =long.Parse(poo.code); + ese.RoomNumber = poo.roomNumber; + ese.HostNumber =""; + ese.Devicetype = poo.devicetype; + ese.Address = poo.address; + ese.Brightness = poo.brightness; + ese.Status = poo.status; + ese.Name = poo.name; + ese.CurrentTemp = poo.currentTemp; + ese.SettingTemp = poo.settingTemp; + ese.FanSpeed = poo.fanSpeed; + ese.Mode = poo.mode; + ese.Valve = poo.valve; + ese.Createtime = Tools.GetUnixTime(); + + + byte[] data = ese.ToByteArray(); + string TopicKey = KafkaKey.BLWLog4XuanZhu_RCU_Topic; + string DetailKey = KafkaKey.UDPPackageDeviceStatus; + + await p.ProduceAsync(TopicKey, new Message { Key = DetailKey, Value = data }); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + Console.WriteLine(ex.StackTrace); + } + })); + + + CSRedisCacheHelper.redis3.Subscribe(webapidata_fenxi); + CSRedisCacheHelper.redis3.Subscribe(wireshark); CSRedisCacheHelper.redis3.Subscribe(xiaofei_fenxi); @@ -723,6 +825,7 @@ namespace BLWLogProduce.Services //CSRedisCacheHelper.redis3.Subscribe(DingYue15); //CSRedisCacheHelper.redis3.Subscribe(DingYue3_1); + CSRedisCacheHelper.redis3.Subscribe(DingYue20); } catch (Exception ex) { diff --git a/BLWLogProduce/Services/MyTimer.cs b/BLWLogProduce/Services/MyTimer.cs index 73d38f5..7ae081d 100644 --- a/BLWLogProduce/Services/MyTimer.cs +++ b/BLWLogProduce/Services/MyTimer.cs @@ -45,7 +45,28 @@ namespace BLWLogProduce.Services .Replace("{18}", df.Process_TH3.ToString()) .Replace("{19}", df.Process_TH4.ToString()) .Replace("{20}", df.Process_TH5.ToString()) - .Replace("{21}", df.TotalErrorPackageReceiveCount); + .Replace("{21}", df.TotalErrorPackageReceiveCount) + .Replace("{22}", df.GetRoomAirList.ToString()) + .Replace("{23}", df.SetRCUAir.ToString()) + .Replace("{24}", df.GetRoomSceneList.ToString()) + .Replace("{25}", df.SetRCUScene.ToString()) + .Replace("{26}", df.GetRoomLightList.ToString()) + .Replace("{27}", df.SetRCULight.ToString()) + .Replace("{28}", df.GetRoomCurtainList.ToString()) + .Replace("{29}", df.SetRCUCurtain.ToString()) + .Replace("{30}", df.GetRoomServiceList.ToString()) + .Replace("{31}", df.SetRCUService.ToString()) + .Replace("{32}", df.GetOperationLog.ToString()) + .Replace("{33}", df.GetRoomMusicList.ToString()) + .Replace("{34}", df.SetRCUMusic.ToString()) + .Replace("{35}", df.GetRCUStatus.ToString()) + .Replace("{36}", df.GetAirDetectList.ToString()) + .Replace("{37}", df.GetHostFaultList.ToString()) + .Replace("{38}", df.GetRoomTypeAndModalsList.ToString()) + .Replace("{39}", df.GetRCUInfoForPDU.ToString()) + .Replace("{40}", df.GetSessionKey.ToString()) + .Replace("{41}", df.GetPhoneNumber.ToString()) + .Replace("{42}", df.GetHotelInfoForWX.ToString()); int a = 0; int b = 0; diff --git a/CommonEntity/UDPPackage.cs b/CommonEntity/UDPPackage.cs index 95b51d6..143cb8c 100644 --- a/CommonEntity/UDPPackage.cs +++ b/CommonEntity/UDPPackage.cs @@ -28,12 +28,21 @@ namespace CommonEntity /// public static string BLWLog4BaoJing_RCU_Topic = "blwlog4BaoJing-rcu-udppackage-topic"; + /// + /// 选住使用kafka数据 + /// + public static string BLWLog4XuanZhu_RCU_Topic = "blwlog4XuanZhu-rcu-topic"; + /// /// 设备动作数据 /// public static string UDPPackage_ActionData = "action_change_push"; + /// + /// 设备状态变化数据 + /// + public static string UDPPackageDeviceStatus = "statuschanges"; public static string UDPPackageKey = "blwlog-rcu-topic"; public static string UDPPackageForkSystemKey = "forksystem"; diff --git a/CommonEntity/XuanZhuRequest.cs b/CommonEntity/XuanZhuRequest.cs new file mode 100644 index 0000000..37d1955 --- /dev/null +++ b/CommonEntity/XuanZhuRequest.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CommonEntity +{ + public class XuanZhuRequest + { + /// + /// 酒店编码 + /// + public string? code { get; set; } + /// + /// 房号 + /// + public string? roomNumber { get; set; } + public string? devicetype { get; set; } + /// + /// 回路地址 + /// + public string? address { get; set; } + /// + /// 回路名称 + /// + public string? name { get; set; } + /// + /// 状态 + /// + public int status { get; set; } + /// + /// 异常类型 + /// + public int faultType { get; set; } + /// + /// 异常值 + /// + public int faultData { get; set; } + /// + /// 亮度 + /// + public int brightness { get; set; } + /// + /// 当前温度 + /// + public int currentTemp { get; set; } + /// + /// 设定温度 + /// + public int settingTemp { get; set; } + /// + /// 风速 + /// + public int fanSpeed { get; set; } + /// + /// 模式 + /// + public int mode { get; set; } + /// + /// 阀门 + /// + public int valve { get; set; } + } +} diff --git a/CommonEntity/XuanZhuResponse.cs b/CommonEntity/XuanZhuResponse.cs new file mode 100644 index 0000000..2fb90ca --- /dev/null +++ b/CommonEntity/XuanZhuResponse.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CommonEntity +{ + public class XuanZhuResponse + { + /// + /// 酒店编码 + /// + public string code { get; set; } + /// + /// 房号 + /// + public string roomNumber { get; set; } + /// + /// 回路地址 + /// + public string address { get; set; } + /// + /// 回路名称 + /// + public string name { get; set; } + /// + /// 状态 + /// + public int status { get; set; } + /// + /// 异常类型 + /// + public int faultType { get; set; } + /// + /// 异常值 + /// + public int faultData { get; set; } + /// + /// 亮度 + /// + public int brightness { get; set; } + /// + /// 当前温度 + /// + public int currentTemp { get; set; } + /// + /// 设定温度 + /// + public int settingTemp { get; set; } + /// + /// 风速 + /// + public int fanSpeed { get; set; } + /// + /// 模式 + /// + public int mode { get; set; } + /// + /// 阀门 + /// + public int valve { get; set; } + + } +}