|
@ -6,12 +6,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
import com.ruoyi.common.utils.SecurityUtils; |
|
|
import com.ruoyi.common.utils.SecurityUtils; |
|
|
import com.ruoyi.common.utils.StakeMarkUtils; |
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
import com.ruoyi.common.utils.uuid.IdUtils; |
|
|
import com.ruoyi.common.utils.uuid.IdUtils; |
|
|
import com.ruoyi.system.service.ISysDeptService; |
|
|
import com.ruoyi.system.service.ISysDeptService; |
|
|
import com.zc.business.domain.*; |
|
|
import com.zc.business.domain.*; |
|
|
import com.zc.business.enums.*; |
|
|
import com.zc.business.enums.EventSubclass; |
|
|
|
|
|
import com.zc.business.enums.EventSubclassEnum; |
|
|
|
|
|
import com.zc.business.enums.ValueConverter; |
|
|
import com.zc.business.mapper.*; |
|
|
import com.zc.business.mapper.*; |
|
|
import com.zc.business.service.IDcEventProcessService; |
|
|
import com.zc.business.service.IDcEventProcessService; |
|
|
import com.zc.business.service.IDcEventService; |
|
|
import com.zc.business.service.IDcEventService; |
|
@ -146,7 +147,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
//设置事件Id UUID无下划线格式32
|
|
|
//设置事件Id UUID无下划线格式32
|
|
|
String uuid = IdUtils.fastSimpleUUID(); |
|
|
String uuid = IdUtils.fastSimpleUUID(); |
|
|
dcEvent.setId(uuid); |
|
|
dcEvent.setId(uuid); |
|
|
|
|
|
if (dcEvent.getEventState() == null) { |
|
|
dcEvent.setEventState(0L); |
|
|
dcEvent.setEventState(0L); |
|
|
|
|
|
} |
|
|
//获取部门信息
|
|
|
//获取部门信息
|
|
|
dcEvent.setDeptId(SecurityUtils.getDeptId()); |
|
|
dcEvent.setDeptId(SecurityUtils.getDeptId()); |
|
|
//用户
|
|
|
//用户
|
|
@ -179,6 +182,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
String facilityId = String.valueOf(dcEvent.getDcEventTrafficCongestion().getFacilityId()); |
|
|
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()); |
|
|
String facilityId = String.valueOf(dcEvent.getDcEventConstruction().getFacilityId()); |
|
@ -223,11 +227,25 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
//交通管制
|
|
|
//交通管制
|
|
|
case 3: |
|
|
case 3: |
|
|
if (dcEvent.getDcEventTrafficControl() != null) { |
|
|
if (dcEvent.getDcEventTrafficControl() != null) { |
|
|
|
|
|
if (dcEventId == null) {//非首页进入
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityId() == null || dcEvent.getDcEventTrafficControl().getFacilityId() > 0) { |
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityId() == null || dcEvent.getDcEventTrafficControl().getFacilityId() > 0) { |
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//事件处置页
|
|
|
|
|
|
if (dcEvent.getEventState() == 1 && dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {//新增的数据不是收费站
|
|
|
|
|
|
updateDcEventState(dcEvent.getId(), dcEvent.getEventState().intValue()); |
|
|
|
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
|
|
DcEvent dcEvent1 = new DcEvent(); |
|
|
|
|
|
dcEvent1.setId(dcEventId);//事件id
|
|
|
|
|
|
dcEvent1.setEventNature(1l);//首发事件
|
|
|
|
|
|
dcEvent1.setLinkId(uuid);//关联管制事件id
|
|
|
|
|
|
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
|
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
// 插入多个收费站
|
|
|
// 插入多个收费站
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站
|
|
|
|
|
|
|
|
@ -325,7 +343,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
|
|
|
|
|
//新增第一条数据
|
|
|
//新增第一条数据
|
|
|
dcEvent.setId(map.get("facilityId" + i)); |
|
|
dcEvent.setId(map.get("facilityId" + i)); |
|
|
|
|
|
|
|
|
|
|
|
if (dcEvent.getEventState() == null) { |
|
|
dcEvent.setEventState(0L); |
|
|
dcEvent.setEventState(0L); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
dcEvent.setDeptId(SecurityUtils.getDeptId()); |
|
|
dcEvent.setDeptId(SecurityUtils.getDeptId()); |
|
|
dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
dcEvent.setCreateTime(DateUtils.getNowDate()); |
|
|
dcEvent.setCreateTime(DateUtils.getNowDate()); |
|
@ -346,7 +368,6 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
|
|
|
|
|
String linkId = sb.toString(); |
|
|
String linkId = sb.toString(); |
|
|
dcEvent.setLinkId(linkId); |
|
|
dcEvent.setLinkId(linkId); |
|
|
System.out.println(linkId); |
|
|
|
|
|
|
|
|
|
|
|
//交通管制
|
|
|
//交通管制
|
|
|
if (eventType == 3 && dcEvent.getDcEventTrafficControl().getFacilityIds()[i] != null) { |
|
|
if (eventType == 3 && dcEvent.getDcEventTrafficControl().getFacilityIds()[i] != null) { |
|
@ -354,8 +375,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dcEventMapper.insertDcEvent(dcEvent); |
|
|
dcEventMapper.insertDcEvent(dcEvent); |
|
|
extracted(dcEvent); |
|
|
extracted(dcEvent); |
|
|
|
|
|
//首页事件 交通管制事件 添加 状态默认为 1 处置中
|
|
|
|
|
|
updateDcEventState(dcEvent.getId(), dcEvent.getEventState().intValue()); |
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -718,7 +742,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
//事件方向
|
|
|
//事件方向
|
|
|
if (dcEvent.getDirection().equals("菏泽方向")) { |
|
|
if (dcEvent.getDirection().equals("菏泽方向")) { |
|
|
dcEvent.setDirection("1"); |
|
|
dcEvent.setDirection("1"); |
|
|
} if (dcEvent.getDirection().equals("济南方向")){ |
|
|
} |
|
|
|
|
|
if (dcEvent.getDirection().equals("济南方向")) { |
|
|
dcEvent.setDirection("3"); |
|
|
dcEvent.setDirection("3"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|