Browse Source

OA BUG修复

chenjun 6 tháng trước cách đây
mục cha
commit
d2e3452b85

+ 2 - 4
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/event/UseMoneyEvent.java

@@ -449,14 +449,13 @@ public class UseMoneyEvent extends BaseController {
             String flowInstanceId = flowInstance.get("id").toString();
             UseMoneyDO entity = useMoneyService.findByInstanceId(flowInstanceId);
             Project project = projectService.selectById(entity.getProjectId());
-            String xmjlId = project.getXmjlId();
             String userId = entity.getUserId();
             List<PostRespDTO> postList = postApi.getPostByUser(userId).getCheckedData();
             Set<String> postCodes = convertSet(postList, PostRespDTO::getCode);
             List<DeptRespDTO> deptChildList = deptApi.getChildDeptList(entity.getDeptId()).getCheckedData();
             Set<String> depts = convertSet(deptChildList, DeptRespDTO::getId);
             depts.add(entity.getDeptId());
-            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && userId.equals(xmjlId) && CollectionUtil.contains(depts, project.getZrbmId()) && userId.equals(xmjlId)) {
+            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && CollectionUtil.contains(depts, project.getZrbmId())) {
                 return "true";
             }
             return "false";
@@ -849,14 +848,13 @@ public class UseMoneyEvent extends BaseController {
             String flowInstanceId = flowInstance.get("id").toString();
             UseMoneyDO entity = useMoneyService.findByInstanceId(flowInstanceId);
             Project project = projectService.selectById(entity.getProjectId());
-            String xmjlId = project.getXmjlId();
             String userId = entity.getUserId();
             List<PostRespDTO> postList = postApi.getPostByUser(userId).getCheckedData();
             Set<String> postCodes = convertSet(postList, PostRespDTO::getCode);
             List<DeptRespDTO> deptChildList = deptApi.getChildDeptList(entity.getDeptId()).getCheckedData();
             Set<String> depts = convertSet(deptChildList, DeptRespDTO::getId);
             depts.add(entity.getDeptId());
-            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && userId.equals(xmjlId) && !CollectionUtil.contains(depts, project.getZrbmId())) {
+            if (entity != null && CollectionUtil.contains(postCodes, "fgslz") && !CollectionUtil.contains(depts, project.getZrbmId())) {
                 return "true";
             }
             return "false";

+ 6 - 3
zjugis-business/src/main/java/com/zjugis/business/service/impl/ContractServiceImpl.java

@@ -131,10 +131,13 @@ public class ContractServiceImpl implements ContractService{
             eq("parent_id", contract.getId());
             eq("contract_type", 4);
         }});
-        for(Contract child: childList){
-            child.setContractOff(contract.getContractOff());
+
+        if(childList.size()>0){
+            for(Contract child: childList){
+                child.setContractOff(contract.getContractOff());
+            }
+            contractMapper.updateBatch(childList);
         }
-        contractMapper.updateBatch(childList);
         ProjectAmount projectAmounts = projectAmountService.selectById(contract1.getProjectId());
         //更新PROJECT_AMOUNT表
         ProjectAmount projectAmount=new ProjectAmount();