Browse Source

中间库事件新增修改

develop
lau572 7 months ago
parent
commit
e9bb1fa203
  1. 27
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  2. 3
      zc-business/src/main/resources/mapper/business/MiddleDatabaseMapper.xml

27
zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

@ -197,11 +197,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> 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());
//事件处置流程记录

3
zc-business/src/main/resources/mapper/business/MiddleDatabaseMapper.xml

@ -355,7 +355,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateMiddleDatabaseEvent" parameterType="MdEvent">
update event
<trim prefix="SET" suffixOverrides=",">
<if test="fusionId != null">fusionId = #{fusionId},</if>
<if test="eventName != null">event_name = #{eventName},</if>
<if test="eventTypeCode != null">event_type_code = #{eventTypeCode},</if>
<if test="eventDesc != null">event_desc = #{eventDesc},</if>
@ -392,7 +391,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleterUserId != null">DeleterUserId = #{deleterUserId},</if>
<if test="deletionTime != null">DeletionTime = #{deletionTime},</if>
</trim>
where id = #{id}
where fusionId = #{fusionId}
</update>

Loading…
Cancel
Save