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()
.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());

2
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 = "创建时间")

Loading…
Cancel
Save