diff --git a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java index 580440a6..48cbd239 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java @@ -245,14 +245,16 @@ public class DcWarningController extends BaseController List updatedList = list.stream() .peek(warningTable -> { - JSONObject otherConfig = JSONObject.parseObject(warningTable.getOtherConfig()); - String earlyWorningSignal = otherConfig.getString("earlyWorningSignal"); - String[] split = earlyWorningSignal.split(UniversalEnum.YJ_STRING.getValue()); - String content = WeatherTrafficProposeUtil.content( - Integer.parseInt(split[UniversalEnum.ONE.getNumber()]), - split[UniversalEnum.ZERO.getNumber()] - ); - warningTable.setWarningDescription(warningTable.getWarningDescription() + "\n" +content); + if ("2".equals(warningTable.getWarningType())) { + JSONObject otherConfig = JSONObject.parseObject(warningTable.getOtherConfig()); + String earlyWorningSignal = otherConfig.getString("earlyWorningSignal"); + String[] split = earlyWorningSignal.split(UniversalEnum.YJ_STRING.getValue()); + String content = WeatherTrafficProposeUtil.content( + Integer.parseInt(split[UniversalEnum.ONE.getNumber()]), + split[UniversalEnum.ZERO.getNumber()] + ); + warningTable.setWarningDescription(warningTable.getWarningDescription() + "\n" + content); + } }) .collect(Collectors.toList()); diff --git a/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java b/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java index ae28822f..6e88a959 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java @@ -21,7 +21,7 @@ public class DcNoStakeWarningTable { @Excel(name = "预警描述") private String warningDescription; @ApiModelProperty("预警类型") - @Excel(name = "预警类型", readConverterExp = "1=交通流预警,2=气象预警") + @Excel(name = "预警类型", readConverterExp = "1=交通流预警,2=气象预警,3=交通流异常预警") private String warningType; @ApiModelProperty("创建时间") @Excel(name = "创建时间")