From 9d79d7f5cc6f54eea687b2b9c96058b7fd39923c Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 26 Jul 2024 17:03:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=84=E6=A1=88=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/mapper/DcEmergencyPlansMapper.java | 3 +-- .../business/service/impl/DcEmergencyPlansServiceImpl.java | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcEmergencyPlansMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcEmergencyPlansMapper.java index 043ffe70..66ea7a01 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcEmergencyPlansMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcEmergencyPlansMapper.java @@ -1,7 +1,6 @@ package com.zc.business.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zc.business.domain.DcEmergencyPlans; import com.zc.business.domain.DcEvent; @@ -13,7 +12,7 @@ import java.util.List; * @author wangjiabao * @date 2024-02-21 */ -public interface DcEmergencyPlansMapper extends BaseMapper { +public interface DcEmergencyPlansMapper{ /** * 查询事件预案 diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java index 8bddf568..eacd8d8f 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java @@ -1425,6 +1425,13 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { */ public boolean parityBit(DcEmergencyPlans dcEmergencyPlans) { List dcEmergencyPlansList = dcEmergencyPlansMapper.selectDcEmergencyPlansByOne(dcEmergencyPlans); + if (dcEmergencyPlans.getId() != null) { + // 修改操作 + List collect = dcEmergencyPlansList.stream() + .filter(plan -> !plan.getId().equals(dcEmergencyPlans.getId())) + .collect(Collectors.toList()); + return collect.size() > 0; + } return dcEmergencyPlansList.size() > 0; }