This commit is contained in:
郭睿 2024-12-03 16:25:17 +08:00
commit cbda988e3a
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -892,9 +892,10 @@ namespace YunDa.ISAS.Application.GeneralInformation
[AbpAllowAnonymous]
[HttpGet]
[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
{
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);
if (imEvent!=null)
{
AbnormalComponent abnormalComponent = new AbnormalComponent()
EquipmentInfoAbnormalComponent abnormalComponent = new EquipmentInfoAbnormalComponent()
{
ComponentName = device.DeviceName,
AbnormalReason = imEvent.EvtName,
HandlingMeasures =""
HandlingMeasures ="",
};
rst.ResultData = abnormalComponent;
rst.Flag = true;