Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
wangsixiang 9 months ago
parent
commit
74d9dfa6fc
  1. 18
      zc-business/src/main/java/com/zc/business/controller/NonAutomaticWarningController.java
  2. 2
      zc-business/src/main/java/com/zc/business/domain/DcInfoBoardVocabulary.java
  3. 58
      zc-business/src/main/java/com/zc/business/enums/WarningSubclassEnum.java
  4. 34
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

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

@ -117,22 +117,24 @@ 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");
String targetPicUrl = "https://10.0.81.28"+data.getString("targetPicUrl");
String targetPicUrl = "https://10.0.81.28" + data.getString("targetPicUrl");
String laneNo = data.getString("laneNo");
ArrayList<String> pictures = new ArrayList<>();
pictures.add(targetPicUrl);
JSONObject jsonObject = new JSONObject();
jsonObject.put("pictures",pictures);
jsonObject.put("pictures", pictures);
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);

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

@ -29,7 +29,7 @@ public class DcInfoBoardVocabulary
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@Excel(name = "创建时间")
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
public void setId(Long id)

58
zc-business/src/main/java/com/zc/business/enums/WarningSubclassEnum.java

@ -13,36 +13,36 @@ public enum WarningSubclassEnum {
TRAFFIC_JAM("1-1", "拥堵", "发生"),
SLOW_TRAFFIC("1-2", "缓行", "发生"),
REGULAR_PEDESTRIAN("2-1", "普通行人", "有行人:"),
STAFF_MEMBER("2-2", "工作人员", "有行人:"),
MOTORCYCLE("3-1", "摩托车", "非机动车"),
BICYCLE("3-2", "自行车","非机动车"),
THREE_WHEELER("3-3", "三轮车","非机动车"),
NON_CONSTRUCTION_VEHICLE("4-1", "非工程车", "非法停车:"),
CONSTRUCTION_VEHICLE("4-2", "工程车", "非法停车:"),
MAIN_ROAD_OCCUPIED("4-3", "主路有车", "非法停车:"),
RAMP_OCCUPIED("4-4", "匝道有车", "非法停车:"),
REGULAR_PEDESTRIAN("2-1", "普通行人", "发生行人"),
STAFF_MEMBER("2-2", "工作人员", "发生行人"),
MOTORCYCLE("3-1", "摩托车", "发生非机动车"),
BICYCLE("3-2", "自行车","发生非机动车"),
THREE_WHEELER("3-3", "三轮车","发生非机动车"),
NON_CONSTRUCTION_VEHICLE("4-1", "非工程车", "发生停车"),
CONSTRUCTION_VEHICLE("4-2", "工程车", "发生停车"),
MAIN_ROAD_OCCUPIED("4-3", "主路有车", "发生停车"),
RAMP_OCCUPIED("4-4", "匝道有车", "发生停车"),
VEHICLE_BREAKDOWN("4-5", "车辆故障", "发生"),
TRAFFIC_ACCIDENT("4-6", "交通事故", "发生"),
EMERGENCY_LANE_BLOCKED("4-7", "应急车道被占用", ""),
VEHICLE_EXIT_EMERGENCY_LANE("4-8", "车离开应急车道", ""),
OTHER_CONDITION("4-9", "其他", "非法停车:"),
REVERSING_OR_GOING_BACKWARDS("5-1", "倒车/逆行", "发"),
FIREWORKS("6-1", "烟火", ""),
DEBRIS_ON_ROAD("7-1", "撒落物", "发"),
RAIN("8-1", "雨", "异常天气"),
HAIL("8-2", "冰雹", "异常天气"),
WIND("8-3", "风", "异常天气"),
FOG("8-4", "雾", "异常天气"),
HIGH_TEMPERATURE("8-5", "高温", "异常天气"),
WATER_POOLING("8-6", "积水", "异常天气"),
SLIPPERY_ROAD_SURFACE("8-6", "路面湿滑", "异常天气"),
ICY_ROAD("8-8", "路面结冰", "异常天气"),
LOW_VISIBILITY("8-9", "道路能见度低", "异常天气"),
ROAD_FOG("8-10", "道路团雾", "异常天气"),
COLLISION_ONLY("9-1", "只碰撞不倾斜", "护栏碰撞"),
TILTED_WITHOUT_COLLISION("9-1", "只倾斜无碰撞", "护栏碰撞"),
COLLISION_AND_TILTED("9-3", "碰撞后倾斜", "护栏碰撞");
EMERGENCY_LANE_BLOCKED("4-7", "应急车道被占用", "发生"),
VEHICLE_EXIT_EMERGENCY_LANE("4-8", "车离开应急车道", "发生"),
OTHER_CONDITION("4-9", "其他", "发生停车"),
REVERSING_OR_GOING_BACKWARDS("5-1", "倒车/逆行", "发"),
FIREWORKS("6-1", "烟火", "发生"),
DEBRIS_ON_ROAD("7-1", "撒落物", "发生撒落物"),
RAIN("8-1", "雨", "发生异常天气"),
HAIL("8-2", "冰雹", "发生异常天气"),
WIND("8-3", "风", "发生异常天气"),
FOG("8-4", "雾", "发生异常天气"),
HIGH_TEMPERATURE("8-5", "高温", "发生异常天气"),
WATER_POOLING("8-6", "积水", "发生异常天气"),
SLIPPERY_ROAD_SURFACE("8-6", "路面湿滑", "发生异常天气"),
ICY_ROAD("8-8", "路面结冰", "发生异常天气"),
LOW_VISIBILITY("8-9", "道路能见度低", "发生异常天气"),
ROAD_FOG("8-10", "道路团雾", "发生异常天气"),
COLLISION_ONLY("9-1", "只碰撞不倾斜", "发生护栏碰撞"),
TILTED_WITHOUT_COLLISION("9-1", "只倾斜无碰撞", "发生护栏碰撞"),
COLLISION_AND_TILTED("9-3", "碰撞后倾斜", "发生护栏碰撞");
@Getter
private final String code;
@Getter
@ -66,7 +66,7 @@ public enum WarningSubclassEnum {
}
public String getDecorateInfo() {
return decorate + decorate;
return decorate + "(" + info + ")" + "事件";
}
public static String getDecorateInfo(String code) {

34
zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

@ -242,27 +242,33 @@
</select>
<select id="selectTollStationAnalysisByFacility" resultType="java.util.Map">
select
t2.facility_id facilityId,t3.facility_name facilityName,classify,
SUM(case when t2.classify = '6' then 1 else 0 end) facilityClose,
SUM(case when t2.classify = '7' then 1 else 0 end) facilityRestriction,
SUM(case when t2.classify = '9' then 1 else 0 end) facilityInterval
from dc_event t1
LEFT JOIN dc_event_traffic_control t2 on t1.id = t2.id
LEFT JOIN dc_facility t3 on t3.id = t2.facility_id
SELECT t1.id,t1.facility_name facilityName,IFNULL(t2.facilityClose,0) facilityClose,
IFNULL(t2.facilityInterval,0) facilityInterval,IFNULL(t2.facilityRestriction,0) facilityRestriction
from dc_facility t1
LEFT JOIN
(select
t2.facility_id facilityId,t3.facility_name facilityName,classify,
SUM(case when t2.classify = '6' then 1 else 0 end) facilityClose,
SUM(case when t2.classify = '7' then 1 else 0 end) facilityRestriction,
SUM(case when t2.classify = '9' then 1 else 0 end) facilityInterval
from dc_event t1
LEFT JOIN dc_event_traffic_control t2 on t1.id = t2.id
LEFT JOIN dc_facility t3 on t3.id = t2.facility_id
where
t1.event_type = '3' and t1.event_subclass = '3-2'
and date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
and (date_format(t1.end_time,'%Y-%m-%d %H:%i:%s') > date_format(#{startTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time))
and t2.classify in ('6','7','9')
GROUP BY t2.facility_id) t2 on t1.id = t2.facilityId
<where>
t1.event_type = '3' and t1.event_subclass = '3-2'
and date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
and (date_format(t1.end_time,'%Y-%m-%d %H:%i:%s') > date_format(#{startTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time))
and t2.classify in ('6','7','9')
t1.facility_type = '1'
<if test="facilityIdList != null and facilityIdList.length > 0">
AND t2.facility_id in
AND t1.id in
<foreach collection="facilityIdList" item="facilityId" open="(" separator="," close=")">
#{facilityId}
</foreach>
</if>
</where>
GROUP BY t2.facility_id
</select>
<select id="getTollStationAnalysis" resultType="java.util.Map">

Loading…
Cancel
Save