This commit is contained in:
郭睿AMD7950X 2024-12-02 17:47:17 +08:00
parent 4c3d4f14ba
commit 5cf5a93d0a
2 changed files with 6 additions and 4 deletions

View File

@ -687,6 +687,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
return rst; return rst;
} }
} }
} }

View File

@ -892,9 +892,10 @@ namespace YunDa.ISAS.Application.GeneralInformation
[AbpAllowAnonymous] [AbpAllowAnonymous]
[HttpGet] [HttpGet]
[DisableAuditing] [DisableAuditing]
public RequestResult<AbnormalComponent> GetDeviceEventType(int deviceAddr,int eventCode)
public RequestResult<EquipmentInfoAbnormalComponent> GetDeviceEventType(int deviceAddr,int eventCode)
{ {
RequestResult <AbnormalComponent> rst= new RequestResult<AbnormalComponent>(); RequestResult <EquipmentInfoAbnormalComponent> rst= new RequestResult<EquipmentInfoAbnormalComponent>();
try try
{ {
var device = _imProtectDeviceRepository.GetAll().FirstOrDefault(t => t.DeviceAddr == deviceAddr); var device = _imProtectDeviceRepository.GetAll().FirstOrDefault(t => t.DeviceAddr == deviceAddr);
@ -903,11 +904,11 @@ namespace YunDa.ISAS.Application.GeneralInformation
var imEvent = _imEventTypeRepository.GetAll().FirstOrDefault(t=>t.Id == eventCode&&t.PuctgyCode == device.PuctgyCode); var imEvent = _imEventTypeRepository.GetAll().FirstOrDefault(t=>t.Id == eventCode&&t.PuctgyCode == device.PuctgyCode);
if (imEvent!=null) if (imEvent!=null)
{ {
AbnormalComponent abnormalComponent = new AbnormalComponent() EquipmentInfoAbnormalComponent abnormalComponent = new EquipmentInfoAbnormalComponent()
{ {
ComponentName = device.DeviceName, ComponentName = device.DeviceName,
AbnormalReason = imEvent.EvtName, AbnormalReason = imEvent.EvtName,
HandlingMeasures ="" HandlingMeasures ="",
}; };
rst.ResultData = abnormalComponent; rst.ResultData = abnormalComponent;
rst.Flag = true; rst.Flag = true;