Преглед изворни кода

填报预警修改

tags/24090101
CMM пре 2 месеци
родитељ
комит
dff288710d
3 измењених фајлова са 44 додато и 17 уклоњено
  1. +6
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java
  2. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningNoticeTypeEnum.java
  3. +36
    -10
      hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningWithoutSubmitTask.java

+ 6
- 5
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;


+ 2
- 2
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;


+ 36
- 10
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<WflowEarlyWarning> warnings = earlyWarningService.list(query);
for (WflowEarlyWarning warning : warnings) {
long mhUnitId = NumberUtil.parseLong(warning.getAreaCode());
long mhUnitId = warning.getMhUnitId();
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(mhUnitId);
String noticeContent = warning.getNoticeContent();
String adventContent = warning.getAdventContent();
@@ -123,7 +123,7 @@ public class EarlyWarningWithoutSubmitTask {
String path = flowType.getPath();
//查询 所有这个区域的项目 未提交的项目
Wrapper<Project> 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<Project> needNextProjects = projectService.list(projectQuery);
@@ -131,10 +131,36 @@ public class EarlyWarningWithoutSubmitTask {
List<String> projectCodes = CollUtils.fieldList(needNextProjects, Project::getProjectCode);
Map<String, ProjectStatusChange> 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<String> 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();


Loading…
Откажи
Сачувај