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; }