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 cd94b9d1..5451a5c4 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 @@ -264,7 +264,9 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent1.setId(dcEventId);//事件id if (dcEvent2.getEventType() != 3) { dcEvent1.setEventNature(1l);//首发事件 + dcEvent1.setLinkId(dcEvent2.getLinkId() + "," + uuid);//关联管制事件id + dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 } } @@ -282,7 +284,11 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent1.setId(dcEventId);//事件id if (dcEvent2.getEventType() != 3) { dcEvent1.setEventNature(1l);//首发事件 - dcEvent1.setLinkId(dcEvent2.getLinkId()+","+uuid);//关联管制事件id + if (dcEvent2.getLinkId()!=null) { + dcEvent1.setLinkId(dcEvent2.getLinkId()+","+uuid);//关联管制事件id + }else { + dcEvent1.setLinkId(uuid);//关联管制事件id + } dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 } @@ -327,7 +333,11 @@ public class DcEventServiceImpl extends ServiceImpl impl a++; } String linkId2 = sb2.toString(); - dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id + if (dcEvent2.getLinkId()!=null){ + dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id + }else { + dcEvent1.setLinkId(linkId2);//关联管制事件id + } if (dcEvent2.getEventType() != 3) { dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质