Browse Source

修改预案修改校验

develop
Mr.Wang 4 months ago
parent
commit
9d79d7f5cc
  1. 3
      zc-business/src/main/java/com/zc/business/mapper/DcEmergencyPlansMapper.java
  2. 7
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

3
zc-business/src/main/java/com/zc/business/mapper/DcEmergencyPlansMapper.java

@ -1,7 +1,6 @@
package com.zc.business.mapper; package com.zc.business.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zc.business.domain.DcEmergencyPlans; import com.zc.business.domain.DcEmergencyPlans;
import com.zc.business.domain.DcEvent; import com.zc.business.domain.DcEvent;
@ -13,7 +12,7 @@ import java.util.List;
* @author wangjiabao * @author wangjiabao
* @date 2024-02-21 * @date 2024-02-21
*/ */
public interface DcEmergencyPlansMapper extends BaseMapper<DcEmergencyPlans> { public interface DcEmergencyPlansMapper{
/** /**
* 查询事件预案 * 查询事件预案

7
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) { public boolean parityBit(DcEmergencyPlans dcEmergencyPlans) {
List<DcEmergencyPlans> dcEmergencyPlansList = dcEmergencyPlansMapper.selectDcEmergencyPlansByOne(dcEmergencyPlans); List<DcEmergencyPlans> dcEmergencyPlansList = dcEmergencyPlansMapper.selectDcEmergencyPlansByOne(dcEmergencyPlans);
if (dcEmergencyPlans.getId() != null) {
// 修改操作
List<DcEmergencyPlans> collect = dcEmergencyPlansList.stream()
.filter(plan -> !plan.getId().equals(dcEmergencyPlans.getId()))
.collect(Collectors.toList());
return collect.size() > 0;
}
return dcEmergencyPlansList.size() > 0; return dcEmergencyPlansList.size() > 0;
} }

Loading…
Cancel
Save