|
|
@ -1,16 +1,13 @@ |
|
|
|
package com.zc.business.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
import com.ruoyi.common.utils.SecurityUtils; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.ruoyi.common.utils.uuid.IdUtils; |
|
|
|
import com.ruoyi.system.service.ISysDeptService; |
|
|
|
import com.sun.xml.bind.v2.TODO; |
|
|
|
import com.zc.business.domain.*; |
|
|
|
import com.zc.business.enums.EventSubclassEnum; |
|
|
|
import com.zc.business.enums.ValueConverter; |
|
|
@ -21,8 +18,6 @@ import com.zc.business.service.IMiddleDatabaseService; |
|
|
|
import com.zc.business.utils.diff.Diff; |
|
|
|
import com.zc.business.utils.diff.model.Result; |
|
|
|
import com.zc.common.core.websocket.WebSocketService; |
|
|
|
import org.junit.Test; |
|
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -85,6 +80,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
private final String HAPPEN = "发生"; |
|
|
|
private final String EVENT = "事件"; |
|
|
|
private final String SUBEVENT = "0"; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询事件信息 |
|
|
|
* |
|
|
@ -138,8 +134,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
@Override |
|
|
|
public int insertDcEvent(DcEvent dcEvent) { |
|
|
|
|
|
|
|
String dcEventId =dcEvent.getId(); |
|
|
|
|
|
|
|
String dcEventId = dcEvent.getId(); |
|
|
|
|
|
|
|
|
|
|
|
//获取事件类型
|
|
|
@ -158,40 +153,40 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
|
|
|
|
//处理无桩号事件
|
|
|
|
//交通事故
|
|
|
|
if (eventType ==1&& dcEvent.getDcEventAccident().getFacilityId() != null) { |
|
|
|
if (eventType == 1 && dcEvent.getDcEventAccident().getFacilityId() != null) { |
|
|
|
String facilityId = String.valueOf(dcEvent.getDcEventAccident().getFacilityId()); |
|
|
|
dcEvent.setStakeMark( extracted(facilityId)); |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
//车辆事故
|
|
|
|
if (eventType ==2 && dcEvent.getDcEventVehicleAccident().getFacilityId() != null) { |
|
|
|
if (eventType == 2 && dcEvent.getDcEventVehicleAccident().getFacilityId() != null) { |
|
|
|
String facilityId = String.valueOf(dcEvent.getDcEventVehicleAccident().getFacilityId()); |
|
|
|
dcEvent.setStakeMark( extracted(facilityId)); |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
//交通管制
|
|
|
|
if (eventType ==3 && dcEvent.getDcEventTrafficControl().getFacilityIds() != null) { |
|
|
|
if (eventType == 3 && dcEvent.getDcEventTrafficControl().getFacilityIds() != null) { |
|
|
|
String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]); |
|
|
|
dcEvent.setStakeMark( extracted(facilityId)); |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
//交通拥堵
|
|
|
|
if (eventType ==4 && dcEvent.getDcEventTrafficCongestion().getFacilityId() != null) { |
|
|
|
if (eventType == 4 && dcEvent.getDcEventTrafficCongestion().getFacilityId() != null) { |
|
|
|
String facilityId = String.valueOf(dcEvent.getDcEventTrafficCongestion().getFacilityId()); |
|
|
|
dcEvent.setStakeMark( extracted(facilityId)); |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
//施工建设
|
|
|
|
if ( eventType ==7&& dcEvent.getDcEventConstruction().getFacilityId() != null) { |
|
|
|
if (eventType == 7 && dcEvent.getDcEventConstruction().getFacilityId() != null) { |
|
|
|
String facilityId = String.valueOf(dcEvent.getDcEventConstruction().getFacilityId()); |
|
|
|
dcEvent.setStakeMark( extracted(facilityId)); |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
//服务区异常
|
|
|
|
if (eventType ==8 && dcEvent.getDcEventServiceArea().getFacilityId() != null) { |
|
|
|
if (eventType == 8 && dcEvent.getDcEventServiceArea().getFacilityId() != null) { |
|
|
|
String facilityId = String.valueOf(dcEvent.getDcEventServiceArea().getFacilityId()); |
|
|
|
dcEvent.setStakeMark( extracted(facilityId)); |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int i7 = dcEventMapper.insertDcEvent(dcEvent); |
|
|
|
|
|
|
|
if (i7>0 && eventType != 3){ |
|
|
|
if (i7 > 0 && eventType != 3) { |
|
|
|
extracted(dcEvent);//事件推送到 首页
|
|
|
|
} |
|
|
|
if (i7 > 0) { |
|
|
@ -222,9 +217,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
case 3: |
|
|
|
if (dcEvent.getDcEventTrafficControl() != null) { |
|
|
|
//TODO 插入多个收费站
|
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length==1){//facilityIds==1 说明只选择了一个收费站
|
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站
|
|
|
|
|
|
|
|
if (dcEventId !=null){//不等于空 事件处置页面 修改
|
|
|
|
if (dcEventId != null) {//不等于空 事件处置页面 修改
|
|
|
|
dcEventMapper.deleteDcEventById(uuid);//删除添加的事件主类
|
|
|
|
DcEvent dcEvent1 = new DcEvent(); |
|
|
|
dcEvent1.setId(dcEventId);//事件id
|
|
|
@ -234,7 +229,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
|
dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id
|
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());//
|
|
|
|
}else { |
|
|
|
} else { |
|
|
|
extracted(dcEvent);//事件推送到 首页
|
|
|
|
|
|
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
@ -242,24 +237,24 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
} |
|
|
|
|
|
|
|
}else if (dcEvent.getDcEventTrafficControl().getFacilityIds().length>1){//facilityIds1=1 说明只选择了多个收费站
|
|
|
|
} else if (dcEvent.getDcEventTrafficControl().getFacilityIds().length > 1) {//facilityIds1=1 说明只选择了多个收费站
|
|
|
|
|
|
|
|
if (dcEventId !=null){//不等于空 事件处置页面 修改
|
|
|
|
if (dcEventId != null) {//不等于空 事件处置页面 修改
|
|
|
|
dcEventMapper.deleteDcEventById(uuid);//删除添加的事件主类
|
|
|
|
DcEvent dcEvent1 = new DcEvent(); |
|
|
|
dcEvent1.setId(dcEventId);//事件id
|
|
|
|
dcEvent1.setEventNature(1l);//首发事件
|
|
|
|
Map<String,String> map = new HashMap<>(); |
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
for (int i = 0; i < dcEvent.getDcEventTrafficControl().getFacilityIds().length; i++) { //设置事件Id UUID无下划线格式32
|
|
|
|
String facilityUUID = IdUtils.fastSimpleUUID(); |
|
|
|
map.put("facilityId"+i,facilityUUID);//每循环一次生成一个uuid
|
|
|
|
map.put("facilityId" + i, facilityUUID);//每循环一次生成一个uuid
|
|
|
|
} |
|
|
|
StringBuilder sb2 = new StringBuilder(); |
|
|
|
// 遍历map,
|
|
|
|
int a = 0; |
|
|
|
for (Map.Entry<String, String> entry : map.entrySet()) { |
|
|
|
sb2.append(entry.getValue()); |
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length-a !=1){ |
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length - a != 1) { |
|
|
|
sb2.append(","); |
|
|
|
} |
|
|
|
a++; |
|
|
@ -268,7 +263,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEvent1.setLinkId(linkId2);//关联管制事件id
|
|
|
|
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
|
|
|
|
for (int i = 0; i < dcEvent.getDcEventTrafficControl().getFacilityIds().length; i++) { |
|
|
|
dcEvent.getDcEventTrafficControl().setId(map.get("facilityId"+i));//交通管制事件id
|
|
|
|
dcEvent.getDcEventTrafficControl().setId(map.get("facilityId" + i));//交通管制事件id
|
|
|
|
dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[i]);//取出数组字段赋值 设施id
|
|
|
|
// 使用StringBuilder来构建逗号分隔的字符串
|
|
|
|
|
|
|
@ -303,13 +298,13 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
|
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
|
|
|
|
dcEventMapper.deleteDcEventById(uuid);//删除添加的事件主类
|
|
|
|
Map<String,String> map = new HashMap<>(); |
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
for (int i = 0; i < dcEvent.getDcEventTrafficControl().getFacilityIds().length; i++) { //设置事件Id UUID无下划线格式32
|
|
|
|
String facilityUUID = IdUtils.fastSimpleUUID(); |
|
|
|
map.put("facilityId"+i,facilityUUID);//每循环一次生成一个uuid
|
|
|
|
map.put("facilityId" + i, facilityUUID);//每循环一次生成一个uuid
|
|
|
|
} |
|
|
|
for (int i = 0; i < dcEvent.getDcEventTrafficControl().getFacilityIds().length; i++) { |
|
|
|
|
|
|
@ -411,26 +406,27 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
|
|
|
|
/** |
|
|
|
* 推送 事件信息 |
|
|
|
* |
|
|
|
* @param dcEvent |
|
|
|
*/ |
|
|
|
private void extracted(DcEvent dcEvent) { |
|
|
|
String direction = "";// 方向
|
|
|
|
String EventSubclass = "";// 事件类型
|
|
|
|
if (dcEvent.getDirection().equals("1")) { |
|
|
|
direction="菏泽方向"; |
|
|
|
}else { |
|
|
|
direction="济南方向"; |
|
|
|
direction = "菏泽方向"; |
|
|
|
} else { |
|
|
|
direction = "济南方向"; |
|
|
|
} |
|
|
|
for (EventSubclassEnum eventSubclass : EventSubclassEnum.values()) { |
|
|
|
if (eventSubclass.getCode().equals(dcEvent.getEventSubclass())) { |
|
|
|
EventSubclass=eventSubclass.getInfo(); |
|
|
|
EventSubclass = eventSubclass.getInfo(); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
String content= direction+" " + dcEvent.getStakeMark()+" "+HAPPEN+EventSubclass+EVENT ; |
|
|
|
Map<String,Object> contentMap = new HashMap<>(); |
|
|
|
contentMap.put("content",content); |
|
|
|
contentMap.put("event",dcEvent); |
|
|
|
String content = direction + " " + dcEvent.getStakeMark() + " " + HAPPEN + EventSubclass + EVENT; |
|
|
|
Map<String, Object> contentMap = new HashMap<>(); |
|
|
|
contentMap.put("content", content); |
|
|
|
contentMap.put("event", dcEvent); |
|
|
|
WebSocketService.broadcast(SUBEVENT, contentMap); //推送事件消息 0不是感知事件
|
|
|
|
} |
|
|
|
|
|
|
@ -529,7 +525,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEventProcess.setEventId(dcEvent.getId()); |
|
|
|
dcEventProcess.setSource(1); |
|
|
|
List<DcProcessConfig> processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(dcEvent.getEventType().intValue()); |
|
|
|
if (processConfigList != null && processConfigList.size() > 0){ |
|
|
|
if (processConfigList != null && processConfigList.size() > 0) { |
|
|
|
DcProcessConfig dcProcessConfig = processConfigList.get(0); |
|
|
|
dcEventProcess.setProcessType(1); |
|
|
|
dcEventProcess.setProcessId(Long.valueOf(dcProcessConfig.getNodeNode())); |
|
|
@ -547,12 +543,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param dcEventList |
|
|
|
* @return int |
|
|
|
* @Description 批量添加事件 |
|
|
|
* |
|
|
|
* @author liuwenge |
|
|
|
* @date 2024/3/18 8:42 |
|
|
|
* @param dcEventList |
|
|
|
* @return int |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public boolean batchInsertDcEventWarning(List<DcEvent> dcEventList) { |
|
|
@ -639,7 +634,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEventProcess.setEventId(dcEvent.getId()); |
|
|
|
dcEventProcess.setSource(1); |
|
|
|
List<DcProcessConfig> processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(dcEvent.getEventType().intValue()); |
|
|
|
if (processConfigList != null && processConfigList.size() > 0){ |
|
|
|
if (processConfigList != null && processConfigList.size() > 0) { |
|
|
|
DcProcessConfig dcProcessConfig = processConfigList.get(0); |
|
|
|
dcEventProcess.setProcessType(1); |
|
|
|
dcEventProcess.setProcessId(Long.valueOf(dcProcessConfig.getNodeNode())); |
|
|
@ -667,11 +662,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int updateDcEvent(DcEvent dcEvent) { |
|
|
|
DcEvent oldEvent = selectEventSubclassById(dcEvent.getEventType().intValue(),dcEvent.getId()); |
|
|
|
DcEvent oldEvent = selectEventSubclassById(dcEvent.getEventType().intValue(), dcEvent.getId()); |
|
|
|
dcEvent.setUpdateTime(DateUtils.getNowDate()); |
|
|
|
int i7 = dcEventMapper.updateDcEvent(dcEvent); |
|
|
|
if (i7 > 0) { |
|
|
|
String context = comparisonInfo(oldEvent,dcEvent); |
|
|
|
String context = comparisonInfo(oldEvent, dcEvent); |
|
|
|
//事件处置流程记录
|
|
|
|
DcEventProcess dcEventProcess = new DcEventProcess(); |
|
|
|
dcEventProcess.setEventId(dcEvent.getId()); |
|
|
@ -739,7 +734,6 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 批量删除事件信息 |
|
|
|
* |
|
|
@ -748,7 +742,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int deleteDcEventByIds(String[] ids) { |
|
|
|
int i7=-1; |
|
|
|
int i7 = -1; |
|
|
|
for (String id : ids) { |
|
|
|
DcEvent dcEvent = dcEventMapper.selectDcEventMainById(id); |
|
|
|
int eventType = Math.toIntExact(dcEvent.getEventType()); |
|
|
@ -958,9 +952,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
@Override |
|
|
|
public int updateDcEventState(String id, int state) { |
|
|
|
|
|
|
|
|
|
|
|
int i = dcEventMapper.updateDcEventState(id,state); |
|
|
|
if (i > 0){ |
|
|
|
int i = dcEventMapper.updateDcEventState(id, state); |
|
|
|
if (i > 0) { |
|
|
|
DcEvent dcEvent = dcEventMapper.selectDcEventMainById(id); |
|
|
|
|
|
|
|
//中间库
|
|
|
@ -972,7 +965,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEventProcess.setEventId(dcEvent.getId()); |
|
|
|
dcEventProcess.setSource(1); |
|
|
|
List<DcProcessConfig> processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(dcEvent.getEventType().intValue()); |
|
|
|
if (processConfigList != null && processConfigList.size() > 0){ |
|
|
|
if (processConfigList != null && processConfigList.size() > 0) { |
|
|
|
DcProcessConfig dcProcessConfig = processConfigList.get(0); |
|
|
|
dcEventProcess.setProcessType(1); |
|
|
|
dcEventProcess.setProcessId(Long.valueOf(dcProcessConfig.getNodeNode())); |
|
|
@ -998,147 +991,146 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 事件信息比对 |
|
|
|
* |
|
|
|
* @author liuwenge |
|
|
|
* @date 2024/4/10 16:24 |
|
|
|
* @param oldEvent 旧数据 |
|
|
|
* @param newEvent 新数据 |
|
|
|
* @return java.lang.String |
|
|
|
* @Description 事件信息比对 |
|
|
|
* @author liuwenge |
|
|
|
* @date 2024/4/10 16:24 |
|
|
|
*/ |
|
|
|
public String comparisonInfo(DcEvent oldEvent,DcEvent newEvent){ |
|
|
|
public String comparisonInfo(DcEvent oldEvent, DcEvent newEvent) { |
|
|
|
String context = ""; |
|
|
|
if (oldEvent == null || newEvent == null){ |
|
|
|
if (oldEvent == null || newEvent == null) { |
|
|
|
return context; |
|
|
|
} |
|
|
|
Diff diff = new Diff(); |
|
|
|
List<Result> diffList = diff.diff(JSON.toJSON(oldEvent).toString(),JSON.toJSON(newEvent).toString()); |
|
|
|
List<Result> diffList = diff.diff(JSON.toJSON(oldEvent).toString(), JSON.toJSON(newEvent).toString()); |
|
|
|
for (Result result : diffList) { |
|
|
|
if ("ADD".equals(result.getDiffType()) || "MODIFY".equals(result.getDiffType())){ |
|
|
|
if ("ADD".equals(result.getDiffType()) || "MODIFY".equals(result.getDiffType())) { |
|
|
|
if ("startTime".equals(result.getRightPath()) |
|
|
|
|| "endTime".equals(result.getRightPath()) |
|
|
|
|| "estimatedEndTime".equals(result.getRightPath()) |
|
|
|
|| "occurrenceTime".equals(result.getRightPath())){ |
|
|
|
|| "occurrenceTime".equals(result.getRightPath())) { |
|
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
try { |
|
|
|
Date date = new Date(); |
|
|
|
date.setTime(Long.parseLong(result.getRight().toString())); |
|
|
|
result.setRight(df.format(date)); |
|
|
|
} catch (Exception e){ |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} else if ("direction".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("direction".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("上行"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("中"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("下行"); |
|
|
|
} |
|
|
|
} else if ("eventState".equals(result.getRightPath())){ |
|
|
|
if ("0".equals(result.getRight())){ |
|
|
|
} else if ("eventState".equals(result.getRightPath())) { |
|
|
|
if ("0".equals(result.getRight())) { |
|
|
|
result.setRight("待确认"); |
|
|
|
} else if ("1".equals(result.getRight())){ |
|
|
|
} else if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("处理中"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("已完成"); |
|
|
|
} |
|
|
|
} else if ("eventSource".equals(result.getRightPath())){ |
|
|
|
} else if ("eventSource".equals(result.getRightPath())) { |
|
|
|
result.setRight(ValueConverter.eventSourceName(result.getRight().toString())); |
|
|
|
} else if ("lang".equals(result.getRightPath())){ |
|
|
|
} else if ("lang".equals(result.getRightPath())) { |
|
|
|
String langStr = ""; |
|
|
|
String langArr[] = result.getRight().toString().split(","); |
|
|
|
for (String lang : langArr) { |
|
|
|
if ("1".equals(lang)){ |
|
|
|
if ("1".equals(lang)) { |
|
|
|
langStr = langStr + "行1,"; |
|
|
|
} else if ("2".equals(lang)){ |
|
|
|
} else if ("2".equals(lang)) { |
|
|
|
langStr = langStr + "行2,"; |
|
|
|
} else if ("3".equals(lang)){ |
|
|
|
} else if ("3".equals(lang)) { |
|
|
|
langStr = langStr + "行3,"; |
|
|
|
} else if ("4".equals(lang)){ |
|
|
|
} else if ("4".equals(lang)) { |
|
|
|
langStr = langStr + "行4,"; |
|
|
|
} else if ("0".equals(lang)){ |
|
|
|
} else if ("0".equals(lang)) { |
|
|
|
langStr = langStr + "应急车道,"; |
|
|
|
} |
|
|
|
} |
|
|
|
if (langStr.length() > 0){ |
|
|
|
langStr = langStr.substring(0,langStr.length() -1); |
|
|
|
if (langStr.length() > 0) { |
|
|
|
langStr = langStr.substring(0, langStr.length() - 1); |
|
|
|
} |
|
|
|
result.setRight(langStr); |
|
|
|
} else if ("dcEventAbnormalWeather.weatherSituation".equals(result.getRightPath())){ |
|
|
|
if ("1-1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventAbnormalWeather.weatherSituation".equals(result.getRightPath())) { |
|
|
|
if ("1-1".equals(result.getRight())) { |
|
|
|
result.setRight("雨雾"); |
|
|
|
} else if ("1-2".equals(result.getRight())){ |
|
|
|
} else if ("1-2".equals(result.getRight())) { |
|
|
|
result.setRight("雨雪"); |
|
|
|
} else if ("1-3".equals(result.getRight())){ |
|
|
|
} else if ("1-3".equals(result.getRight())) { |
|
|
|
result.setRight("中雨"); |
|
|
|
} else if ("1-4".equals(result.getRight())){ |
|
|
|
} else if ("1-4".equals(result.getRight())) { |
|
|
|
result.setRight("小雨"); |
|
|
|
} else if ("1-5".equals(result.getRight())){ |
|
|
|
} else if ("1-5".equals(result.getRight())) { |
|
|
|
result.setRight("大雨"); |
|
|
|
} else if ("1-6".equals(result.getRight())){ |
|
|
|
} else if ("1-6".equals(result.getRight())) { |
|
|
|
result.setRight("暴雨"); |
|
|
|
} else if ("2-1".equals(result.getRight())){ |
|
|
|
} else if ("2-1".equals(result.getRight())) { |
|
|
|
result.setRight("小雪"); |
|
|
|
} else if ("2-2".equals(result.getRight())){ |
|
|
|
} else if ("2-2".equals(result.getRight())) { |
|
|
|
result.setRight("中雪"); |
|
|
|
} else if ("2-3".equals(result.getRight())){ |
|
|
|
} else if ("2-3".equals(result.getRight())) { |
|
|
|
result.setRight("大雪"); |
|
|
|
} else if ("2-4".equals(result.getRight())){ |
|
|
|
} else if ("2-4".equals(result.getRight())) { |
|
|
|
result.setRight("暴雪"); |
|
|
|
} else if ("2-5".equals(result.getRight())){ |
|
|
|
} else if ("2-5".equals(result.getRight())) { |
|
|
|
result.setRight("大暴雪"); |
|
|
|
} else if ("2-6".equals(result.getRight())){ |
|
|
|
} else if ("2-6".equals(result.getRight())) { |
|
|
|
result.setRight("特大暴雪"); |
|
|
|
} else if ("3-1".equals(result.getRight())){ |
|
|
|
} else if ("3-1".equals(result.getRight())) { |
|
|
|
result.setRight("轻雾"); |
|
|
|
} else if ("3-2".equals(result.getRight())){ |
|
|
|
} else if ("3-2".equals(result.getRight())) { |
|
|
|
result.setRight("大雾"); |
|
|
|
} else if ("3-3".equals(result.getRight())){ |
|
|
|
} else if ("3-3".equals(result.getRight())) { |
|
|
|
result.setRight("浓雾"); |
|
|
|
} else if ("3-4".equals(result.getRight())){ |
|
|
|
} else if ("3-4".equals(result.getRight())) { |
|
|
|
result.setRight("强浓雾"); |
|
|
|
} else if ("3-5".equals(result.getRight())){ |
|
|
|
} else if ("3-5".equals(result.getRight())) { |
|
|
|
result.setRight("团雾"); |
|
|
|
} |
|
|
|
} else if ("dcEventAbnormalWeather.emergencyLevel".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventAbnormalWeather.emergencyLevel".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("一般"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("紧急"); |
|
|
|
} |
|
|
|
} else if ("dcEventAccident.locationType".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventAccident.locationType".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("高速主线"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("服务区"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("立交桥"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("收费站"); |
|
|
|
} |
|
|
|
} else if ("dcEventAccident.weatherCondition".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventAccident.weatherCondition".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("晴"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("雨"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("雪"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("雾"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("其他"); |
|
|
|
} |
|
|
|
} else if ("dcEventAccident.impactLevel".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventAccident.impactLevel".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("无"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("危化品泄漏"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("整车自燃"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("车辆复燃"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("散装人工倒货"); |
|
|
|
} |
|
|
|
} else if ("dcEventAccident.isReverseCargo".equals(result.getRightPath()) |
|
|
@ -1150,199 +1142,199 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
|| "dcEventVehicleAccident.congestionAhead".equals(result.getRightPath()) |
|
|
|
|| "dcEventVehicleAccident.atIntersection".equals(result.getRightPath()) |
|
|
|
|| "dcEventVehicleAccident.onCurve".equals(result.getRightPath()) |
|
|
|
|| "dcEventVehicleAccident.isPrivate".equals(result.getRightPath())){ |
|
|
|
if ("0".equals(result.getRight())){ |
|
|
|
|| "dcEventVehicleAccident.isPrivate".equals(result.getRightPath())) { |
|
|
|
if ("0".equals(result.getRight())) { |
|
|
|
result.setRight("否"); |
|
|
|
} else if ("1".equals(result.getRight())){ |
|
|
|
} else if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("是"); |
|
|
|
} |
|
|
|
} else if ("dcEventConstruction.controlMode".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventConstruction.controlMode".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("封闭"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("不封闭"); |
|
|
|
} |
|
|
|
} else if ("dcEventConstruction.locationType".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventConstruction.locationType".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("单点"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("多点"); |
|
|
|
} |
|
|
|
} else if ("dcEventConstruction.specialConstruction".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventConstruction.specialConstruction".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("专项工程施工"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("改扩建专项工程施工"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("桥梁专项工程施工"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("其他专项工程施工"); |
|
|
|
} |
|
|
|
} else if ("dcEventConstruction.constructionMeasurement".equals(result.getRightPath())){ |
|
|
|
if ("0".equals(result.getRight())){ |
|
|
|
} else if ("dcEventConstruction.constructionMeasurement".equals(result.getRightPath())) { |
|
|
|
if ("0".equals(result.getRight())) { |
|
|
|
result.setRight("无"); |
|
|
|
} else if ("1".equals(result.getRight())){ |
|
|
|
} else if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("并道行驶"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("临时保通"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("借路侧服务区通行"); |
|
|
|
} |
|
|
|
} else if ("dcEventConstruction.exitsInlets".equals(result.getRightPath()) |
|
|
|
|| "dcEventServiceArea.exitsInlets".equals(result.getRightPath()) |
|
|
|
|| "dcEventTrafficControl.exitsInlets".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
|| "dcEventTrafficControl.exitsInlets".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("出口"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("入口"); |
|
|
|
} |
|
|
|
} else if ("dcEventConstruction.trafficCondition".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventConstruction.trafficCondition".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("通行正常"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("通行受阻"); |
|
|
|
} |
|
|
|
} else if ("dcEventServiceArea.disableFacility".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventServiceArea.disableFacility".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("卫生间"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("餐厅"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("停车场"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("加油站"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("充电桩"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficCongestion.congestionCause".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficCongestion.congestionCause".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("车流量大"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("交通事故"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("恶劣天气"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("施工"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("其他"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficCongestion.location".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficCongestion.location".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("入口"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("出口"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("入口内广场"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("出口内广场"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("外广场"); |
|
|
|
} else if ("6".equals(result.getRight())){ |
|
|
|
} else if ("6".equals(result.getRight())) { |
|
|
|
result.setRight("入口车道"); |
|
|
|
} else if ("7".equals(result.getRight())){ |
|
|
|
} else if ("7".equals(result.getRight())) { |
|
|
|
result.setRight("出口车道"); |
|
|
|
} else if ("8".equals(result.getRight())){ |
|
|
|
} else if ("8".equals(result.getRight())) { |
|
|
|
result.setRight("入口匝道"); |
|
|
|
} else if ("9".equals(result.getRight())){ |
|
|
|
} else if ("9".equals(result.getRight())) { |
|
|
|
result.setRight("出口匝道"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficCongestion.locationType".equals(result.getRightPath()) |
|
|
|
|| "dcEventVehicleAccident.locationType".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
|| "dcEventVehicleAccident.locationType".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("高速主线"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("服务区"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("立交桥"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("收费站"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficCongestion.weatherCondition".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficCongestion.weatherCondition".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("晴"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("雨"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("雪"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("雾"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("其他"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficControl.controlType".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficControl.controlType".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("封闭"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("限行"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficControl.controlCause".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficControl.controlCause".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("车流量大"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("交通事故"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("恶劣天气"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("施工"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("警备任务"); |
|
|
|
} else if ("6".equals(result.getRight())){ |
|
|
|
} else if ("6".equals(result.getRight())) { |
|
|
|
result.setRight("其他"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficControl.causeType".equals(result.getRightPath())){ |
|
|
|
if ("3-1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficControl.causeType".equals(result.getRightPath())) { |
|
|
|
if ("3-1".equals(result.getRight())) { |
|
|
|
result.setRight("雨"); |
|
|
|
} else if ("3-2".equals(result.getRight())){ |
|
|
|
} else if ("3-2".equals(result.getRight())) { |
|
|
|
result.setRight("雪"); |
|
|
|
} else if ("3-3".equals(result.getRight())){ |
|
|
|
} else if ("3-3".equals(result.getRight())) { |
|
|
|
result.setRight("雾"); |
|
|
|
} else if ("3-4".equals(result.getRight())){ |
|
|
|
} else if ("3-4".equals(result.getRight())) { |
|
|
|
result.setRight("道路积水"); |
|
|
|
} else if ("3-5".equals(result.getRight())){ |
|
|
|
} else if ("3-5".equals(result.getRight())) { |
|
|
|
result.setRight("道路湿滑"); |
|
|
|
} else if ("3-6".equals(result.getRight())){ |
|
|
|
} else if ("3-6".equals(result.getRight())) { |
|
|
|
result.setRight("道路结冰"); |
|
|
|
} else if ("3-7".equals(result.getRight())){ |
|
|
|
} else if ("3-7".equals(result.getRight())) { |
|
|
|
result.setRight("沙尘暴"); |
|
|
|
} else if ("4-1".equals(result.getRight())){ |
|
|
|
} else if ("4-1".equals(result.getRight())) { |
|
|
|
result.setRight("专项工程施工"); |
|
|
|
} else if ("4-2".equals(result.getRight())){ |
|
|
|
} else if ("4-2".equals(result.getRight())) { |
|
|
|
result.setRight("改扩建工程施工"); |
|
|
|
} else if ("4-3".equals(result.getRight())){ |
|
|
|
} else if ("4-3".equals(result.getRight())) { |
|
|
|
result.setRight("其他施工"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficControl.measure".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficControl.measure".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("临时关闭"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("限行车辆"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("限行车道"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("限行车道且限行车辆"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("间隔放行"); |
|
|
|
} else if ("6".equals(result.getRight())){ |
|
|
|
} else if ("6".equals(result.getRight())) { |
|
|
|
result.setRight("并道行驶"); |
|
|
|
} else if ("7".equals(result.getRight())){ |
|
|
|
} else if ("7".equals(result.getRight())) { |
|
|
|
result.setRight("限速"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficControl.classify".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficControl.classify".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("主线关闭"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("主线限行"); |
|
|
|
} else if ("3".equals(result.getRight())){ |
|
|
|
} else if ("3".equals(result.getRight())) { |
|
|
|
result.setRight("主线间隔放行"); |
|
|
|
} else if ("4".equals(result.getRight())){ |
|
|
|
} else if ("4".equals(result.getRight())) { |
|
|
|
result.setRight("主线并道"); |
|
|
|
} else if ("5".equals(result.getRight())){ |
|
|
|
} else if ("5".equals(result.getRight())) { |
|
|
|
result.setRight("主线限速"); |
|
|
|
} |
|
|
|
} else if ("dcEventTrafficControl.limitedType".equals(result.getRightPath())){ |
|
|
|
if ("1".equals(result.getRight())){ |
|
|
|
} else if ("dcEventTrafficControl.limitedType".equals(result.getRightPath())) { |
|
|
|
if ("1".equals(result.getRight())) { |
|
|
|
result.setRight("只允许"); |
|
|
|
} else if ("2".equals(result.getRight())){ |
|
|
|
} else if ("2".equals(result.getRight())) { |
|
|
|
result.setRight("禁止"); |
|
|
|
} |
|
|
|
} |
|
|
@ -1351,8 +1343,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (context.length() > 0){ |
|
|
|
context = context.substring(0,context.length() -1); |
|
|
|
if (context.length() > 0) { |
|
|
|
context = context.substring(0, context.length() - 1); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1361,37 +1353,35 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @param eventId 事件id |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
* @Description 查询事件流程状态 |
|
|
|
* |
|
|
|
* @author liuwenge |
|
|
|
* @date 2024/4/11 11:19 |
|
|
|
* @param eventId 事件id |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public AjaxResult getProcessNode(String eventId){ |
|
|
|
List<Map<String,Object>> processNode = dcEventMapper.getProcessNode(eventId); |
|
|
|
public AjaxResult getProcessNode(String eventId) { |
|
|
|
List<Map<String, Object>> processNode = dcEventMapper.getProcessNode(eventId); |
|
|
|
return AjaxResult.success(processNode); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param eventId |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
* @Description 解除事件 |
|
|
|
* |
|
|
|
* @author liuwenge |
|
|
|
* @date 2024/4/11 14:13 |
|
|
|
* @param eventId |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public AjaxResult completeEvent(String eventId){ |
|
|
|
public AjaxResult completeEvent(String eventId) { |
|
|
|
|
|
|
|
DcEvent dcEvent = dcEventMapper.selectDcEventById(eventId); |
|
|
|
if (dcEvent.getEventState() != null && dcEvent.getEventState().equals(2L)){ |
|
|
|
if (dcEvent.getEventState() != null && dcEvent.getEventState().equals(2L)) { |
|
|
|
return AjaxResult.error("事件已解除,无法进行操作!"); |
|
|
|
} |
|
|
|
|
|
|
|
boolean flag = dcEventMapper.completeEvent(eventId); |
|
|
|
if (flag){ |
|
|
|
if (flag) { |
|
|
|
|
|
|
|
|
|
|
|
//中间库
|
|
|
@ -1400,7 +1390,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
mdEvent.setEventStatus(2L); |
|
|
|
middleDatabaseService.updateMiddleDatabaseEvent(mdEvent); |
|
|
|
|
|
|
|
String datePoor = getDatePoor(new Date(),dcEvent.getStartTime()); |
|
|
|
String datePoor = getDatePoor(new Date(), dcEvent.getStartTime()); |
|
|
|
|
|
|
|
//事件处置流程记录
|
|
|
|
DcEventProcess dcEventProcess = new DcEventProcess(); |
|
|
@ -1415,18 +1405,17 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param eventId |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
* @Description 无需清障 |
|
|
|
* |
|
|
|
* @author liuwenge |
|
|
|
* @date 2024/4/11 14:13 |
|
|
|
* @param eventId |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public AjaxResult skipClear(String eventId){ |
|
|
|
public AjaxResult skipClear(String eventId) { |
|
|
|
|
|
|
|
int i = dcEventMapper.selectClearInfo(eventId); |
|
|
|
if (i > 0){ |
|
|
|
if (i > 0) { |
|
|
|
return AjaxResult.error("已跳过清障,无法重复操作!"); |
|
|
|
} |
|
|
|
|
|
|
|