消防命名修改

zw
tq 4 months ago
parent 578369e75b
commit 44127bbe8f

@ -2,12 +2,12 @@
public partial class FireResp
{
public Subzone2 Subzone2 = new Subzone2();
public Subzone5 Subzone5 = new Subzone5();
public Subzone7 Subzone7 = new Subzone7();
public Subzone2Resp Subzone2Resp { get; set; } = new Subzone2Resp();
public Subzone5Resp Subzone5Resp { get; set; }= new Subzone5Resp();
public Subzone7Resp Subzone7Resp { get; set; } = new Subzone7Resp();
}
public class Subzone2
public class Subzone2Resp
{
/// <summary>
/// 启动喷洒 1延时结束后发出启动喷洒 信号0默认状态
@ -30,7 +30,7 @@ public class Subzone2
public bool DeflatedDoNotEnter { get; set; }
}
public class Subzone5
public class Subzone5Resp
{
/// <summary>
/// 防护区
@ -123,7 +123,7 @@ public class Subzone5
public byte Smoke006 { get; set; }
}
public class Subzone7
public class Subzone7Resp
{
/// <summary>
/// 1#灭火器状态

@ -48,7 +48,7 @@ public class FireControlClient: ModbusTcpMaster
if (bytes02 != null)
{
Log.Info("fire read bytes02 success");
//ModbusDecoder.Decode<Subzone2>(bytes02, FireControlMgr.Subzone2, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
//ModbusDecoder.Decode<Subzone2Resp>(bytes02, FireControlMgr.Subzone2Resp, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
FireControlMgr.Subzone2.GiveAnAlarm.Value = bytes02[0];
FireControlMgr.Subzone2.NumberOfFailures.Value = bytes02[1];
FireControlMgr.Subzone2.SoundSuppression.Value = bytes02[2];

@ -4,34 +4,34 @@ namespace Service.FireControl;
public class FireAutoMapper
{
public static Entity.Api.Resp.Subzone2 Subzone2(Service.FireControl.Msg.Subzone2 subzone2)
public static Entity.Api.Resp.Subzone2Resp Subzone2(Service.FireControl.Msg.Subzone2 subzone2)
{
Entity.Api.Resp.Subzone2 Subzone2 = new Subzone2();
Subzone2.PrimingSpray = subzone2.PrimingSpray.Value;
Subzone2.Spray = subzone2.Spray.Value;
Subzone2.AudibleVisualAlarmStatus = subzone2.AudibleVisualAlarmStatus.Value;
Subzone2.DeflatedDoNotEnter = subzone2.DeflatedDoNotEnter.Value;
Entity.Api.Resp.Subzone2Resp subzone2Resp = new Subzone2Resp();
subzone2Resp.PrimingSpray = subzone2.PrimingSpray.Value;
subzone2Resp.Spray = subzone2.Spray.Value;
subzone2Resp.AudibleVisualAlarmStatus = subzone2.AudibleVisualAlarmStatus.Value;
subzone2Resp.DeflatedDoNotEnter = subzone2.DeflatedDoNotEnter.Value;
return Subzone2;
return subzone2Resp;
}
public static Entity.Api.Resp.Subzone5 Subzone5(Service.FireControl.Msg.Subzone5 subzone5)
public static Entity.Api.Resp.Subzone5Resp Subzone5(Service.FireControl.Msg.Subzone5 subzone5)
{
Entity.Api.Resp.Subzone5 Subzone5 = new Subzone5();
Subzone5.DetectorID001 = subzone5.DetectorID001.Value;
Subzone5.Temperature001 = subzone5.Temperature001.Value;
Subzone5.CoConcentration001 = subzone5.CoConcentration001.Value;
Subzone5.AlarmLevel001 = subzone5.AlarmLevel001.Value;
Subzone5.Smoke001 = subzone5.Smoke001.Value;
return Subzone5;
Entity.Api.Resp.Subzone5Resp subzone5Resp = new Subzone5Resp();
subzone5Resp.DetectorID001 = subzone5.DetectorID001.Value;
subzone5Resp.Temperature001 = subzone5.Temperature001.Value;
subzone5Resp.CoConcentration001 = subzone5.CoConcentration001.Value;
subzone5Resp.AlarmLevel001 = subzone5.AlarmLevel001.Value;
subzone5Resp.Smoke001 = subzone5.Smoke001.Value;
return subzone5Resp;
}
public static Entity.Api.Resp.Subzone7 Subzone7(Service.FireControl.Msg.Subzone7 subzone7)
public static Entity.Api.Resp.Subzone7Resp Subzone7(Service.FireControl.Msg.Subzone7 subzone7)
{
Entity.Api.Resp.Subzone7 Subzone7 = new Subzone7();
Entity.Api.Resp.Subzone7Resp subzone7Resp = new Subzone7Resp();
return Subzone7;
return subzone7Resp;
}
}

@ -267,9 +267,9 @@ public class FireControlController
public Result<FireResp> FireResp()
{
FireResp FireResp = new FireResp();
FireResp.Subzone2 = FireAutoMapper.Subzone2(FireControlMgr.Subzone2);
FireResp.Subzone5 = FireAutoMapper.Subzone5(FireControlMgr.Subzone5);
FireResp.Subzone7 = FireAutoMapper.Subzone7(FireControlMgr.Subzone7);
FireResp.Subzone2Resp = FireAutoMapper.Subzone2(FireControlMgr.Subzone2);
FireResp.Subzone5Resp = FireAutoMapper.Subzone5(FireControlMgr.Subzone5);
FireResp.Subzone7Resp = FireAutoMapper.Subzone7(FireControlMgr.Subzone7);
return Result<FireResp>.Success(FireResp);
}

Loading…
Cancel
Save