gaodd 4 months ago
parent
commit
203492b276

+ 3 - 3
unis-plugin/unis-plugin-biz/src/main/java/com/unis/lawEnforcementSupervision/modular/lesflow/service/impl/BizLesFlowServiceImpl.java

@@ -82,9 +82,9 @@ public class BizLesFlowServiceImpl extends ServiceImpl<BizLesFlowMapper, BizLesF
82 82
         BeanUtil.copyProperties(bizLesFlowEditParam, bizLesFlow);
83 83
         this.updateById(bizLesFlow);
84 84
         //先删除 后新增
85
-        for(BizLesFlowLink bizLesFlowLink:bizLesFlow.getFlowLinkList()){
86
-            bizLesFlowLinkServiceImpl.removeById(bizLesFlowLink.getId());
87
-        }
85
+        QueryWrapper<BizLesFlowLink> queryWrapper = new QueryWrapper<>();
86
+        queryWrapper.eq("les_flow_id",bizLesFlow.getId());
87
+        bizLesFlowLinkServiceImpl.remove(queryWrapper);
88 88
         for(BizLesFlowLink bizLesFlowLink:bizLesFlow.getFlowLinkList()){
89 89
             bizLesFlowLink.setLesFlowId(bizLesFlow.getId());
90 90
             bizLesFlowLinkServiceImpl.save(bizLesFlowLink);

+ 5 - 3
unis-plugin/unis-plugin-biz/src/main/java/com/unis/lawEnforcementSupervision/modular/lesprocess/service/impl/BizLesProcessServiceImpl.java

@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
20 20
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
21 21
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
22 22
 import com.unis.lawEnforcementSupervision.modular.lesprocesslink.entity.BizLesProcessLink;
23
+import com.unis.lawEnforcementSupervision.modular.lesprocesslink.param.BizLesProcessLinkIdParam;
23 24
 import com.unis.lawEnforcementSupervision.modular.lesprocesslink.service.impl.BizLesProcessLinkServiceImpl;
24 25
 import org.springframework.stereotype.Service;
25 26
 import org.springframework.transaction.annotation.Transactional;
@@ -35,6 +36,7 @@ import com.unis.lawEnforcementSupervision.modular.lesprocess.param.BizLesProcess
35 36
 import com.unis.lawEnforcementSupervision.modular.lesprocess.service.BizLesProcessService;
36 37
 
37 38
 import javax.annotation.Resource;
39
+import java.util.ArrayList;
38 40
 import java.util.List;
39 41
 
40 42
 /**
@@ -83,9 +85,9 @@ public class BizLesProcessServiceImpl extends ServiceImpl<BizLesProcessMapper, B
83 85
         BeanUtil.copyProperties(bizLesProcessEditParam, bizLesProcess);
84 86
         this.updateById(bizLesProcess);
85 87
         //删除 新增
86
-        for(BizLesProcessLink bizLesProcessLink:bizLesProcess.getProcessLinkList()){
87
-            bizLesProcessLinkServiceImpl.removeById(bizLesProcessLink.getId());
88
-        }
88
+        QueryWrapper<BizLesProcessLink> queryWrapper = new QueryWrapper<>();
89
+        queryWrapper.eq("les_process_id",bizLesProcess.getId());
90
+        bizLesProcessLinkServiceImpl.remove(queryWrapper);
89 91
         for(BizLesProcessLink bizLesProcessLink:bizLesProcess.getProcessLinkList()){
90 92
             bizLesProcessLink.setLesProcessId(bizLesProcess.getId());
91 93
             bizLesProcessLinkServiceImpl.save(bizLesProcessLink);