Browse Source

事件 FacilityId() ==null判断

develop
王兴琳 6 months ago
parent
commit
4fe6e6e927
  1. 10
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

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

@ -170,6 +170,10 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]); String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);
dcEvent.setStakeMark(extracted(facilityId)); dcEvent.setStakeMark(extracted(facilityId));
} }
if (eventType == 3 && dcEvent.getDcEventTrafficControl().getFacilityId() != null && dcEvent.getDcEventTrafficControl().getFacilityId()>0) {
String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityId());
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()); String facilityId = String.valueOf(dcEvent.getDcEventTrafficCongestion().getFacilityId());
@ -219,6 +223,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
//交通管制 //交通管制
case 3: case 3:
if (dcEvent.getDcEventTrafficControl() != null) { if (dcEvent.getDcEventTrafficControl() != null) {
if (dcEvent.getDcEventTrafficControl().getFacilityId()==null || dcEvent.getDcEventTrafficControl().getFacilityId()>0){
dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
break;
}
// 插入多个收费站 // 插入多个收费站
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站 if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站
@ -352,6 +361,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
} }
} }
} }
break; break;
//交通拥堵 //交通拥堵

Loading…
Cancel
Save