|
|
@ -117,7 +117,7 @@ public class NonAutomaticWarningController extends BaseController { |
|
|
|
JSONObject event = JSONObject.parseObject(String.valueOf(item)); |
|
|
|
JSONObject data = event.getJSONObject("data"); |
|
|
|
Date happenTime = event.getDate("happenTime"); |
|
|
|
String srcName = event.getString("srcName").split("收费站")[1]; |
|
|
|
String srcName = event.getString("srcName").split("收费站")[0]; |
|
|
|
String illegalTrafficEvent = data.getString("illegalTrafficEvent"); |
|
|
|
String directionName = data.getString("directionName"); |
|
|
|
String crossingName = data.getString("crossingName"); |
|
|
@ -131,8 +131,10 @@ public class NonAutomaticWarningController extends BaseController { |
|
|
|
DcWarning dcWarning = new DcWarning(); |
|
|
|
dcWarning.setOtherConfig(String.valueOf(jsonObject)); |
|
|
|
dcWarning.setLane(laneNo); |
|
|
|
String warningType = ""; |
|
|
|
switch (illegalTrafficEvent) { |
|
|
|
case "congestion"://拥堵
|
|
|
|
warningType = "拥堵"; |
|
|
|
dcWarning.setWarningType(1); |
|
|
|
break; |
|
|
|
//case "laneChange"://变道
|
|
|
@ -148,6 +150,7 @@ public class NonAutomaticWarningController extends BaseController { |
|
|
|
// dcWarning.setWarningType();
|
|
|
|
// break;
|
|
|
|
case "llegalParking"://停车
|
|
|
|
warningType = "停车"; |
|
|
|
dcWarning.setWarningType(4); |
|
|
|
break; |
|
|
|
//case "crossLane"://压线
|
|
|
@ -157,22 +160,29 @@ public class NonAutomaticWarningController extends BaseController { |
|
|
|
// dcWarning.setWarningType();
|
|
|
|
// break;
|
|
|
|
case "wrongDirection"://逆行
|
|
|
|
warningType = "逆行"; |
|
|
|
dcWarning.setWarningType(5); |
|
|
|
break; |
|
|
|
case "pedestrian"://行人
|
|
|
|
warningType = "行人"; |
|
|
|
dcWarning.setWarningType(2); |
|
|
|
break; |
|
|
|
case "abandonedObject"://抛洒物
|
|
|
|
warningType = "抛洒物"; |
|
|
|
dcWarning.setWarningType(7); |
|
|
|
break; |
|
|
|
default://其他
|
|
|
|
warningType = "其他"; |
|
|
|
dcWarning.setWarningType(99); |
|
|
|
} |
|
|
|
String direction = ""; |
|
|
|
if (Objects.equals(directionName, "上行")) { |
|
|
|
direction = "菏泽方向"; |
|
|
|
dcWarning.setDirection("1"); |
|
|
|
} else if (Objects.equals(directionName, "中")) { |
|
|
|
dcWarning.setDirection("2"); |
|
|
|
} else if (Objects.equals(directionName, "下行")) { |
|
|
|
direction = "济南方向"; |
|
|
|
dcWarning.setDirection("3"); |
|
|
|
} |
|
|
|
dcWarning.setWarningTime(happenTime); |
|
|
@ -198,7 +208,7 @@ public class NonAutomaticWarningController extends BaseController { |
|
|
|
} else if (crossingName.startsWith("嘉祥")) { |
|
|
|
dcWarning.setStakeMark("k190+495"); |
|
|
|
} |
|
|
|
dcWarning.setWarningTitle(crossingName+srcName); |
|
|
|
dcWarning.setWarningTitle(srcName + "收费站" + direction + "发生" + warningType + "事件"); |
|
|
|
dcWarning.setWarningSource(6); |
|
|
|
dcWarning.setWarningState(1); |
|
|
|
dcWarningService.insertDcWarning(dcWarning); |
|
|
|