diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/TaskAffirmJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/TaskAffirmJob.java index d1befe3d5..3f5ab9dc5 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/TaskAffirmJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/TaskAffirmJob.java @@ -24,6 +24,7 @@ import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper; import com.jero.modules.project.service.IProjectLawsInventoryEOService; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.service.ISysUserService; +import com.jero.modules.wkflow.enums.FlowTypeEnum; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; @@ -109,7 +110,7 @@ public class TaskAffirmJob implements Job { List userIdList = Arrays.asList(designDutyId.split(",")); - Map sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList); + Map sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList, FlowTypeEnum.SJFHXSHLC.getValue()); // 三条后结束的 List threeDaysList = (List) sendMsgDataListMap.get("threeDaysList"); @@ -187,7 +188,7 @@ public class TaskAffirmJob implements Job { List userIdList = Arrays.asList(verifyDutyId.split(",")); - Map sendMsgDataListMap = this.disposeSendMsgDataList(verifyDutyDataList); + Map sendMsgDataListMap = this.disposeSendMsgDataList(verifyDutyDataList,FlowTypeEnum.YZFHXSCLC.getValue()); // 三条后结束的 List threeDaysList = (List) sendMsgDataListMap.get("threeDaysList"); @@ -482,7 +483,7 @@ public class TaskAffirmJob implements Job { log.info("任务确认流程,定时任务结束 ====================================================="); } - private Map disposeSendMsgDataList(List projectLawsInventoryEOList) { + private Map disposeSendMsgDataList(List projectLawsInventoryEOList,String flowType) { Map result = new HashMap<>(); Date currentDate = new Date(); String currentDateStr = sdf.format(currentDate); @@ -498,9 +499,17 @@ public class TaskAffirmJob implements Job { List currentDaysList = projectLawsInventoryEOList.stream().filter(data -> { boolean flag = false; //结束日期是当前日期 - if(data.getInventoryAffirmDueDate() != null){ - if (StringUtils.equals(currentDateStr, sdf.format(data.getInventoryAffirmDueDate()))) { - flag = true; + if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){ + if(data.getDesignDueDate() != null){ + if (StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate()))) { + flag = true; + } + } + }else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){ + if(data.getVerifyDueDate() != null){ + if (StringUtils.equals(currentDateStr, sdf.format(data.getVerifyDueDate()))) { + flag = true; + } } } return flag; @@ -509,9 +518,17 @@ public class TaskAffirmJob implements Job { // 三天后结束的 List threeDaysList = projectLawsInventoryEOList.stream().filter(data -> { boolean flag = false; - if(data.getInventoryAffirmDueDate() != null){ - if (StringUtils.equals(threeDaysStr, sdf.format(data.getInventoryAffirmDueDate()))) { - flag = true; + if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){ + if(data.getDesignDueDate() != null){ + if (StringUtils.equals(threeDaysStr, sdf.format(data.getDesignDueDate()))) { + flag = true; + } + } + }else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){ + if(data.getVerifyDueDate() != null){ + if (StringUtils.equals(threeDaysStr, sdf.format(data.getVerifyDueDate()))) { + flag = true; + } } } return flag; @@ -521,8 +538,14 @@ public class TaskAffirmJob implements Job { List overdueList = projectLawsInventoryEOList.stream().filter(data -> { // 只要早于当前日期都算逾期 不算当天。 boolean flag = false; - if(data.getInventoryAffirmDueDate() != null){ - flag = (data.getInventoryAffirmDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getInventoryAffirmDueDate()))); + if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){ + if(data.getDesignDueDate() != null){ + flag = (data.getDesignDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate()))); + } + }else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){ + if(data.getVerifyDueDate() != null){ + flag = (data.getVerifyDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getVerifyDueDate()))); + } } return flag; }).collect(Collectors.toList()); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java index fb8f2dda9..361be9a51 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java @@ -77,12 +77,9 @@ public class designComplianceJob implements Job { public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info("设计符合性确认流程,定时任务开启 ====================================================="); - // 查询出 任务待确认、结果待提交的数据 - List designFlowStatusList = new ArrayList<>(); - designFlowStatusList.add(ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()); - designFlowStatusList.add(ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()); + // 查询出 结果待提交的数据 QueryWrapper lawsInventoryEOQueryWrap = new QueryWrapper<>(); - lawsInventoryEOQueryWrap.lambda().in(ProjectLawsInventoryEO::getDesignFlowStatus,designFlowStatusList); + lawsInventoryEOQueryWrap.lambda().eq(ProjectLawsInventoryEO::getDesignFlowStatus,ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()); List projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryEOQueryWrap); if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){ // 根据项目进行分组 @@ -94,7 +91,6 @@ public class designComplianceJob implements Job { continue; } - // 设计符合性 Map> lawsInventoryByDesignDutyIdGroupMap = lawsInventoryListByProjectLibraryId.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getDesignDutyId)); for (Map.Entry> lawsInventoryByDesignDutyIdGroup : lawsInventoryByDesignDutyIdGroupMap.entrySet()) { String designDutyId = lawsInventoryByDesignDutyIdGroup.getKey(); @@ -107,27 +103,46 @@ public class designComplianceJob implements Job { Map sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList); - // 三条后结束的 - List threeDaysList = (List) sendMsgDataListMap.get("threeDaysList"); - if(CollectionUtils.isNotEmpty(threeDaysList)){ - Date designDueDate = threeDaysList.get(0).getDesignDueDate(); + // 十四天后结束的 + List fourteenDaysList = (List) sendMsgDataListMap.get("fourteenDaysList"); + if(CollectionUtils.isNotEmpty(fourteenDaysList)){ + Date designDueDate = fourteenDaysList.get(0).getDesignDueDate(); String endTime = ""; if(designDueDate != null){ endTime = DateUtils.formatDate(designDueDate); } - String serialNumbers = threeDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); - // 给法规工程师发消息 + String serialNumbers = fourteenDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); + // 给责任人发消息 Map params = new HashMap<>(); - params.put("contentCn","您好,以下待办任务距离截止日期仅剩3天,请及时查看处理。"); - params.put("contentEn","Hello! This task will expire in 3 days. Please check and address it in a timely manner. Thank you!"); + params.put("contentCn","您好,您的任务将于14天后结束,请及时查看处理。"); + params.put("contentEn","Hello! Your task will end in 14 days. Please check and address it in a timely manner. "); params.put("projectLibraryId",projectLibraryId); params.put("endTime",endTime); params.put("userIdList",userIdList); params.put("serialNumbers",serialNumbers); - params.put("flowTypeCn","设计符合性流程"); - params.put("flowTypeEn","Design Compliance Process"); - this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params); + this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params); } + + // 七天后结束的 + List sevenDaysList = (List) sendMsgDataListMap.get("sevenDaysList"); + if(CollectionUtils.isNotEmpty(sevenDaysList)){ + Date designDueDate = sevenDaysList.get(0).getDesignDueDate(); + String endTime = ""; + if(designDueDate != null){ + endTime = DateUtils.formatDate(designDueDate); + } + String serialNumbers = sevenDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); + // 给责任人发消息 + Map params = new HashMap<>(); + params.put("contentCn","您好,您的任务将于7天后结束,请及时查看处理。"); + params.put("contentEn","Hello! Your task will end in 7 days. Please check and address it in a timely manner. "); + params.put("projectLibraryId",projectLibraryId); + params.put("endTime",endTime); + params.put("userIdList",userIdList); + params.put("serialNumbers",serialNumbers); + this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params); + } + // 当天结束的 List currentDaysList = (List) sendMsgDataListMap.get("currentDaysList"); if(CollectionUtils.isNotEmpty(currentDaysList)){ @@ -139,15 +154,13 @@ public class designComplianceJob implements Job { String serialNumbers = currentDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); // 给法规工程师发消息 Map params = new HashMap<>(); - params.put("contentCn","您好,以下待办任务已到截止日期,请尽快查看处理。"); - params.put("contentEn","Hello! This task will expire today. Please check and address it ASAP. Thank you!"); + params.put("contentCn","您好,您的任务将于今天到期,请尽快查看处理。"); + params.put("contentEn","Hello! Your task will expire today. Please check and address it ASAP. "); params.put("projectLibraryId",projectLibraryId); params.put("endTime",endTime); params.put("userIdList",userIdList); params.put("serialNumbers",serialNumbers); - params.put("flowTypeCn","设计符合性流程"); - params.put("flowTypeEn","Design Compliance Process"); - this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params); + this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params); } // 逾期的 List overdueList = (List) sendMsgDataListMap.get("overdueList"); @@ -160,15 +173,13 @@ public class designComplianceJob implements Job { String serialNumbers = overdueList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); // 给法规工程师发消息 Map params = new HashMap<>(); - params.put("contentCn","您好,以下待办任务已逾期,请尽快处理。"); - params.put("contentEn","Hello! This task is overdue. Please address it ASAP. Thank you!"); + params.put("contentCn","您好,您的任务已逾期,请尽快查看处理。"); + params.put("contentEn","Hello! Your task is overdue. Please check and address it ASAP. "); params.put("projectLibraryId",projectLibraryId); params.put("endTime",endTime); params.put("userIdList",userIdList); params.put("serialNumbers",serialNumbers); - params.put("flowTypeCn","设计符合性流程"); - params.put("flowTypeEn","Design Compliance Process"); - this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION5.getValue(),params); + this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION3.getValue(),params); } } } @@ -516,7 +527,7 @@ public class designComplianceJob implements Job { }).collect(Collectors.toList()); // 七天后结束的 - List threeDaysList = projectLawsInventoryEOList.stream().filter(data -> { + List sevenDaysList = projectLawsInventoryEOList.stream().filter(data -> { boolean flag = false; if(data.getDesignDueDate() != null){ if (StringUtils.equals(sevenDaysStr, sdf.format(data.getDesignDueDate()))) { @@ -538,19 +549,35 @@ public class designComplianceJob implements Job { return flag; }).collect(Collectors.toList()); - // 逾期的 + // 逾期的 3天 7天 14天 List overdueList = projectLawsInventoryEOList.stream().filter(data -> { - // 只要早于当前日期都算逾期 不算当天。 - boolean flag = false; - if(data.getDesignDueDate() != null){ - flag = (data.getDesignDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate()))); - } + Calendar day3Later = new GregorianCalendar(); + day3Later.setTime(data.getDesignDueDate()); + day3Later.add(Calendar.DATE, 3); + Date overdue3Days = day3Later.getTime(); + + Calendar day7Later = new GregorianCalendar(); + day7Later.setTime(data.getDesignDueDate()); + day7Later.add(Calendar.DATE, 7); + Date overdue7Days = day7Later.getTime(); + + Calendar day14Later = new GregorianCalendar(); + day14Later.setTime(data.getDesignDueDate()); + day14Later.add(Calendar.DATE, 14); + Date overdue14Days = day14Later.getTime(); + + boolean flag = ( + StringUtils.equals(sdf.format(overdue3Days), sdf.format(currentDate)) + || StringUtils.equals(sdf.format(overdue7Days), sdf.format(currentDate)) + || StringUtils.equals(sdf.format(overdue14Days), sdf.format(currentDate)) + ); return flag; }).collect(Collectors.toList()); result.put("currentDaysList",currentDaysList); - result.put("threeDaysList",threeDaysList); + result.put("sevenDaysList",sevenDaysList); result.put("overdueList",overdueList); + result.put("fourteenDaysList",fourteenDaysList); return result; } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java index 9302162bf..e1645260d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java @@ -280,10 +280,10 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl + v-model="formInlineQuestion.expeditingType"> {{ item.name }} @@ -559,7 +559,7 @@ roleSwitchingList: [], formInlineQuestion: {}, rulesRoleQuestion: { - questionStatus: [ + expeditingType: [ { required: true, message: this.$t('expeditionProcess') + this.$t('cannotEmpty'), @@ -569,11 +569,11 @@ }, questionList: [ { - value: '1', + value: 'lawsInventoryDesignExpediting', name: this.$t('designComplianceProcess') }, { - value: '2', + value: 'lawsInventoryVerifyExpediting', name: this.$t('validationComplianceProcess') } ], @@ -1524,13 +1524,13 @@ handleOkQuestion() { this.$refs.ruleFormQuestion.validate(valid => { let formInlineQuestion = JSON.parse(JSON.stringify(this.formInlineQuestion)) - if (formInlineQuestion.questionStatus && formInlineQuestion.questionStatus.length > 0) { - formInlineQuestion.questionStatus = formInlineQuestion.questionStatus.join(',') + if (formInlineQuestion.expeditingType && formInlineQuestion.expeditingType.length > 0) { + formInlineQuestion.expeditingType = formInlineQuestion.expeditingType.join(',') } let query = { ids: this.questionIdList.join(','), projectLibraryId: this.$route.query.id, - questionStatus: formInlineQuestion.questionStatus + expeditingType: formInlineQuestion.expeditingType } this.confirmLoadingQuestion = true postAction('project/projectLawsInventoryEO/expediting', query).then((res) => { diff --git a/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue b/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue index 11d8fa6dd..5879a3959 100644 --- a/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue +++ b/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue @@ -326,14 +326,14 @@ { align: 'left', slots: { title: 'projectInterfacePersonRegulationEngineerSetting' }, - dataIndex: 'engineeringInterfacePersonName', + dataIndex: 'engineerLawSetName', ellipsis: true, width: 203 }, { align: 'left', slots: { title: 'projectInterfacePersonCertificationEngineerSetting' }, - dataIndex: 'engineeringInterfacePersonName', + dataIndex: 'engineerAttSetName', ellipsis: true, width: 203 }, diff --git a/jero-web/src/views/virtualAuthenticationList/components/codeNumber.vue b/jero-web/src/views/virtualAuthenticationList/components/codeNumber.vue index 60008065b..814f1c77c 100644 --- a/jero-web/src/views/virtualAuthenticationList/components/codeNumber.vue +++ b/jero-web/src/views/virtualAuthenticationList/components/codeNumber.vue @@ -50,9 +50,6 @@ - {{$t('query')}} {{$t('reset')}} @@ -103,14 +100,10 @@ \ No newline at end of file