diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 96cc9fb2d..1eb67e624 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -12024,7 +12024,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl piQueryWrap = new QueryWrapper<>(); piQueryWrap.lambda().in(ProcessInfoEO::getProjectLawsInventoryId,projectLawsInventoryIdList); - List piEoList = this.processInfoEOService.list(); + List piEoList = this.processInfoEOService.list(piQueryWrap); if(CollectionUtils.isNotEmpty(piEoList)){ if (StringUtils.isNotEmpty(designTransferUserId)) { @@ -12067,7 +12067,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl pidQueryWrap = new QueryWrapper<>(); pidQueryWrap.lambda().in(ProcessInfoDetailEO::getActiProcInstId,actiProcInstIdList); pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getStatus,TaskStatusEnum.NOT_DONE.getValue()); - pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKeyList); + pidQueryWrap.lambda().in(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKeyList); List pidEoList = this.processInfoDetailEOService.list(pidQueryWrap); if(CollectionUtils.isNotEmpty(pidEoList)){ @@ -12075,67 +12075,69 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl changeAssigneeBatchResult = this.workFlowFeignClient.changeAssigneeBatch(taskIds, designTransferUserId); + if (changeAssigneeBatchResult.isSuccess()) { + this.processInfoDetailEOService.updateBatchById(pidEoList); - for (ProcessInfoDetailEO pidEo : pidEoList) { - List piEoListTemp = piEoList.stream().filter(piEo -> { - boolean flag = false; - if (StringUtils.equals(piEo.getActiProcInstId(), pidEo.getActiProcInstId())) { - flag = true; - } - return flag; - }).collect(Collectors.toList()); - - if(CollectionUtils.isNotEmpty(piEoListTemp)){ - ProcessInfoEO piEoTemp = piEoListTemp.get(0); - String projectLawsInventoryId = piEoTemp.getProjectLawsInventoryId(); - - List pliEoListTemp = pliEoList.stream().filter(pliEo -> { + for (ProcessInfoDetailEO pidEo : pidEoList) { + List piEoListTemp = piEoList.stream().filter(piEo -> { boolean flag = false; - if (StringUtils.equals(pliEo.getId(), projectLawsInventoryId)) { + if (StringUtils.equals(piEo.getActiProcInstId(), pidEo.getActiProcInstId())) { flag = true; } return flag; }).collect(Collectors.toList()); - if(CollectionUtils.isNotEmpty(pliEoListTemp)){ - ProjectLawsInventoryEO pliEoTemp = pliEoListTemp.get(0); + if(CollectionUtils.isNotEmpty(piEoListTemp)){ + ProcessInfoEO piEoTemp = piEoListTemp.get(0); + String projectLawsInventoryId = piEoTemp.getProjectLawsInventoryId(); - Date endTime = null; - String contentCn = ""; - String contentEn = ""; - String templateId = ""; - String taskDefinitionKey = pidEo.getTaskDefinitionKey(); - if(StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.ZRRQR.getValue()) - || StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.DEZRRQR.getValue())){ - contentCn = "您好,请及时查看确认以下任务要求,谢谢!"; - contentEn = "Hello! Please check and confirm the following task requirement in a timely manner. Thank you!"; - templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(); - endTime = pliEoTemp.getDesignDutyDueDate(); - } else if(StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.ZRRTJJFW.getValue()) - || StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.DEZRRTJJFW.getValue())){ - contentCn = "您好,"+currentUser.getUsername()+"向您分发了该任务,请及时查看处理,谢谢!"; - contentEn = "Hello! "+currentUser.getUsername()+" has assigned the task to you. Please check and address it in a timely manner. Thank you!"; - templateId = TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(); - endTime = pliEoTemp.getDesignDueDate(); + List pliEoListTemp = pliEoList.stream().filter(pliEo -> { + boolean flag = false; + if (StringUtils.equals(pliEo.getId(), projectLawsInventoryId)) { + flag = true; + } + return flag; + }).collect(Collectors.toList()); + + if(CollectionUtils.isNotEmpty(pliEoListTemp)){ + ProjectLawsInventoryEO pliEoTemp = pliEoListTemp.get(0); + + String endTime = ""; + String contentCn = ""; + String contentEn = ""; + String templateId = ""; + String taskDefinitionKey = pidEo.getTaskDefinitionKey(); + if(StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.ZRRQR.getValue()) + || StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.DEZRRQR.getValue())){ + contentCn = "您好,请及时查看确认以下任务要求,谢谢!"; + contentEn = "Hello! Please check and confirm the following task requirement in a timely manner. Thank you!"; + templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(); + endTime = DateUtils.formatDate(pliEoTemp.getDesignDutyDueDate()); + } else if(StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.ZRRTJJFW.getValue()) + || StringUtils.equals(taskDefinitionKey,DesignComplianceFlowNodeKeyEnum.DEZRRTJJFW.getValue())){ + contentCn = "您好,"+currentUser.getUsername()+"向您分发了该任务,请及时查看处理,谢谢!"; + contentEn = "Hello! "+currentUser.getUsername()+" has assigned the task to you. Please check and address it in a timely manner. Thank you!"; + templateId = TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(); + endTime = DateUtils.formatDate(pliEoTemp.getDesignDueDate()); + } + + Map params = new HashMap<>(); + params.put("userIdList",Arrays.asList(designTransferUserId.split(","))); + params.put("projectLibraryId", projectLibraryId); + params.put("endTime", endTime); + params.put("serialNumbers", pliEoTemp.getSerialNumber()); + params.put("contentCn", contentCn); + params.put("contentEn", contentEn); + params.put("id",projectLawsInventoryId); + + JSONObject sendMsgJson = new JSONObject(); + sendMsgJson.put("requestSource",RequestSourceEnum.WORK_FLOW.getValue()); + sendMsgJson.put("operatorType",OperatorTypeEnum.SEND_MSG.getValue()); + sendMsgJson.put("templateId", templateId); + sendMsgJson.put("params", params); + this.processCall(sendMsgJson); } - - Map params = new HashMap<>(); - params.put("userIdList",Arrays.asList(designTransferUserId.split(","))); - params.put("projectLibraryId", projectLibraryId); - params.put("endTime", endTime); - params.put("serialNumbers", pliEoTemp.getSerialNumber()); - params.put("contentCn", contentCn); - params.put("contentEn", contentEn); - params.put("id",projectLawsInventoryId); - - JSONObject sendMsgJson = new JSONObject(); - sendMsgJson.put("requestSource",RequestSourceEnum.WORK_FLOW.getValue()); - sendMsgJson.put("operatorType",OperatorTypeEnum.SEND_MSG.getValue()); - sendMsgJson.put("templateId", templateId); - sendMsgJson.put("params", params); - this.processCall(sendMsgJson); } } } @@ -12178,67 +12180,69 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl changeAssigneeBatchResult = this.workFlowFeignClient.changeAssigneeBatch(taskIds,verifyTransferUserId); + if (changeAssigneeBatchResult.isSuccess()) { + this.processInfoDetailEOService.updateBatchById(pidEoList); - for (ProcessInfoDetailEO pidEo : pidEoList) { - List piEoListTemp = piEoList.stream().filter(piEo -> { - boolean flag = false; - if (StringUtils.equals(piEo.getActiProcInstId(), pidEo.getActiProcInstId())) { - flag = true; - } - return flag; - }).collect(Collectors.toList()); - - if(CollectionUtils.isNotEmpty(piEoListTemp)){ - ProcessInfoEO piEoTemp = piEoListTemp.get(0); - String projectLawsInventoryId = piEoTemp.getProjectLawsInventoryId(); - - List pliEoListTemp = pliEoList.stream().filter(pliEo -> { + for (ProcessInfoDetailEO pidEo : pidEoList) { + List piEoListTemp = piEoList.stream().filter(piEo -> { boolean flag = false; - if (StringUtils.equals(pliEo.getId(), projectLawsInventoryId)) { + if (StringUtils.equals(piEo.getActiProcInstId(), pidEo.getActiProcInstId())) { flag = true; } return flag; }).collect(Collectors.toList()); - if(CollectionUtils.isNotEmpty(pliEoListTemp)){ - ProjectLawsInventoryEO pliEoTemp = pliEoListTemp.get(0); + if(CollectionUtils.isNotEmpty(piEoListTemp)){ + ProcessInfoEO piEoTemp = piEoListTemp.get(0); + String projectLawsInventoryId = piEoTemp.getProjectLawsInventoryId(); - Date endTime = null; - String contentCn = ""; - String contentEn = ""; - String templateId = ""; - String taskDefinitionKey = pidEo.getTaskDefinitionKey(); - if(StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.ZRRQR.getValue()) - || StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.DEZRRQR.getValue())){ - contentCn = "您好,请及时查看确认以下任务要求,谢谢!"; - contentEn = "Hello! Please check and confirm the following task requirement in a timely manner. Thank you!"; - templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(); - endTime = pliEoTemp.getVerifyDutyDueDate(); - } else if(StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.ZRRTJJFW.getValue()) - || StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.DEZRRTJJFW.getValue())){ - contentCn = "您好,"+currentUser.getUsername()+"向您分发了该任务,请及时查看处理,谢谢!"; - contentEn = "Hello! "+currentUser.getUsername()+" has assigned the task to you. Please check and address it in a timely manner. Thank you!"; - templateId = TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(); - endTime = pliEoTemp.getVerifyDueDate(); + List pliEoListTemp = pliEoList.stream().filter(pliEo -> { + boolean flag = false; + if (StringUtils.equals(pliEo.getId(), projectLawsInventoryId)) { + flag = true; + } + return flag; + }).collect(Collectors.toList()); + + if(CollectionUtils.isNotEmpty(pliEoListTemp)){ + ProjectLawsInventoryEO pliEoTemp = pliEoListTemp.get(0); + + String endTime = ""; + String contentCn = ""; + String contentEn = ""; + String templateId = ""; + String taskDefinitionKey = pidEo.getTaskDefinitionKey(); + if(StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.ZRRQR.getValue()) + || StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.DEZRRQR.getValue())){ + contentCn = "您好,请及时查看确认以下任务要求,谢谢!"; + contentEn = "Hello! Please check and confirm the following task requirement in a timely manner. Thank you!"; + templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(); + endTime = DateUtils.formatDate(pliEoTemp.getVerifyDutyDueDate()); + } else if(StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.ZRRTJJFW.getValue()) + || StringUtils.equals(taskDefinitionKey,VerifyComplianceFlowNodeKeyEnum.DEZRRTJJFW.getValue())){ + contentCn = "您好,"+currentUser.getUsername()+"向您分发了该任务,请及时查看处理,谢谢!"; + contentEn = "Hello! "+currentUser.getUsername()+" has assigned the task to you. Please check and address it in a timely manner. Thank you!"; + templateId = TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(); + endTime = DateUtils.formatDate(pliEoTemp.getVerifyDueDate()); + } + + Map params = new HashMap<>(); + params.put("userIdList",Arrays.asList(verifyTransferUserId.split(","))); + params.put("projectLibraryId", projectLibraryId); + params.put("endTime", endTime); + params.put("serialNumbers", pliEoTemp.getSerialNumber()); + params.put("contentCn", contentCn); + params.put("contentEn", contentEn); + params.put("id",projectLawsInventoryId); + + JSONObject sendMsgJson = new JSONObject(); + sendMsgJson.put("requestSource",RequestSourceEnum.WORK_FLOW.getValue()); + sendMsgJson.put("operatorType",OperatorTypeEnum.SEND_MSG.getValue()); + sendMsgJson.put("templateId", templateId); + sendMsgJson.put("params", params); + this.processCall(sendMsgJson); } - - Map params = new HashMap<>(); - params.put("userIdList",Arrays.asList(verifyTransferUserId.split(","))); - params.put("projectLibraryId", projectLibraryId); - params.put("endTime", endTime); - params.put("serialNumbers", pliEoTemp.getSerialNumber()); - params.put("contentCn", contentCn); - params.put("contentEn", contentEn); - params.put("id",projectLawsInventoryId); - - JSONObject sendMsgJson = new JSONObject(); - sendMsgJson.put("requestSource",RequestSourceEnum.WORK_FLOW.getValue()); - sendMsgJson.put("operatorType",OperatorTypeEnum.SEND_MSG.getValue()); - sendMsgJson.put("templateId", templateId); - sendMsgJson.put("params", params); - this.processCall(sendMsgJson); } } }