Browse Source

交通流异常预警信息

develop
王兴琳 3 weeks ago
parent
commit
4c7270a764
  1. 18
      zc-business/src/main/java/com/zc/business/controller/DcWarningController.java
  2. 2
      zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java

18
zc-business/src/main/java/com/zc/business/controller/DcWarningController.java

@ -245,14 +245,16 @@ public class DcWarningController extends BaseController
List<DcNoStakeWarningTable> updatedList = list.stream() List<DcNoStakeWarningTable> updatedList = list.stream()
.peek(warningTable -> { .peek(warningTable -> {
JSONObject otherConfig = JSONObject.parseObject(warningTable.getOtherConfig()); if ("2".equals(warningTable.getWarningType())) {
String earlyWorningSignal = otherConfig.getString("earlyWorningSignal"); JSONObject otherConfig = JSONObject.parseObject(warningTable.getOtherConfig());
String[] split = earlyWorningSignal.split(UniversalEnum.YJ_STRING.getValue()); String earlyWorningSignal = otherConfig.getString("earlyWorningSignal");
String content = WeatherTrafficProposeUtil.content( String[] split = earlyWorningSignal.split(UniversalEnum.YJ_STRING.getValue());
Integer.parseInt(split[UniversalEnum.ONE.getNumber()]), String content = WeatherTrafficProposeUtil.content(
split[UniversalEnum.ZERO.getNumber()] Integer.parseInt(split[UniversalEnum.ONE.getNumber()]),
); split[UniversalEnum.ZERO.getNumber()]
warningTable.setWarningDescription(warningTable.getWarningDescription() + "\n" +content); );
warningTable.setWarningDescription(warningTable.getWarningDescription() + "\n" + content);
}
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());

2
zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java

@ -21,7 +21,7 @@ public class DcNoStakeWarningTable {
@Excel(name = "预警描述") @Excel(name = "预警描述")
private String warningDescription; private String warningDescription;
@ApiModelProperty("预警类型") @ApiModelProperty("预警类型")
@Excel(name = "预警类型", readConverterExp = "1=交通流预警,2=气象预警") @Excel(name = "预警类型", readConverterExp = "1=交通流预警,2=气象预警,3=交通流异常预警")
private String warningType; private String warningType;
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
@Excel(name = "创建时间") @Excel(name = "创建时间")

Loading…
Cancel
Save