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
         BeanUtil.copyProperties(bizLesFlowEditParam, bizLesFlow);
82
         BeanUtil.copyProperties(bizLesFlowEditParam, bizLesFlow);
83
         this.updateById(bizLesFlow);
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
         for(BizLesFlowLink bizLesFlowLink:bizLesFlow.getFlowLinkList()){
88
         for(BizLesFlowLink bizLesFlowLink:bizLesFlow.getFlowLinkList()){
89
             bizLesFlowLink.setLesFlowId(bizLesFlow.getId());
89
             bizLesFlowLink.setLesFlowId(bizLesFlow.getId());
90
             bizLesFlowLinkServiceImpl.save(bizLesFlowLink);
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
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
20
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
21
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
21
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
22
 import com.unis.lawEnforcementSupervision.modular.lesprocesslink.entity.BizLesProcessLink;
22
 import com.unis.lawEnforcementSupervision.modular.lesprocesslink.entity.BizLesProcessLink;
23
+import com.unis.lawEnforcementSupervision.modular.lesprocesslink.param.BizLesProcessLinkIdParam;
23
 import com.unis.lawEnforcementSupervision.modular.lesprocesslink.service.impl.BizLesProcessLinkServiceImpl;
24
 import com.unis.lawEnforcementSupervision.modular.lesprocesslink.service.impl.BizLesProcessLinkServiceImpl;
24
 import org.springframework.stereotype.Service;
25
 import org.springframework.stereotype.Service;
25
 import org.springframework.transaction.annotation.Transactional;
26
 import org.springframework.transaction.annotation.Transactional;
@@ -35,6 +36,7 @@ import com.unis.lawEnforcementSupervision.modular.lesprocess.param.BizLesProcess
35
 import com.unis.lawEnforcementSupervision.modular.lesprocess.service.BizLesProcessService;
36
 import com.unis.lawEnforcementSupervision.modular.lesprocess.service.BizLesProcessService;
36
 
37
 
37
 import javax.annotation.Resource;
38
 import javax.annotation.Resource;
39
+import java.util.ArrayList;
38
 import java.util.List;
40
 import java.util.List;
39
 
41
 
40
 /**
42
 /**
@@ -83,9 +85,9 @@ public class BizLesProcessServiceImpl extends ServiceImpl<BizLesProcessMapper, B
83
         BeanUtil.copyProperties(bizLesProcessEditParam, bizLesProcess);
85
         BeanUtil.copyProperties(bizLesProcessEditParam, bizLesProcess);
84
         this.updateById(bizLesProcess);
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
         for(BizLesProcessLink bizLesProcessLink:bizLesProcess.getProcessLinkList()){
91
         for(BizLesProcessLink bizLesProcessLink:bizLesProcess.getProcessLinkList()){
90
             bizLesProcessLink.setLesProcessId(bizLesProcess.getId());
92
             bizLesProcessLink.setLesProcessId(bizLesProcess.getId());
91
             bizLesProcessLinkServiceImpl.save(bizLesProcessLink);
93
             bizLesProcessLinkServiceImpl.save(bizLesProcessLink);