Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
cf6e117549
@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* NCC系统报警监测、通知服务
|
||||
@ -136,12 +137,14 @@ public class NccAlarmService {
|
||||
return defaultReason;
|
||||
}
|
||||
AtsAlarm atsAlarm = deviceFaultAlarm.get();
|
||||
MapElement element = repository.getByCode(atsAlarm.getCode());
|
||||
if (!StringUtils.hasText(atsAlarm.getDeviceCode())) {
|
||||
return defaultReason;
|
||||
}
|
||||
MapElement element = repository.findByCode(atsAlarm.getDeviceCode());
|
||||
if (!(element instanceof MayOutOfOrderDevice)) {
|
||||
return defaultReason;
|
||||
}
|
||||
MayOutOfOrderDevice device = repository.getByCode(atsAlarm.getDeviceCode(),
|
||||
MayOutOfOrderDevice.class);
|
||||
MayOutOfOrderDevice device = (MayOutOfOrderDevice) element;
|
||||
DeviceFault deviceFault = device.getFault();
|
||||
if (deviceFault == null) {
|
||||
return defaultReason;
|
||||
|
Loading…
Reference in New Issue
Block a user