给选住增加 设备变化推送接口

This commit is contained in:
2026-01-05 11:11:19 +08:00
parent e42dadc876
commit 7c7386d9eb
9 changed files with 1106 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<ActiveDebugProfile>http</ActiveDebugProfile>
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
<NameOfLastUsedPublishProfile>E:\tian\BLS\BLWLogServer\BLWLogProduce\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>E:\tian\chongxin\NewGit\Web_BLSKafka_Server_Prod\BLWLogProduce\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>

View File

@@ -0,0 +1,731 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: DeviceActionChangeDataPush.proto
// </auto-generated>
#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 {
/// <summary>Holder for reflection information generated from DeviceActionChangeDataPush.proto</summary>
public static partial class DeviceActionChangeDataPushReflection {
#region Descriptor
/// <summary>File descriptor for DeviceActionChangeDataPush.proto</summary>
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
/// <summary>
/// 定义一个Person消息类型
/// </summary>
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class DeviceActionChangeDataPush : pb::IMessage<DeviceActionChangeDataPush>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<DeviceActionChangeDataPush> _parser = new pb::MessageParser<DeviceActionChangeDataPush>(() => new DeviceActionChangeDataPush());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<DeviceActionChangeDataPush> 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);
}
/// <summary>Field number for the "code" field.</summary>
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;
}
}
/// <summary>Field number for the "roomNumber" field.</summary>
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");
}
}
/// <summary>Field number for the "hostNumber" field.</summary>
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");
}
}
/// <summary>Field number for the "devicetype" field.</summary>
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");
}
}
/// <summary>Field number for the "address" field.</summary>
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");
}
}
/// <summary>Field number for the "name" field.</summary>
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");
}
}
/// <summary>Field number for the "status" field.</summary>
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;
}
}
/// <summary>Field number for the "brightness" field.</summary>
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;
}
}
/// <summary>Field number for the "currentTemp" field.</summary>
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;
}
}
/// <summary>Field number for the "settingTemp" field.</summary>
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;
}
}
/// <summary>Field number for the "fanSpeed" field.</summary>
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;
}
}
/// <summary>Field number for the "mode" field.</summary>
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;
}
}
/// <summary>Field number for the "valve" field.</summary>
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;
}
}
/// <summary>Field number for the "createtime" field.</summary>
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

View File

@@ -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;
}
}

View File

@@ -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}

View File

@@ -71,6 +71,64 @@ namespace BLWLogProduce.Services
}
}));
///webapidata 采集数据
var webapidata_fenxi = ("webapidata_consumer", new Action<SubscribeMessageEventArgs>(async (args) =>
{
try
{
string data = args.Body;
var qs = JsonConvert.DeserializeObject<Dictionary<string, long>>(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<SubscribeMessageEventArgs>(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<SubscribeMessageEventArgs>(async (args) =>
{
try
{
string body = args.Body;
XuanZhuRequest? poo = System.Text.Json.JsonSerializer.Deserialize<XuanZhuRequest>(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<string, byte[]> { 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)
{

View File

@@ -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;

View File

@@ -28,12 +28,21 @@ namespace CommonEntity
/// </summary>
public static string BLWLog4BaoJing_RCU_Topic = "blwlog4BaoJing-rcu-udppackage-topic";
/// <summary>
/// 选住使用kafka数据
/// </summary>
public static string BLWLog4XuanZhu_RCU_Topic = "blwlog4XuanZhu-rcu-topic";
/// <summary>
/// 设备动作数据
/// </summary>
public static string UDPPackage_ActionData = "action_change_push";
/// <summary>
/// 设备状态变化数据
/// </summary>
public static string UDPPackageDeviceStatus = "statuschanges";
public static string UDPPackageKey = "blwlog-rcu-topic";
public static string UDPPackageForkSystemKey = "forksystem";

View File

@@ -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
{
/// <summary>
/// 酒店编码
/// </summary>
public string? code { get; set; }
/// <summary>
/// 房号
/// </summary>
public string? roomNumber { get; set; }
public string? devicetype { get; set; }
/// <summary>
/// 回路地址
/// </summary>
public string? address { get; set; }
/// <summary>
/// 回路名称
/// </summary>
public string? name { get; set; }
/// <summary>
/// 状态
/// </summary>
public int status { get; set; }
/// <summary>
/// 异常类型
/// </summary>
public int faultType { get; set; }
/// <summary>
/// 异常值
/// </summary>
public int faultData { get; set; }
/// <summary>
/// 亮度
/// </summary>
public int brightness { get; set; }
/// <summary>
/// 当前温度
/// </summary>
public int currentTemp { get; set; }
/// <summary>
/// 设定温度
/// </summary>
public int settingTemp { get; set; }
/// <summary>
/// 风速
/// </summary>
public int fanSpeed { get; set; }
/// <summary>
/// 模式
/// </summary>
public int mode { get; set; }
/// <summary>
/// 阀门
/// </summary>
public int valve { get; set; }
}
}

View File

@@ -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
{
/// <summary>
/// 酒店编码
/// </summary>
public string code { get; set; }
/// <summary>
/// 房号
/// </summary>
public string roomNumber { get; set; }
/// <summary>
/// 回路地址
/// </summary>
public string address { get; set; }
/// <summary>
/// 回路名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 状态
/// </summary>
public int status { get; set; }
/// <summary>
/// 异常类型
/// </summary>
public int faultType { get; set; }
/// <summary>
/// 异常值
/// </summary>
public int faultData { get; set; }
/// <summary>
/// 亮度
/// </summary>
public int brightness { get; set; }
/// <summary>
/// 当前温度
/// </summary>
public int currentTemp { get; set; }
/// <summary>
/// 设定温度
/// </summary>
public int settingTemp { get; set; }
/// <summary>
/// 风速
/// </summary>
public int fanSpeed { get; set; }
/// <summary>
/// 模式
/// </summary>
public int mode { get; set; }
/// <summary>
/// 阀门
/// </summary>
public int valve { get; set; }
}
}