diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SuZhouPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SuZhouPlatformServiceImpl.java index 8ae20846b..ae399b10c 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SuZhouPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SuZhouPlatformServiceImpl.java @@ -157,23 +157,29 @@ public class SuZhouPlatformServiceImpl implements ThirdPartyPlatformService { String pileConnectorCode = dto.getPileConnectorCode(); String connectorStatus = dto.getConnectorStatus(); String alertCode = ""; + String faultReason = ""; String alertStatus = Constants.ZERO; if (!StringUtils.equals(connectorStatus, "255")) { // 如果不是故障,则告警状态要改为1-告警恢复 alertStatus = Constants.ONE; + alertCode = "120"; // 预留 + faultReason = "预留"; } // 通过枪口编号查询故障原因 String redisKey = CacheConstants.PILE_HARDWARE_FAULT + pileConnectorCode; - String faultReason = redisCache.getCacheObject(redisKey); + faultReason = redisCache.getCacheObject(redisKey); if (StringUtils.isBlank(faultReason)) { - // 未查到故障,告警状态也要改为1-告警恢复 + // 未查到故障,告警状态也要改为1-告警恢复,并且信息不能传空 alertStatus = Constants.ONE; + alertCode = "120"; // 预留 + faultReason = "预留"; }else { // 通过故障原因查询告警码 String alarmCodeByReason = PileErrorCodeAlarmEnum.getThirdPartyAlarmCodeByfaultReason(faultReason); if (StringUtils.isBlank(alarmCodeByReason)) { // 未找到对应故障码 alertCode = "120"; // 预留 + faultReason = "预留"; }else { alertCode = alarmCodeByReason; }