You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
5.7 KiB
99 lines
5.7 KiB
using Entity.Api.Resp;
|
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
|
|
using Service.FireControl.Msg;
|
|
|
|
namespace Service.FireControl;
|
|
|
|
public class FireAutoMapper
|
|
{
|
|
public static FireMsgResp FireMsgResp(FireMsg FireMsg)
|
|
{
|
|
FireMsgResp FireMsgResp = new();
|
|
if (FireMsg != null)
|
|
{
|
|
FireMsgResp.MaximumAlarmLevel = FireMsg.MaximumAlarmLevel.Value;
|
|
FireMsgResp.DetectorState = FireMsg.DetectorState.Value;
|
|
FireMsgResp.DetectorState01 = FireMsg.DetectorState01.Value;
|
|
FireMsgResp.DetectorState02 = FireMsg.DetectorState02.Value;
|
|
FireMsgResp.DetectorState03 = FireMsg.DetectorState03.Value;
|
|
FireMsgResp.DetectorState04 = FireMsg.DetectorState04.Value;
|
|
FireMsgResp.DetectorState05 = FireMsg.DetectorState05.Value;
|
|
FireMsgResp.DetectorState06 = FireMsg.DetectorState06.Value;
|
|
FireMsgResp.DetectorState07 = FireMsg.DetectorState07.Value;
|
|
FireMsgResp.DetectorState08 = FireMsg.DetectorState08.Value;
|
|
FireMsgResp.DetectorState09 = FireMsg.DetectorState09.Value;
|
|
FireMsgResp.DetectorState10 = FireMsg.DetectorState10.Value;
|
|
FireMsgResp.DetectorState11 = FireMsg.DetectorState11.Value;
|
|
FireMsgResp.DetectorState12 = FireMsg.DetectorState12.Value;
|
|
FireMsgResp.DetectorState13 = FireMsg.DetectorState13.Value;
|
|
FireMsgResp.DetectorState14 = FireMsg.DetectorState14.Value;
|
|
FireMsgResp.DetectorState15 = FireMsg.DetectorState15.Value;
|
|
FireMsgResp.DetectorState16 = FireMsg.DetectorState16.Value;
|
|
FireMsgResp.FireFailureStatus = FireMsg.FireFailureStatus.Value;
|
|
|
|
FireMsgResp.FireFailureStatus01 = FireMsg.FireFailureStatus01.Value;
|
|
FireMsgResp.FireFailureStatus02 = FireMsg.FireFailureStatus02.Value;
|
|
FireMsgResp.FireFailureStatus03 = FireMsg.FireFailureStatus03.Value;
|
|
FireMsgResp.FireFailureStatus04 = FireMsg.FireFailureStatus04.Value;
|
|
FireMsgResp.FireFailureStatus05 = FireMsg.FireFailureStatus05.Value;
|
|
FireMsgResp.FireFailureStatus06 = FireMsg.FireFailureStatus06.Value;
|
|
FireMsgResp.FireFailureStatus07 = FireMsg.FireFailureStatus07.Value;
|
|
FireMsgResp.FireFailureStatus08 = FireMsg.FireFailureStatus08.Value;
|
|
FireMsgResp.FireFailureStatus09 = FireMsg.FireFailureStatus09.Value;
|
|
FireMsgResp.FireFailureStatus10 = FireMsg.FireFailureStatus10.Value;
|
|
FireMsgResp.FireFailureStatus11 = FireMsg.FireFailureStatus11.Value;
|
|
FireMsgResp.FireFailureStatus12 = FireMsg.FireFailureStatus12.Value;
|
|
FireMsgResp.FireFailureStatus13 = FireMsg.FireFailureStatus13.Value;
|
|
FireMsgResp.FireFailureStatus14 = FireMsg.FireFailureStatus14.Value;
|
|
FireMsgResp.FireFailureStatus15 = FireMsg.FireFailureStatus15.Value;
|
|
FireMsgResp.FireFailureStatus16 = FireMsg.FireFailureStatus16.Value;
|
|
|
|
FireMsgResp.FireStatus = FireMsg.FireStatus.Value;
|
|
FireMsgResp.FireStatus01 = FireMsg.FireStatus01.Value;
|
|
FireMsgResp.FireStatus02 = FireMsg.FireStatus02.Value;
|
|
FireMsgResp.FireStatus03 = FireMsg.FireStatus03.Value;
|
|
FireMsgResp.FireStatus04 = FireMsg.FireStatus04.Value;
|
|
FireMsgResp.FireStatus05 = FireMsg.FireStatus05.Value;
|
|
FireMsgResp.FireStatus06 = FireMsg.FireStatus06.Value;
|
|
FireMsgResp.FireStatus07 = FireMsg.FireStatus07.Value;
|
|
FireMsgResp.FireStatus08 = FireMsg.FireStatus08.Value;
|
|
FireMsgResp.FireStatus09 = FireMsg.FireStatus09.Value;
|
|
FireMsgResp.FireStatus10 = FireMsg.FireStatus10.Value;
|
|
FireMsgResp.FireStatus11 = FireMsg.FireStatus11.Value;
|
|
FireMsgResp.FireStatus12 = FireMsg.FireStatus12.Value;
|
|
FireMsgResp.FireStatus13 = FireMsg.FireStatus13.Value;
|
|
FireMsgResp.FireStatus14 = FireMsg.FireStatus14.Value;
|
|
FireMsgResp.FireStatus15 = FireMsg.FireStatus15.Value;
|
|
FireMsgResp.FireStatus16 = FireMsg.FireStatus16.Value;
|
|
|
|
FireMsgResp.KeyState = FireMsg.KeyState.Value;
|
|
FireMsgResp.KeyState01 = FireMsg.KeyState01.Value;
|
|
FireMsgResp.KeyState02 = FireMsg.KeyState02.Value;
|
|
FireMsgResp.KeyState03 = FireMsg.KeyState03.Value;
|
|
FireMsgResp.KeyState04 = FireMsg.KeyState04.Value;
|
|
FireMsgResp.KeyState05 = FireMsg.KeyState05.Value;
|
|
FireMsgResp.KeyState06 = FireMsg.KeyState06.Value;
|
|
FireMsgResp.KeyState07 = FireMsg.KeyState07.Value;
|
|
FireMsgResp.KeyState08 = FireMsg.KeyState08.Value;
|
|
FireMsgResp.KeyState09 = FireMsg.KeyState09.Value;
|
|
FireMsgResp.KeyState10 = FireMsg.KeyState10.Value;
|
|
FireMsgResp.KeyState11 = FireMsg.KeyState11.Value;
|
|
FireMsgResp.KeyState12 = FireMsg.KeyState12.Value;
|
|
FireMsgResp.KeyState13 = FireMsg.KeyState13.Value;
|
|
FireMsgResp.KeyState14 = FireMsg.KeyState14.Value;
|
|
FireMsgResp.KeyState15 = FireMsg.KeyState15.Value;
|
|
FireMsgResp.KeyState16 = FireMsg.KeyState16.Value;
|
|
|
|
FireMsgResp.DisplayState = FireMsg.DisplayState.Value;
|
|
FireMsgResp.DetectorNumber1 = FireMsg.DetectorNumber1.Value;
|
|
FireMsgResp.DetectorState1 = FireMsg.DetectorState1.Value;
|
|
FireMsgResp.AlarmLevel1 = FireMsg.AlarmLevel1.Value;
|
|
FireMsgResp.CarbonMonoxide1 = FireMsg.CarbonMonoxide1.Value;
|
|
FireMsgResp.TemperatureData1 = FireMsg.TemperatureData1.Value;
|
|
FireMsgResp.CarbonMonoxideData1 = FireMsg.CarbonMonoxideData1.Value;
|
|
FireMsgResp.VocData1 = FireMsg.VocData1.Value;
|
|
}
|
|
|
|
return FireMsgResp;
|
|
}
|
|
} |