From 6863e41809fb91dd9a58055255267dfc4f490480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Thu, 30 May 2024 20:35:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E5=9B=A0=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/service/impl/DcEventServiceImpl.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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);//修改事件性质