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 c18beb37..0e4fc7f0 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 @@ -160,6 +160,10 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.setCreateTime(DateUtils.getNowDate()); + if (eventType != 1 && eventType != 2){ + dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间 + } + //处理无桩号事件 //交通事故 if (eventType == 1 && dcEvent.getDcEventAccident().getFacilityId() != null) { @@ -384,6 +388,7 @@ public class DcEventServiceImpl extends ServiceImpl impl String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityIds()[i]); dcEvent.setStakeMark(extracted(facilityId)); } + dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间 dcEventMapper.insertDcEvent(dcEvent); //首页事件 交通管制事件 添加 状态默认为 1 处置中 updateDcEventState(map.get("facilityId" + i), 1); @@ -439,7 +444,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.setStakeMark(extracted(facilityId)); } - + dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间 dcEventMapper.insertDcEvent(dcEvent); extracted(dcEvent); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());