From dff288710d57f56d2b21869fabc6c62abe464cbe Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Thu, 29 Aug 2024 23:26:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E9=A2=84=E8=AD=A6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/enumeration/WarningFlowTypeEnum.java | 11 +++--- .../model/enumeration/WarningNoticeTypeEnum.java | 4 +- .../task/EarlyWarningWithoutSubmitTask.java | 46 +++++++++++++++++----- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java index 98e6b25..78e1a9f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java @@ -1,6 +1,7 @@ package com.hz.pm.api.projectlib.model.enumeration; import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus; +import com.hz.pm.api.projectlib.model.enumeration.status.TenderMainStatus; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -21,11 +22,11 @@ public enum WarningFlowTypeEnum { /** * 预警填报类型枚举 */ - UNIT_INNER_AUDIT(1, "预审申报", null, "declareManage/planDeclaration/preExaminationDeclare"), - PRELIMINARY_PREVIEW(2, "建设方案申报", null, "declareManage/constructionPlanDeclare"), - WITHOUT_PURCHASE(3, "采购结果备案", ProjectStatus.TO_BE_PURCHASED, "declareManage/procurementRecord/purchaseResults"), - CONSTRUCTION_PLAN_REVIEW(4, "初验备案", null, "declareManage/acceptanceApply/initialInspectionRecord"), - PROJECT_FINAL_INSPECTION(5, "验收申报", ProjectStatus.ON_PILOT_RUNNING, "declareManage/acceptanceApply/finalInspectionDeclare"); + FUNDS_ISSUED_NOT_ESTABLISHED_PROJECT(1, "已资金下达未立项", ProjectStatus.DECLARED_APPROVED_TO_BE_RECORD, "project/declareManage/projectManages/projectFiling"), + APPROVED_PROJECT_BIT_NOT_OPEN(2, "已立项未开标", ProjectStatus.PROJECT_APPROVED, "project/declareManage/projectManages/purchaseResults"), + BIT_OPENED_NOT_PURCHASED(3, "已开标未采购", ProjectStatus.TO_BE_PURCHASED, "project/declareManage/projectManages/purchaseResults"), + PURCHASED_UNMODIFIED(4, "已采购未改造完成", ProjectStatus.ON_ADAPTING, "project/declareManage/projectManages/adaptiveTransformation"), + MODIFIED_NOT_FINAL_INSPECTION(5, "已改造完成未终验", ProjectStatus.ON_PILOT_RUNNING, "project/declareManage/projectManages/finalInspectionDeclare"); private Integer code; private String desc; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningNoticeTypeEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningNoticeTypeEnum.java index f46973c..8070100 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningNoticeTypeEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningNoticeTypeEnum.java @@ -20,8 +20,8 @@ public enum WarningNoticeTypeEnum { /** * 预警提醒类型枚举 */ - CONTACT(1, "项目联系人"), - RESPONSIBLE(2, "项目负责人"), + SUPER_ADMIN(1, "超级管理员"), + UNIT_ADMIN(2,"单位管理员"), NONE(0, "不通知"); private Integer code; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningWithoutSubmitTask.java b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningWithoutSubmitTask.java index 8cbc64e..dbac54c 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningWithoutSubmitTask.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningWithoutSubmitTask.java @@ -99,7 +99,7 @@ public class EarlyWarningWithoutSubmitTask { .eq(WflowEarlyWarning::getIsOpen, true); List warnings = earlyWarningService.list(query); for (WflowEarlyWarning warning : warnings) { - long mhUnitId = NumberUtil.parseLong(warning.getAreaCode()); + long mhUnitId = warning.getMhUnitId(); List viewUnitIds = mhUnitCache.getViewChildIdsRecursion(mhUnitId); String noticeContent = warning.getNoticeContent(); String adventContent = warning.getAdventContent(); @@ -123,7 +123,7 @@ public class EarlyWarningWithoutSubmitTask { String path = flowType.getPath(); //查询 所有这个区域的项目 未提交的项目 Wrapper projectQuery = Wrappers.lambdaQuery(Project.class) - .eq(Project::getBuildOrgCode, viewUnitIds) + .eq(Project::getBuildOrgCode, mhUnitId) .eq(Project::getNewest, Boolean.TRUE) .eq(Project::getStatus, flowType.getProjectStatus().getCode()); List needNextProjects = projectService.list(projectQuery); @@ -131,10 +131,36 @@ public class EarlyWarningWithoutSubmitTask { List projectCodes = CollUtils.fieldList(needNextProjects, Project::getProjectCode); Map projectStatusChangeMap; switch (flowType) { - case WITHOUT_PURCHASE: + // 已资金下达未立项 + case FUNDS_ISSUED_NOT_ESTABLISHED_PROJECT:{ + projectStatusChangeMap = projectStatusChangeService.listLastEventMap(projectCodes, + ProjectStateChangeEvent.ANNUAL_PLAN_PASS); + } + break; + // 已立项未开标 + case APPROVED_PROJECT_BIT_NOT_OPEN:{ projectStatusChangeMap = projectStatusChangeService.listLastEventMap(projectCodes, ProjectStateChangeEvent.DECLARED_RECORD_PASS); - break; + } + break; + // 已开标未采购 + case BIT_OPENED_NOT_PURCHASED:{ + projectStatusChangeMap = projectStatusChangeService.listLastEventMap(projectCodes, + ProjectStateChangeEvent.SUBMIT_PURCHASE_NOTICE); + } + break; + // 已采购未改造完成 + case PURCHASED_UNMODIFIED:{ + projectStatusChangeMap = projectStatusChangeService.listLastEventMap(projectCodes, + ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD); + } + break; + // 已改造完成未终验 + case MODIFIED_NOT_FINAL_INSPECTION:{ + projectStatusChangeMap = projectStatusChangeService.listLastEventMap(projectCodes, + ProjectStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM); + } + break; default: return; } @@ -170,9 +196,9 @@ public class EarlyWarningWithoutSubmitTask { for (Project needToWaringProject : needToWaringProjects) { String username; String mobile; - //去预警通知人 1.项目联系人 2.项目负责人 如果都包含 都要发 + //去预警通知人 1.超级管理员 2.单位管理员 如果都包含 都要发 List batchEmployees = Lists.newArrayList(); - if (notice.contains(WarningNoticeTypeEnum.CONTACT.getCode().toString())) { + if (notice.contains(WarningNoticeTypeEnum.SUPER_ADMIN.getCode().toString())) { String employeeCode = null; username = needToWaringProject.getContactName(); mobile = needToWaringProject.getContactPhone(); @@ -186,7 +212,7 @@ public class EarlyWarningWithoutSubmitTask { } } } - if (notice.contains(WarningNoticeTypeEnum.RESPONSIBLE.getCode().toString())) { + if (notice.contains(WarningNoticeTypeEnum.UNIT_ADMIN.getCode().toString())) { String employeeCode = null; username = needToWaringProject.getResponsibleMan(); mobile = needToWaringProject.getResponsibleManMobile(); @@ -349,9 +375,9 @@ public class EarlyWarningWithoutSubmitTask { String sponsor = needToWaringProject.getSponsor(); batchEmployees.add(sponsor); } else { - //去预警通知人 1.项目联系人 2.项目负责人 如果都包含 都要发 + //去预警通知人 1.超级管理员 2.单位管理员 如果都包含 都要发 - if (notice.contains(WarningNoticeTypeEnum.CONTACT.getCode().toString())) { + if (notice.contains(WarningNoticeTypeEnum.SUPER_ADMIN.getCode().toString())) { String employeeCode = null; String username = needToWaringProject.getContactName(); String mobile = needToWaringProject.getContactPhone(); @@ -365,7 +391,7 @@ public class EarlyWarningWithoutSubmitTask { } } } - if (notice.contains(WarningNoticeTypeEnum.RESPONSIBLE.getCode().toString())) { + if (notice.contains(WarningNoticeTypeEnum.UNIT_ADMIN.getCode().toString())) { String employeeCode = null; String username = needToWaringProject.getResponsibleMan(); String mobile = needToWaringProject.getResponsibleManMobile();