diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java index 8c1ec6fd..30a7abd9 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java @@ -197,11 +197,11 @@ public class DcEventServiceImpl extends ServiceImpl impl if (i7 > 0) { //if (dcEvent.getDcEventTrafficControl().getFacilityIds().length<1 &&dcEventId == null){//非 事件处置 和收费站等多条数据添加 -if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条数据添加 +/*if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条数据添加 //中间库 MdEvent mdEvent = new MdEvent(dcEvent); middleDatabaseService.insertMiddleDatabaseEvent(mdEvent); -} +}*/ switch (eventType) { //交通事故 case 1: @@ -237,9 +237,6 @@ if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条 dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());// }else { - //中间库 - MdEvent mdEvent = new MdEvent(dcEvent); - middleDatabaseService.insertMiddleDatabaseEvent(mdEvent); extracted(dcEvent);//事件推送到 首页 dcEvent.getDcEventTrafficControl().setId(uuid); @@ -304,10 +301,6 @@ if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条 dcEvent.setStakeMark(extracted(facilityId)); } dcEventMapper.insertDcEvent(dcEvent); - extracted(dcEvent); - //中间库 - MdEvent mdEvent = new MdEvent(dcEvent); - middleDatabaseService.insertMiddleDatabaseEvent(mdEvent); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); @@ -355,9 +348,6 @@ if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条 String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityIds()[i]); dcEvent.setStakeMark(extracted(facilityId)); } - //中间库 - MdEvent mdEvent = new MdEvent(dcEvent); - middleDatabaseService.insertMiddleDatabaseEvent(mdEvent); dcEventMapper.insertDcEvent(dcEvent); extracted(dcEvent); @@ -973,6 +963,10 @@ if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条 if (i > 0){ DcEvent dcEvent = dcEventMapper.selectDcEventById(id); + //中间库 + MdEvent mdEvent = new MdEvent(dcEvent); + middleDatabaseService.insertMiddleDatabaseEvent(mdEvent); + //事件处置流程记录 DcEventProcess dcEventProcess = new DcEventProcess(); dcEventProcess.setEventId(dcEvent.getId()); @@ -1029,7 +1023,7 @@ if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条 try { Date date = new Date(); date.setTime(Long.parseLong(result.getRight().toString())); - result.setRight(df.format(date));; + result.setRight(df.format(date)); } catch (Exception e){ e.printStackTrace(); } @@ -1399,6 +1393,13 @@ if (eventType !=3 &&dcEventId == null){//非 事件处置 和收费站等多条 boolean flag = dcEventMapper.completeEvent(eventId); if (flag){ + + //中间库 + MdEvent mdEvent = new MdEvent(); + mdEvent.setFusionId(eventId); + mdEvent.setEventStatus(2L); + middleDatabaseService.updateMiddleDatabaseEvent(mdEvent); + String datePoor = getDatePoor(new Date(),dcEvent.getStartTime()); //事件处置流程记录 diff --git a/zc-business/src/main/resources/mapper/business/MiddleDatabaseMapper.xml b/zc-business/src/main/resources/mapper/business/MiddleDatabaseMapper.xml index c4a5c588..1baa680b 100644 --- a/zc-business/src/main/resources/mapper/business/MiddleDatabaseMapper.xml +++ b/zc-business/src/main/resources/mapper/business/MiddleDatabaseMapper.xml @@ -355,7 +355,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update event - fusionId = #{fusionId}, event_name = #{eventName}, event_type_code = #{eventTypeCode}, event_desc = #{eventDesc}, @@ -392,7 +391,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" DeleterUserId = #{deleterUserId}, DeletionTime = #{deletionTime}, - where id = #{id} + where fusionId = #{fusionId}