@@ -2,28 +2,36 @@ package com.hz.pm.api.common.enumeration; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Getter; | |||
import lombok.NoArgsConstructor; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.util.Objects; | |||
/** | |||
* <p> | |||
* ProjectProcessStageEnum | |||
* </p> | |||
* | |||
* @author WendyYang | |||
* @since 14:25 2024/2/2 | |||
*/ | |||
@Getter | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
public enum ProjectProcessStageEnum { | |||
/** | |||
* 项目流程配置 阶段枚举 | |||
*/ | |||
ORG_INTERNAL_APPROVAL_PROCESS(1,"单位内部审批流程"), | |||
PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2,"项目预审审批流程"), | |||
DEPARTMENT_JOINT_APPROVAL_PROCESS(3,"部门联合审批流程"), | |||
CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4,"建设方案审批流程"), | |||
ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5,"验收申报审批流程"), | |||
APPLY_DELAY(6,"申请延期审批流程"), | |||
APPLY_BORROW(7,"申请借阅审批流程"); | |||
ORG_INTERNAL_APPROVAL_PROCESS(1, "单位内部审批流程"), | |||
PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2, "项目预审审批流程"), | |||
DEPARTMENT_JOINT_APPROVAL_PROCESS(3, "部门联合审批流程"), | |||
CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4, "建设方案审批流程"), | |||
PROJECT_RECORD_APPROVAL_PROCESS(8, "立项备案审批流程"), | |||
ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5, "验收申报审批流程"), | |||
APPLY_DELAY(6, "申请延期审批流程"), | |||
APPLY_BORROW(7, "申请借阅审批流程"); | |||
private Integer code; | |||
private String desc; | |||
private final Integer code; | |||
private final String desc; | |||
public static String getDesc(Integer code) { | |||
if (Objects.isNull(code)) { | |||
@@ -36,4 +44,5 @@ public enum ProjectProcessStageEnum { | |||
} | |||
return StringUtils.EMPTY; | |||
} | |||
} |
@@ -1,10 +1,11 @@ | |||
package com.hz.pm.api.common.statemachine.action; | |||
import cn.hutool.core.lang.Assert; | |||
import com.hz.pm.api.common.model.constant.StateMachineConst; | |||
import com.hz.pm.api.common.statemachine.builder.ProjectDeclareStateMachineBuilderImpl; | |||
import com.hz.pm.api.common.statemachine.builder.impl.ProjectDeclareStateMachineBuilderImpl; | |||
import com.hz.pm.api.common.statemachine.event.ProjectStatusChangeEvent; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.messaging.Message; | |||
import org.springframework.statemachine.annotation.OnTransition; | |||
@@ -12,7 +13,7 @@ import org.springframework.statemachine.annotation.WithStateMachine; | |||
/** | |||
* 项目申报状态机action集合类 | |||
* 市本级 | |||
* | |||
* @author CMM | |||
* @since 2023/02/08 13:48 | |||
*/ | |||
@@ -22,177 +23,213 @@ public class HzProjectDeclareAction { | |||
private static final String PROJECT_DECLARE = StateMachineConst.PROJECT_DECLARE; | |||
private Project getProject(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Assert.notNull(project, "未获取到需要状态变更的项目信息"); | |||
return project; | |||
} | |||
@OnTransition(source = "UNDER_INTERNAL_AUDIT", target = "PENDING_PREQUALIFICATION") | |||
public void UNDER_INTERNAL_PASS(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); | |||
} | |||
@OnTransition(source = "UNDER_INTERNAL_AUDIT", target = "UNDER_INTERNAL_AUDIT_NOT_PASS") | |||
public void UNDER_INTERNAL_REJECT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS.getCode()); | |||
} | |||
@OnTransition(source = "UNDER_INTERNAL_AUDIT", target = "TO_BE_DECLARED") | |||
public void UNDER_INTERNAL_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.TO_BE_DECLARED.getCode()); | |||
} | |||
@OnTransition(source = "UNDER_INTERNAL_AUDIT_NOT_PASS", target = "UNDER_INTERNAL_AUDIT") | |||
public void UNDER_INTERNAL_REJECT_RESUBMIT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||
} | |||
@OnTransition(source = "PENDING_PREQUALIFICATION", target = "PENDING_PREQUALIFICATION_CHOICE") | |||
public void PRELIMINARY_REVIEW_DECLARE(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE.getCode()); | |||
} | |||
@OnTransition(source = "PENDING_PREQUALIFICATION", target = "UNDER_INTERNAL_AUDIT") | |||
public void PENDING_PREQUALIFICATION_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||
} | |||
@OnTransition(source = "JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS", target = "JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS") | |||
public void PROVINCIAL_DEPARTMENT_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode()); | |||
} | |||
@OnTransition(source = "JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS", target = "PRE_APPLYING") | |||
public void PROVINCIAL_PASS_TO_PRELIMINARY_REVIEW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PRE_APPLYING.getCode()); | |||
} | |||
@OnTransition(source = "JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS", target = "THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED") | |||
public void PROVINCIAL_DEPARTMENT_REVIEW_REJECT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode()); | |||
} | |||
@OnTransition(source = "JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS", target = "PENDING_PREQUALIFICATION") | |||
public void JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); | |||
} | |||
@OnTransition(source = "PRE_APPLYING", target = "DEPARTMENT_JOINT_REVIEW") | |||
public void PRELIMINARY_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW.getCode()); | |||
} | |||
@OnTransition(source = "PRE_APPLYING", target = "PREQUALIFICATION_FAILED") | |||
public void PRELIMINARY_REVIEW_REJECT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode()); | |||
} | |||
@OnTransition(source = "PREQUALIFICATION_FAILED", target = "PENDING_PREQUALIFICATION_CHOICE") | |||
public void PRELIMINARY_REVIEW_REJECT_RESUBMIT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE.getCode()); | |||
} | |||
@OnTransition(source = "PRE_APPLYING", target = "PREQUALIFICATION_WITHDRAW_CHOICE") | |||
public void PRE_APPLYING_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PREQUALIFICATION_WITHDRAW_CHOICE.getCode()); | |||
} | |||
@OnTransition(source = "DEPARTMENT_JOINT_REVIEW", target = "IN_THE_ANNUAL_PLAN") | |||
public void DEPARTMENT_UNITED_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode()); | |||
} | |||
@OnTransition(source = "DEPARTMENT_JOINT_REVIEW", target = "DEPARTMENT_JOINT_REVIEW_FAILED") | |||
public void DEPARTMENT_UNITED_REVIEW_REJECT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW_FAILED.getCode()); | |||
} | |||
@OnTransition(source = "DEPARTMENT_JOINT_REVIEW", target = "PRE_APPLYING") | |||
public void DEPARTMENT_JOINT_REVIEW_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PRE_APPLYING.getCode()); | |||
} | |||
@OnTransition(source = "IN_THE_ANNUAL_PLAN", target = "PLAN_TO_BE_DECLARED") | |||
public void ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode()); | |||
} | |||
@OnTransition(source = "IN_THE_ANNUAL_PLAN", target = "BE_SUSPENDED") | |||
public void ANNUAL_PLAN_SUSPEND(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.BE_SUSPENDED.getCode()); | |||
} | |||
@OnTransition(source = "IN_THE_ANNUAL_PLAN", target = "DEPARTMENT_JOINT_REVIEW") | |||
public void IN_THE_ANNUAL_PLAN_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW.getCode()); | |||
} | |||
@OnTransition(source = "PLAN_TO_BE_DECLARED", target = "SCHEME_UNDER_REVIEW") | |||
public void DECLARE_PLAN(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); | |||
} | |||
@OnTransition(source = "PLAN_TO_BE_DECLARED", target = "IN_THE_ANNUAL_PLAN") | |||
public void PLAN_TO_DECLARE_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode()); | |||
} | |||
@OnTransition(source = "SCHEME_REVIEW_FAILED", target = "SCHEME_UNDER_REVIEW") | |||
public void DECLARE_PLAN_RESUBMIT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); | |||
} | |||
@OnTransition(source = "SCHEME_UNDER_REVIEW", target = "TO_BE_APPROVED") | |||
public void PLAN_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.TO_BE_APPROVED.getCode()); | |||
} | |||
@OnTransition(source = "SCHEME_UNDER_REVIEW", target = "SCHEME_REVIEW_FAILED") | |||
public void PLAN_REVIEW_REJECT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.SCHEME_REVIEW_FAILED.getCode()); | |||
} | |||
@OnTransition(source = "SCHEME_REVIEW_FAILED", target = "SCHEME_UNDER_REVIEW") | |||
public void PLAN_REVIEW_REJECT_RESUBMIT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); | |||
} | |||
@OnTransition(source = "SCHEME_UNDER_REVIEW", target = "PLAN_TO_BE_DECLARED") | |||
public void SCHEME_UNDER_REVIEW_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode()); | |||
} | |||
//================================================================================================================== | |||
@OnTransition(source = "DECLARED_APPROVED_TO_BE_RECORD", target = "DECLARED_APPROVED_RECORD_AUDITING") | |||
public void DECLARED_RECORD_SUBMIT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = getProject(message); | |||
// 待立项批复批复后,项目一级状态变更为已立项 | |||
project.setStatus(ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING.getCode()); | |||
} | |||
@OnTransition(source = "DECLARED_APPROVED_RECORD_FAILED", target = "DECLARED_APPROVED_RECORD_AUDITING") | |||
public void DECLARED_RECORD_RESUBMIT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING.getCode()); | |||
} | |||
@OnTransition(source = "DECLARED_APPROVED_RECORD_AUDITING", target = "TO_BE_PURCHASED") | |||
public void DECLARED_RECORD_PASS(Message<ProjectStatusChangeEvent> message) { | |||
Project project = getProject(message); | |||
// 待立项批复批复后,项目一级状态变更为已立项 | |||
project.setStage(ProjectStatusEnum.PROJECT_APPROVED.getCode()); | |||
project.setStatus(ProjectStatusEnum.TO_BE_PURCHASED.getCode()); | |||
} | |||
@OnTransition(source = "DECLARED_APPROVED_RECORD_AUDITING", target = "DECLARED_APPROVED_RECORD_FAILED") | |||
public void DECLARED_RECORD_FAILED(Message<ProjectStatusChangeEvent> message) { | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.DECLARED_APPROVED_RECORD_FAILED.getCode()); | |||
} | |||
//================================================================================================================== | |||
@OnTransition(source = "TO_BE_APPROVED", target = "TO_BE_PURCHASED") | |||
public void PROJECT_APPROVAL(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
// 待立项批复批复后,项目一级状态变更为已立项 | |||
project.setStage(ProjectStatusEnum.PROJECT_APPROVED.getCode()); | |||
project.setStatus(ProjectStatusEnum.TO_BE_PURCHASED.getCode()); | |||
@@ -200,25 +237,25 @@ public class HzProjectDeclareAction { | |||
@OnTransition(source = "TO_BE_APPROVED", target = "SCHEME_UNDER_REVIEW") | |||
public void TO_BE_APPROVED_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); | |||
} | |||
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") | |||
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.OPERATION.getCode()); | |||
} | |||
@OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") | |||
public void START_TO_WORK(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); | |||
} | |||
@OnTransition(source = "TO_BE_PURCHASED", target = "TO_BE_APPROVED") | |||
public void TO_BE_PURCHASED_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
// 待采购状态撤回后,项目一级状态回退到未立项 | |||
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||
project.setStatus(ProjectStatusEnum.TO_BE_APPROVED.getCode()); | |||
@@ -227,33 +264,33 @@ public class HzProjectDeclareAction { | |||
@OnTransition(source = "UNDER_CONSTRUCTION", target = "TO_BE_FINALLY_INSPECTED") | |||
public void PRELIMINARY_ACCEPTANCE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode()); | |||
} | |||
@OnTransition(source = "UNDER_CONSTRUCTION", target = "TO_BE_PURCHASED") | |||
public void UNDER_CONSTRUCTION_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.TO_BE_PURCHASED.getCode()); | |||
} | |||
@OnTransition(source = "TO_BE_FINALLY_INSPECTED", target = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW") | |||
public void FINAL_ACCEPTANCE_APPLICATION(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW.getCode()); | |||
} | |||
@OnTransition(source = "TO_BE_FINALLY_INSPECTED", target = "UNDER_CONSTRUCTION") | |||
public void TO_BE_FINALLY_INSPECTED_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); | |||
} | |||
@OnTransition(source = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW", target = "ARCHIVED") | |||
public void FINAL_ACCEPTANCE_PASS(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
// 终验审核通过后,项目一级状态变更为已归档 | |||
project.setStage(ProjectStatusEnum.ARCHIVED.getCode()); | |||
project.setStatus(ProjectStatusEnum.ACCEPTED.getCode()); | |||
@@ -261,19 +298,20 @@ public class HzProjectDeclareAction { | |||
@OnTransition(source = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW", target = "FINAL_ACCEPTANCE_REVIEW_FAILED") | |||
public void FINAL_ACCEPTANCE_REJECT(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.FINAL_ACCEPTANCE_REVIEW_FAILED.getCode()); | |||
} | |||
@OnTransition(source = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW", target = "TO_BE_FINALLY_INSPECTED") | |||
public void FINAL_ACCEPTANCE_IS_UNDER_REVIEW_WITHDRAW(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode()); | |||
} | |||
@OnTransition(source = "FINAL_ACCEPTANCE_REVIEW_FAILED", target = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW") | |||
public void FINAL_RE_ACCEPTANCE_APPLICATION(Message<ProjectStatusChangeEvent> message) { | |||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | |||
Project project = getProject(message); | |||
project.setStatus(ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW.getCode()); | |||
} | |||
} |
@@ -1,6 +1,7 @@ | |||
package com.hz.pm.api.common.statemachine.builder; | |||
package com.hz.pm.api.common.statemachine.builder.impl; | |||
import com.hz.pm.api.common.statemachine.action.ProjectDeclareChoiceAction; | |||
import com.hz.pm.api.common.statemachine.builder.ProjectDeclareStateMachineBuilder; | |||
import com.hz.pm.api.common.statemachine.event.ProjectStatusChangeEvent; | |||
import com.hz.pm.api.common.statemachine.factory.ProjectDeclareGuardFactory.PendingPreQualificationChoiceGuard; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
@@ -89,7 +90,6 @@ public class ProjectDeclareStateMachineBuilderImpl implements ProjectDeclareStat | |||
.source(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS) | |||
.target(ProjectStatusEnum.UNDER_INTERNAL_AUDIT) | |||
.event(ProjectStatusChangeEvent.UNDER_INTERNAL_REJECT_RESUBMIT).and() | |||
// 待预审预审申报,从待预审到待预审选择 | |||
.withExternal() | |||
.source(ProjectStatusEnum.PENDING_PREQUALIFICATION) | |||
@@ -203,6 +203,23 @@ public class ProjectDeclareStateMachineBuilderImpl implements ProjectDeclareStat | |||
.source(ProjectStatusEnum.SCHEME_REVIEW_FAILED) | |||
.target(ProjectStatusEnum.SCHEME_UNDER_REVIEW) | |||
.event(ProjectStatusChangeEvent.PLAN_REVIEW_REJECT_RESUBMIT).and() | |||
// 立项备案 | |||
.withExternal() | |||
.source(ProjectStatusEnum.DECLARED_APPROVED_TO_BE_RECORD) | |||
.target(ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING) | |||
.event(ProjectStatusChangeEvent.DECLARED_RECORD_SUBMIT).and() | |||
.withExternal() | |||
.source(ProjectStatusEnum.DECLARED_APPROVED_RECORD_FAILED) | |||
.target(ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING) | |||
.event(ProjectStatusChangeEvent.DECLARED_RECORD_RESUBMIT).and() | |||
.withExternal() | |||
.source(ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING) | |||
.target(ProjectStatusEnum.TO_BE_PURCHASED) | |||
.event(ProjectStatusChangeEvent.DECLARED_RECORD_PASS).and() | |||
.withExternal() | |||
.source(ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING) | |||
.source(ProjectStatusEnum.DECLARED_APPROVED_RECORD_FAILED) | |||
.event(ProjectStatusChangeEvent.DECLARED_RECORD_FAILED).and() | |||
// 待立项批复批复,从待立项批复到待采购 | |||
.withExternal() | |||
.source(ProjectStatusEnum.TO_BE_APPROVED) |
@@ -26,7 +26,7 @@ public enum ProjectStatusChangeEvent { | |||
/** | |||
* 项目申报提交(项目状态进入:单位内部审核中) | |||
*/ | |||
PROJECT_APPLICATION_SUBMIT( ProjectStatusEnum.TO_BE_DECLARED.getCode(), null, null), | |||
PROJECT_APPLICATION_SUBMIT(ProjectStatusEnum.TO_BE_DECLARED.getCode(), null, null), | |||
/** | |||
* 单位内部审核驳回(项目状态进入:单位内部审核不通过) | |||
*/ | |||
@@ -38,7 +38,7 @@ public enum ProjectStatusChangeEvent { | |||
/** | |||
* 单位内部审核不通过重新提交(项目状态进入:单位内部审核中) | |||
*/ | |||
UNDER_INTERNAL_REJECT_RESUBMIT(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS.getCode(),null,null), | |||
UNDER_INTERNAL_REJECT_RESUBMIT(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS.getCode(), null, null), | |||
/** | |||
* 预审申报(项目状态进入:待预审选择,有判断条件:市级项目且申报金额大于1000万项目状态变为:省级部门联审中;否则项目状态变为:预审中) | |||
@@ -64,7 +64,7 @@ public enum ProjectStatusChangeEvent { | |||
/** | |||
* 预审不通过重新提交(项目状态变为:待预审选择) | |||
*/ | |||
PRELIMINARY_REVIEW_REJECT_RESUBMIT(ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode(),null,null), | |||
PRELIMINARY_REVIEW_REJECT_RESUBMIT(ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode(), null, null), | |||
/** | |||
* 预审通过(项目状态变为:部门联审中) | |||
*/ | |||
@@ -88,7 +88,7 @@ public enum ProjectStatusChangeEvent { | |||
/** | |||
* 申报方案(项目状态变为:方案评审中) | |||
*/ | |||
DECLARE_PLAN( ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode(), null, null), | |||
DECLARE_PLAN(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode(), null, null), | |||
/** | |||
* 方案评审驳回(项目状态变为:方案评审不通过) | |||
*/ | |||
@@ -96,11 +96,36 @@ public enum ProjectStatusChangeEvent { | |||
/** | |||
* 方案评审不通过重新提交(项目状态变为:方案评审中) | |||
*/ | |||
PLAN_REVIEW_REJECT_RESUBMIT(ProjectStatusEnum.SCHEME_REVIEW_FAILED.getCode(),null,null), | |||
PLAN_REVIEW_REJECT_RESUBMIT(ProjectStatusEnum.SCHEME_REVIEW_FAILED.getCode(), null, null), | |||
/** | |||
* 方案评审通过(项目状态变为:待立项批复) | |||
*/ | |||
PLAN_REVIEW_PASS(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode(), null, null), | |||
//立项备案=========================================================================================================== | |||
/** | |||
* 立项备案提交 | |||
*/ | |||
DECLARED_RECORD_SUBMIT(ProjectStatusEnum.DECLARED_APPROVED_TO_BE_RECORD.getCode(), null, null), | |||
/** | |||
* 立项备案重新提交 | |||
*/ | |||
DECLARED_RECORD_RESUBMIT(ProjectStatusEnum.DECLARED_APPROVED_RECORD_FAILED.getCode(), null, null), | |||
/** | |||
* 立项备案通过 | |||
*/ | |||
DECLARED_RECORD_PASS(ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING.getCode(), null, null), | |||
/** | |||
* 立项备案不通过 | |||
*/ | |||
DECLARED_RECORD_FAILED(null, ProjectStatusEnum.DECLARED_APPROVED_RECORD_FAILED.getCode(), null), | |||
//================================================================================================================== | |||
/** | |||
* 立项批复(项目状态变为:已立项-待采购) | |||
*/ | |||
@@ -118,7 +143,7 @@ public enum ProjectStatusChangeEvent { | |||
/** | |||
* 开工 到建设中 | |||
*/ | |||
START_TO_WORK(ProjectStatusEnum.OPERATION.getCode(), null,null), | |||
START_TO_WORK(ProjectStatusEnum.OPERATION.getCode(), null, null), | |||
/** | |||
* 初验备案(项目状态变为:待终验) | |||
*/ | |||
@@ -30,7 +30,7 @@ import java.util.List; | |||
@RequiredArgsConstructor | |||
public class MhFileClient { | |||
private static final int TIMEOUT_MILLS = 5000; | |||
private static final int TIMEOUT_MILLS = 10000; | |||
@Value("${mh.file.down-url:}") | |||
private String fileDownUrl; | |||
@@ -43,7 +43,7 @@ public class MhFileClient { | |||
try (ServletOutputStream stream = response.getOutputStream()) { | |||
long size = HttpUtil.download(fileUrl, stream, true); | |||
log.info("下载文件:{},大小为:{}", fileId, size); | |||
} catch (IOException e) { | |||
} catch (Exception e) { | |||
log.error("信创平台文件下载异常:{}", fileId, e); | |||
throw BizException.wrap("下载文件失败"); | |||
} | |||
@@ -51,14 +51,18 @@ public class MhFileClient { | |||
public List<MhFileInfoDTO> listFileInfo(String fileIds) { | |||
String url = fileDetailUrl + "?ids=" + fileIds; | |||
String body = HttpUtil.get(url, TIMEOUT_MILLS); | |||
MhRetDTO<List<MhFileInfoDTO>> ret = JSONUtil.toBean(body, | |||
new TypeReference<MhRetDTO<List<MhFileInfoDTO>>>() { | |||
}, false); | |||
if (ret.isOk()) { | |||
return ret.getData(); | |||
try { | |||
String body = HttpUtil.get(url, TIMEOUT_MILLS); | |||
MhRetDTO<List<MhFileInfoDTO>> ret = JSONUtil.toBean(body, | |||
new TypeReference<MhRetDTO<List<MhFileInfoDTO>>>() { | |||
}, false); | |||
if (ret.isOk()) { | |||
return ret.getData(); | |||
} | |||
throw BizException.wrap("获取文件详情失败"); | |||
} catch (Exception e) { | |||
throw BizException.wrap("获取文件详情失败"); | |||
} | |||
throw BizException.wrap("获取文件详情"); | |||
} | |||
} |
@@ -50,7 +50,7 @@ import com.hz.pm.api.projectlib.service.IProjectInstService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConstant; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.hz.pm.api.user.helper.MhUnitCache; | |||
import com.hz.pm.api.user.model.dto.UnitDTO; | |||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | |||
@@ -277,7 +277,7 @@ public class ProjectFileManage { | |||
projectLibManage.saveProjectByApplyBorrow(project, user, instanceId); | |||
// 发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(project, model.getFormName(), instanceId, WorkNoticeConstant.PASS_MSG_TEMPLATE, | |||
noticeManage.sendFirstUser(project, model.getFormName(), instanceId, WorkNoticeConst.PASS_MSG_TEMPLATE, | |||
MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
@@ -2,6 +2,7 @@ package com.hz.pm.api.projectdeclared.controller; | |||
import javax.servlet.http.HttpServletResponse; | |||
import com.hz.pm.api.projectdeclared.model.enumerization.ProjectDraftTypeEnum; | |||
import com.ningdatech.log.annotation.WebLog; | |||
import com.hz.pm.api.gov.manage.GovProjectCollectionManage; | |||
import org.springframework.validation.annotation.Validated; | |||
@@ -52,13 +53,19 @@ public class DeclaredProjectController { | |||
@RequestParam(required = false) Integer pageSize, | |||
@RequestParam(required = false) Integer pageNumber, | |||
@RequestParam(required = false) String orgCode) { | |||
return declaredProjectManage.bizList(businessName,pageSize,pageNumber,orgCode); | |||
return declaredProjectManage.bizList(businessName, pageSize, pageNumber, orgCode); | |||
} | |||
@ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") | |||
@GetMapping("/draft") | |||
public PageVo<ProjectDraftVO> draft(@ModelAttribute DeclaredProjectListParamDTO params) { | |||
return declaredProjectManage.pageDraft(params); | |||
return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.PROJECT_DECLARED.getCode()); | |||
} | |||
@ApiOperation(value = "立项备案草稿箱列表", notes = "立项备案草稿箱列表") | |||
@GetMapping("/declaredRecord/draft") | |||
public PageVo<ProjectDraftVO> declaredRecordDraft(@ModelAttribute DeclaredProjectListParamDTO params) { | |||
return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.DECLARED_RECORD.getCode()); | |||
} | |||
@ApiOperation(value = "申报项目草稿箱详情", notes = "申报项目草稿箱详情") | |||
@@ -71,7 +78,14 @@ public class DeclaredProjectController { | |||
@WebLog("申报项目保存至草稿箱") | |||
@PostMapping("/save-to-draft") | |||
public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) { | |||
return declaredProjectManage.saveToDraft(dto); | |||
return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.PROJECT_DECLARED.getCode()); | |||
} | |||
@ApiOperation(value = "立项备案保存至草稿箱", notes = "立项备案保存至草稿箱") | |||
@WebLog("立项备案保存至草稿箱") | |||
@PostMapping("/declaredRecord/save-to-draft") | |||
public Object declaredRecordSaveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) { | |||
return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.DECLARED_RECORD.getCode()); | |||
} | |||
@ApiOperation(value = "申报项目", notes = "申报项目") | |||
@@ -92,14 +106,14 @@ public class DeclaredProjectController { | |||
@GetMapping("/export") | |||
@ApiOperation("申报项目列表导出") | |||
@WebLog("申报项目列表导出") | |||
public void exportList(ProjectListReq req, HttpServletResponse response){ | |||
ExcelDownUtil.downXls(response,req,declaredProjectManage::exportList); | |||
public void exportList(ProjectListReq req, HttpServletResponse response) { | |||
ExcelDownUtil.downXls(response, req, declaredProjectManage::exportList); | |||
} | |||
@PostMapping("/remove/{projectCode}") | |||
@ApiOperation("申报项目删除-预审失败") | |||
@WebLog("申报项目删除-预审失败") | |||
public String remove(@PathVariable String projectCode){ | |||
public String remove(@PathVariable String projectCode) { | |||
return declaredProjectManage.removeProject(projectCode); | |||
} | |||
} |
@@ -33,7 +33,7 @@ import com.hz.pm.api.projectlib.service.IProjectInstService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConstant; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.hz.pm.api.user.security.model.UserInfoDetails; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
import com.ningdatech.basic.exception.BizException; | |||
@@ -169,7 +169,7 @@ public class ConstructionPlanManage { | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(buildProject, model.getFormName(), instanceId, | |||
WorkNoticeConstant.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
@@ -2,6 +2,7 @@ package com.hz.pm.api.projectdeclared.manage; | |||
import cn.hutool.core.bean.BeanUtil; | |||
import cn.hutool.core.collection.CollUtil; | |||
import cn.hutool.core.util.StrUtil; | |||
import com.alibaba.excel.EasyExcel; | |||
import com.alibaba.fastjson.JSON; | |||
import com.alibaba.fastjson.JSONArray; | |||
@@ -44,7 +45,7 @@ import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConstant; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | |||
import com.hz.pm.api.user.security.model.UserInfoDetails; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
@@ -177,7 +178,7 @@ public class DeclaredProjectManage { | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(buildProject, model.getFormName(), instanceId, | |||
WorkNoticeConstant.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
@@ -191,7 +192,7 @@ public class DeclaredProjectManage { | |||
*/ | |||
@Transactional(rollbackFor = Exception.class) | |||
public String reStartTheProcess(DefaultDeclaredDTO dto) { | |||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | |||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||
ProjectDTO projectDto = dto.getProjectInfo(); | |||
projectDto.setBuildOrgCode(user.getMhUnitIdStr()); | |||
projectDto.setBuildOrgName(user.getMhUnitName()); | |||
@@ -254,16 +255,17 @@ public class DeclaredProjectManage { | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(buildProject, model.getFormName(), instanceId, | |||
WorkNoticeConstant.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
public PageVo<ProjectDraftVO> pageDraft(DeclaredProjectListParamDTO params) { | |||
public PageVo<ProjectDraftVO> pageDraft(DeclaredProjectListParamDTO params, Integer draftType) { | |||
Long userId = LoginUserUtil.getUserId(); | |||
Page<ProjectDraft> page = params.page(); | |||
LambdaQueryWrapper<ProjectDraft> wrapper = Wrappers.lambdaQuery(ProjectDraft.class) | |||
.eq(ProjectDraft::getUserId, userId) | |||
.eq(ProjectDraft::getDraftType, draftType) | |||
.ge(Objects.nonNull(params.getStartTime()), ProjectDraft::getCreateOn, params.getStartTime()) | |||
.le(Objects.nonNull(params.getEndTime()), ProjectDraft::getCreateOn, params.getEndTime()) | |||
.eq(Objects.nonNull(params.getProjectType()), ProjectDraft::getProjectType, params.getProjectType()) | |||
@@ -290,10 +292,10 @@ public class DeclaredProjectManage { | |||
ProjectDraftVO vo = new ProjectDraftVO(); | |||
BeanUtils.copyProperties(draft, vo); | |||
vo.setBizDomain(Objects.nonNull(draft.getBizDomain()) ? String.valueOf(draft.getBizDomain()) : StringUtils.EMPTY); | |||
if (StringUtils.isNotBlank(draft.getProjectApplicationList())) { | |||
if (StrUtil.isNotBlank(draft.getProjectApplicationList())) { | |||
vo.setApplicationList(JSON.parseArray(draft.getProjectApplicationList(), ProjectApplication.class)); | |||
} | |||
if (StringUtils.isNotBlank(draft.getDynamicForm())) { | |||
if (StrUtil.isNotBlank(draft.getDynamicForm())) { | |||
vo.setDynamicForm(JSON.parseObject(draft.getDynamicForm(), Map.class)); | |||
} | |||
return vo; | |||
@@ -302,10 +304,10 @@ public class DeclaredProjectManage { | |||
/** | |||
* 保存至草稿箱 | |||
* | |||
* @param dto | |||
* @return | |||
* @param dto \ | |||
* @return \ | |||
*/ | |||
public Long saveToDraft(ProjectDraftSaveDTO dto) { | |||
public Long saveToDraft(ProjectDraftSaveDTO dto, Integer draftType) { | |||
Long userId = LoginUserUtil.getUserId(); | |||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | |||
@@ -333,6 +335,7 @@ public class DeclaredProjectManage { | |||
draft.setCreateOn(LocalDateTime.now()); | |||
} | |||
} | |||
draft.setDraftType(draftType); | |||
draft.setUpdateOn(LocalDateTime.now()); | |||
draft.setUserId(String.valueOf(userId)); | |||
projectDraftService.saveOrUpdate(draft); | |||
@@ -119,9 +119,9 @@ public class DefaultDeclaredProjectManage { | |||
BigDecimal annualOwnSuperAmount = projectInfo.getAnnualPlanGovOwnFinanceAmount(); | |||
BigDecimal annualBankLendingAmount = projectInfo.getAnnualPlanBankLendingAmount(); | |||
BigDecimal annualHaveAmount = projectInfo.getAnnualPlanHaveAmount(); | |||
BigDecimal anualOtherAmount = projectInfo.getAnnualPlanOtherAmount(); | |||
BigDecimal annualOtherAmount = projectInfo.getAnnualPlanOtherAmount(); | |||
BigDecimal totalAnnual = annualGovSuperAmount | |||
.add(annualOwnSuperAmount).add(annualBankLendingAmount).add(annualHaveAmount).add(anualOtherAmount); | |||
.add(annualOwnSuperAmount).add(annualBankLendingAmount).add(annualHaveAmount).add(annualOtherAmount); | |||
VUtils.isTrue(annualPlanAmount.compareTo(totalAnnual) != 0) | |||
.throwMessage(String.format("申报失败! 年度支付总金额【%s】 不等于其它年度支付金额 【%s】", annualPlanAmount, totalAnnual)); | |||
} | |||
@@ -31,7 +31,7 @@ import com.hz.pm.api.projectlib.service.IProjectInstService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConstant; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | |||
import com.hz.pm.api.user.security.model.UserInfoDetails; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
@@ -280,7 +280,7 @@ public class DelayedApplyManage { | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(project, model.getFormName(), instanceId, | |||
WorkNoticeConstant.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
@@ -54,7 +54,7 @@ import java.util.concurrent.atomic.AtomicInteger; | |||
import java.util.stream.Collectors; | |||
import static com.hz.pm.api.staging.enums.MsgTypeEnum.PROJECT_REVIEW; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConstant.PASS_MSG_TEMPLATE; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.PASS_MSG_TEMPLATE; | |||
/** | |||
* @Classname FinalAcceptanceManage | |||
@@ -29,7 +29,7 @@ import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.staging.service.IProjectStagingService; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.constant.TodoCenterConst; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConstant; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | |||
import com.hz.pm.api.user.security.model.UserInfoDetails; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
@@ -204,7 +204,7 @@ public class PrequalificationDeclaredProjectManage { | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(projectInfo, model.getFormName(), instanceId, | |||
WorkNoticeConstant.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
@@ -9,7 +9,7 @@ import com.hz.pm.api.projectlib.service.IProjectInstService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConstant; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.ningdatech.basic.function.VUtils; | |||
import com.wflow.bean.entity.WflowModels; | |||
import com.wflow.exception.BusinessException; | |||
@@ -97,7 +97,7 @@ public class ReviewByDeptJointManage { | |||
projectInfo = projectLibManage.saveProjectWithVersion(projectInfo, instanceId, ProjectProcessStageEnum.DEPARTMENT_JOINT_APPROVAL_PROCESS.getCode()); | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(projectInfo, model.getFormName(), instanceId, WorkNoticeConstant.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
noticeManage.sendFirstUser(projectInfo, model.getFormName(), instanceId, WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return Boolean.TRUE; | |||
} | |||
@@ -16,7 +16,7 @@ import java.io.Serializable; | |||
* @author zpf | |||
* @since 2023-02-06 | |||
*/ | |||
@ApiModel(value = "NdProjectDraftDto", description = "") | |||
@ApiModel(value = "NdProjectDraftDto") | |||
@Data | |||
@Builder | |||
@NoArgsConstructor | |||
@@ -367,4 +367,8 @@ public class ProjectDraft implements Serializable { | |||
@ApiModelProperty("立项依据证明材料") | |||
private String baseProjBasisFile; | |||
@ApiModelProperty("暂存类型:1 项目申报、2 立项备案") | |||
private Integer draftType; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.hz.pm.api.projectdeclared.model.enumerization; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Getter; | |||
/** | |||
* <p> | |||
* ProjectDraftTypeEnum | |||
* </p> | |||
* | |||
* @author WendyYang | |||
* @since 09:57 2024/2/20 | |||
*/ | |||
@Getter | |||
@AllArgsConstructor | |||
public enum ProjectDraftTypeEnum { | |||
PROJECT_DECLARED(1, "项目申报"), | |||
DECLARED_RECORD(2, "立项备案"); | |||
private final Integer code; | |||
private final String val; | |||
} |
@@ -370,4 +370,7 @@ public class ProjectDraftVO implements Serializable { | |||
@ApiModelProperty("立项依据证明材料") | |||
private String baseProjBasisFile; | |||
@ApiModelProperty("草稿箱类型:1 项目申报、2 立项备案") | |||
private Integer draftType; | |||
} |
@@ -3,6 +3,7 @@ package com.hz.pm.api.projectdeclared.utils; | |||
import com.google.common.collect.Maps; | |||
import com.hz.pm.api.projectdeclared.manage.*; | |||
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; | |||
import com.hz.pm.api.projectlib.manage.DeclaredRecordManage; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import org.springframework.stereotype.Component; | |||
@@ -26,7 +27,8 @@ public class RestartProcessMapUtil { | |||
ConstructionPlanManage constructionPlanManage, | |||
PrequalificationDeclaredProjectManage prequalificationDeclaredProjectManage, | |||
ReviewByProvincialDeptManage provincialDeptManage, | |||
FinalAcceptanceManage finalAcceptanceManage) { | |||
FinalAcceptanceManage finalAcceptanceManage, | |||
DeclaredRecordManage declaredRecordManage) { | |||
//重新项目申报 | |||
RESTART_PROCESS_MAP.put(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS.getCode(), | |||
declaredProjectManage::reStartTheProcess); | |||
@@ -42,6 +44,9 @@ public class RestartProcessMapUtil { | |||
//终审 | |||
RESTART_PROCESS_MAP.put(ProjectStatusEnum.FINAL_ACCEPTANCE_REVIEW_FAILED.getCode(), | |||
finalAcceptanceManage::restartProcess); | |||
// 立项备案重新提交 | |||
RESTART_PROCESS_MAP.put(ProjectStatusEnum.DECLARED_APPROVED_RECORD_FAILED.getCode(), | |||
declaredRecordManage::restartDeclaredRecord); | |||
} | |||
public static Function<DefaultDeclaredDTO, String> getRestartFunction(Integer status) { | |||
@@ -1,6 +1,7 @@ | |||
package com.hz.pm.api.projectlib.controller; | |||
import com.hz.pm.api.projectlib.manage.MhProjectManage; | |||
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; | |||
import com.hz.pm.api.projectlib.manage.DeclaredRecordManage; | |||
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq; | |||
import com.hz.pm.api.projectlib.model.vo.DeclaredProjectListVO; | |||
import com.hz.pm.api.projectlib.model.vo.MhProjectBaseInfoVO; | |||
@@ -8,10 +9,9 @@ import com.ningdatech.basic.model.PageVo; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import lombok.RequiredArgsConstructor; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.validation.Valid; | |||
/** | |||
* <p> | |||
@@ -24,21 +24,33 @@ import org.springframework.web.bind.annotation.RestController; | |||
@Api(tags = "信产项目(立项备案)列表") | |||
@RestController | |||
@RequiredArgsConstructor | |||
@RequestMapping("/api/v1/mh/project") | |||
@RequestMapping("/api/v1/declared/record") | |||
public class MhProjectController { | |||
private final MhProjectManage mhProjectManage; | |||
private final DeclaredRecordManage declaredRecordManage; | |||
@ApiOperation("立项备案列表") | |||
@GetMapping("/pageDeclaredProject") | |||
public PageVo<DeclaredProjectListVO> pageDeclaredProject(DeclaredProjectListReq req) { | |||
return mhProjectManage.pageDeclaredProject(req); | |||
return declaredRecordManage.pageDeclaredProject(req); | |||
} | |||
@ApiOperation("信产项目基本信息") | |||
@GetMapping("/baseInfo/{mhProjectId}") | |||
public MhProjectBaseInfoVO projectBaseInfo(@PathVariable Long mhProjectId) { | |||
return mhProjectManage.getProjectBaseInfo(mhProjectId); | |||
return declaredRecordManage.getProjectBaseInfo(mhProjectId); | |||
} | |||
@ApiOperation("立项备案提交") | |||
@PostMapping("/submit") | |||
public void submit(@Valid @RequestBody DefaultDeclaredDTO req) { | |||
declaredRecordManage.startDeclaredRecord(req); | |||
} | |||
@ApiOperation("立项备案重新提交") | |||
@PostMapping("/resubmit") | |||
public void resubmit(@Valid @RequestBody DefaultDeclaredDTO req) { | |||
declaredRecordManage.restartDeclaredRecord(req); | |||
} | |||
@@ -0,0 +1,301 @@ | |||
package com.hz.pm.api.projectlib.manage; | |||
import cn.hutool.core.lang.Assert; | |||
import cn.hutool.core.util.StrUtil; | |||
import com.alibaba.fastjson.JSON; | |||
import com.alibaba.fastjson.TypeReference; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.hz.pm.api.common.enumeration.CommonEnum; | |||
import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum; | |||
import com.hz.pm.api.common.model.constant.BizConst; | |||
import com.hz.pm.api.projectdeclared.manage.DefaultDeclaredProjectManage; | |||
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; | |||
import com.hz.pm.api.projectdeclared.model.dto.ProjectConditionDTO; | |||
import com.hz.pm.api.projectdeclared.service.IProjectDraftService; | |||
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; | |||
import com.hz.pm.api.projectlib.model.entity.MhProject; | |||
import com.hz.pm.api.projectlib.model.entity.MhProjectSchemaTargetData; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq; | |||
import com.hz.pm.api.projectlib.model.vo.DeclaredProjectListVO; | |||
import com.hz.pm.api.projectlib.model.vo.MhProjectBaseInfoVO; | |||
import com.hz.pm.api.projectlib.service.IMhProjectSchemaTargetDataService; | |||
import com.hz.pm.api.projectlib.service.IMhProjectService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.hz.pm.api.user.helper.MhUnitCache; | |||
import com.hz.pm.api.user.model.dto.UnitDTO; | |||
import com.hz.pm.api.user.security.model.UserInfoDetails; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
import com.ningdatech.basic.exception.BizException; | |||
import com.ningdatech.basic.function.VUtils; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.basic.util.CollUtils; | |||
import com.wflow.bean.entity.WflowModels; | |||
import com.wflow.workflow.bean.dto.OrgInfoDTO; | |||
import com.wflow.workflow.bean.vo.ProcessStartParamsVo; | |||
import com.wflow.workflow.service.ProcessInstanceService; | |||
import com.wflow.workflow.service.ProcessModelService; | |||
import lombok.RequiredArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.stereotype.Component; | |||
import org.springframework.transaction.annotation.Transactional; | |||
import java.util.Collections; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Objects; | |||
import java.util.stream.Collectors; | |||
/** | |||
* <p> | |||
* MhProjectManage | |||
* </p> | |||
* | |||
* @author WendyYang | |||
* @since 19:06 2024/1/30 | |||
*/ | |||
@Slf4j | |||
@Component | |||
@RequiredArgsConstructor | |||
public class DeclaredRecordManage { | |||
private final IMhProjectService mhProjectService; | |||
private final IMhProjectSchemaTargetDataService mhProjectSchemaTargetDataService; | |||
private final IProjectService projectService; | |||
private final MhUnitCache mhUnitCache; | |||
private final NoticeManage noticeManage; | |||
private final IProjectDraftService projectDraftService; | |||
private final ProcessModelService processModelService; | |||
private final DefaultDeclaredProjectManage defaultDeclaredProjectManage; | |||
private final ProcessInstanceService processInstanceService; | |||
private final ProjectLibManage projectLibManage; | |||
private LambdaQueryWrapper<MhProject> buildQuery(DeclaredProjectListReq req) { | |||
LambdaQueryWrapper<MhProject> query = Wrappers.lambdaQuery(MhProject.class) | |||
.like(StrUtil.isNotBlank(req.getProjectName()), MhProject::getProjectName, req.getProjectName()) | |||
.like(StrUtil.isNotBlank(req.getDeclaredUnit()), MhProject::getUnitName, req.getDeclaredUnit()); | |||
if (req.getCreateDateMin() != null) { | |||
query.ge(MhProject::getCreateTime, req.getCreateDateMin()); | |||
} | |||
if (req.getCreateDateMax() != null) { | |||
query.lt(MhProject::getCreateTime, req.getCreateDateMax().minusDays(1)); | |||
} | |||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||
if (!user.getSuperAdmin() && !user.getRegionAdmin()) { | |||
query.eq(MhProject::getUnitId, user.getMhUnitId()); | |||
} | |||
return query; | |||
} | |||
public PageVo<DeclaredProjectListVO> pageDeclaredProject(DeclaredProjectListReq req) { | |||
LambdaQueryWrapper<MhProject> query = buildQuery(req); | |||
Page<MhProject> page = mhProjectService.page(req.page(), query); | |||
if (page.getTotal() == 0) { | |||
return PageVo.empty(); | |||
} | |||
List<MhProject> records = page.getRecords(); | |||
List<String> projectCodes = CollUtils.fieldList(records, MhProject::getProjectCode); | |||
Map<String, Project> projectMap; | |||
if (!projectCodes.isEmpty()) { | |||
List<Project> projects = projectService.listNewestByProjectCodes(projectCodes); | |||
projectMap = CollUtils.listToMap(projects, Project::getProjectCode); | |||
} else { | |||
projectMap = Collections.emptyMap(); | |||
} | |||
List<DeclaredProjectListVO> data = records.stream().map(w -> { | |||
DeclaredProjectListVO item = new DeclaredProjectListVO(); | |||
item.setMhProjectId(w.getId()); | |||
Project project = projectMap.get(w.getProjectCode()); | |||
if (project == null) { | |||
item.setStatus(null); | |||
item.setStage(null); | |||
} else { | |||
item.setStatus(project.getStatus()); | |||
item.setStage(project.getStage()); | |||
} | |||
item.setProjectCode(w.getProjectCode()); | |||
item.setProjectName(w.getProjectName()); | |||
item.setDeclaredAmount(w.getTotalMoney()); | |||
item.setCreateTime(w.getCreateTime()); | |||
return item; | |||
}).collect(Collectors.toList()); | |||
return PageVo.of(data, page.getTotal()); | |||
} | |||
public MhProjectBaseInfoVO getProjectBaseInfo(Long mhProjectId) { | |||
MhProject mhProject = mhProjectService.getById(mhProjectId); | |||
if (mhProject == null) { | |||
throw BizException.wrap("项目不存在"); | |||
} | |||
MhProjectBaseInfoVO detail = new MhProjectBaseInfoVO(); | |||
detail.setMhProjectId(mhProject.getId()); | |||
detail.setProjectName(mhProject.getProjectName()); | |||
detail.setDeclaredUnit(mhProject.getUnitName()); | |||
detail.setDeclaredUnitId(mhProject.getUnitId()); | |||
detail.setTotalInvestAmount(mhProject.getTotalMoney()); | |||
detail.setReviewInvestAmount(mhProject.getMoney()); | |||
MhProjectSchemaTargetData schemaTargetData = mhProjectSchemaTargetDataService.getByMhProjectId(mhProjectId); | |||
if (schemaTargetData != null) { | |||
detail.setTotalInvestBudgetAmount(schemaTargetData.getMoney()); | |||
} | |||
UnitDTO unit = mhUnitCache.getById(mhProject.getId()); | |||
if (unit != null) { | |||
detail.setDeclaredUnitUnifiedSocialCreditCode(unit.getUnifiedSocialCreditCode()); | |||
} | |||
return detail; | |||
} | |||
public String startDeclaredRecord(DefaultDeclaredDTO req) { | |||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||
ProjectDTO projectInfo = req.getProjectInfo(); | |||
projectInfo.setBuildOrgCode(user.getMhUnitIdStr()); | |||
projectInfo.setBuildOrgName(user.getMhUnitName()); | |||
// 项目名称去重 | |||
defaultDeclaredProjectManage.checkDuplication(projectInfo); | |||
// 判断申报金额 是否等于总的 判断年度支付金额 是否等于总金额 | |||
defaultDeclaredProjectManage.checkAmount(projectInfo); | |||
// 写死 是否有主管单位 | |||
projectInfo.setIsHigherSuperOrg(CommonEnum.YES.getCode()); | |||
projectInfo.setIsSuperOrg(CommonEnum.YES.getCode()); | |||
//如果主管单位没有 那么主管单位就是自己 | |||
if (CommonEnum.NO.getCode().equals(projectInfo.getIsSuperOrg())) { | |||
projectInfo.setSuperOrgCode(user.getMhUnitIdStr()); | |||
projectInfo.setSuperOrg(user.getMhUnitName()); | |||
} | |||
//如果是重新提交的话 判断下 项目是否存在 | |||
if (Objects.nonNull(projectInfo.getId())) { | |||
//新申报的项目不允许带项目id | |||
projectInfo.setId(null); | |||
} | |||
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) | |||
.eq(WflowModels::getProcessType, ProjectProcessStageEnum.PROJECT_RECORD_APPROVAL_PROCESS.getCode()) | |||
.last(BizConst.LIMIT_1)); | |||
if (Objects.isNull(model)) { | |||
throw BizException.wrap("找不到立项备案审批流程配置"); | |||
} | |||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | |||
params.setUser(defaultDeclaredProjectManage.buildUser(user.getUserId())); | |||
params.setProcessUsers(Collections.emptyMap()); | |||
//放入条件判断的项目字段 | |||
ProjectConditionDTO conditionDto = new ProjectConditionDTO(); | |||
BeanUtils.copyProperties(req.getProjectInfo(), conditionDto); | |||
req.getFormData().putAll( | |||
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() { | |||
}) | |||
); | |||
params.setFormData(req.getFormData()); | |||
//开始申报 | |||
// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 | |||
Project project = new Project(); | |||
BeanUtils.copyProperties(projectInfo, project); | |||
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(user.getUserId(), project); | |||
String instanceId = processInstanceService.startProcessLs(model, params, orgModelMap); | |||
log.info("申报项目成功 【{}】", instanceId); | |||
//如果是重新提交的话 判断下 项目是否存在 | |||
//保存项目相关 | |||
Project buildProject = projectLibManage.saveProjectInDeclared(projectInfo, instanceId, user.getUserId(), | |||
ProjectStatusEnum.NOT_APPROVED, ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING, | |||
ProjectProcessStageEnum.PROJECT_RECORD_APPROVAL_PROCESS); | |||
if (Objects.nonNull(projectInfo.getDraftId())) { | |||
//如果是草稿箱提交 删除对应的草稿箱 | |||
projectDraftService.removeById(projectInfo.getDraftId()); | |||
} | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(buildProject, model.getFormName(), instanceId, | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instanceId; | |||
} | |||
@Transactional(rollbackFor = Exception.class) | |||
public String restartDeclaredRecord(DefaultDeclaredDTO req) { | |||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||
ProjectDTO reqProj = req.getProjectInfo(); | |||
Assert.notNull(reqProj.getId(), "提交失败,缺少项目ID!"); | |||
reqProj.setBuildOrgCode(user.getMhUnitIdStr()); | |||
reqProj.setBuildOrgName(user.getMhUnitName()); | |||
Project oldProj = projectService.getById(reqProj.getId()); | |||
Assert.notNull(oldProj, "提交失败,此项目不存在!"); | |||
//项目名称去重 | |||
if (StrUtil.isNotBlank(reqProj.getProjectName()) && | |||
!reqProj.getProjectName().equals(oldProj.getProjectName())) { | |||
reqProj.setProjectCode(oldProj.getProjectCode()); | |||
defaultDeclaredProjectManage.checkDuplication(reqProj); | |||
} | |||
// 写死 是否有主管单位 | |||
oldProj.setIsHigherSuperOrg(CommonEnum.YES.getCode()); | |||
oldProj.setIsSuperOrg(CommonEnum.YES.getCode()); | |||
//如果主管单位没有 那么主管单位就是自己 | |||
if (CommonEnum.NO.getCode().equals(reqProj.getIsSuperOrg())) { | |||
oldProj.setSuperOrgCode(user.getMhUnitIdStr()); | |||
oldProj.setSuperOrg(user.getMhUnitName()); | |||
reqProj.setSuperOrgCode(user.getMhUnitIdStr()); | |||
reqProj.setSuperOrg(user.getMhUnitName()); | |||
} | |||
//判断申报金额 是否等于总的 判断年度支付金额 是否等于总金额 | |||
defaultDeclaredProjectManage.checkAmount(reqProj); | |||
ProjectProcessStageEnum processStageEnum = ProjectProcessStageEnum.PROJECT_RECORD_APPROVAL_PROCESS; | |||
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) | |||
.eq(WflowModels::getProcessType, processStageEnum.getCode()) | |||
.last(BizConst.LIMIT_1)); | |||
if (Objects.isNull(model)) { | |||
throw BizException.wrap("%s不存在", processStageEnum.getDesc()); | |||
} | |||
//首先要判断 项目当前状态 是不是 单位内部拒绝 | |||
VUtils.isTrue(!ProjectStatusEnum.DECLARED_APPROVED_RECORD_FAILED.eq(oldProj.getStatus()) || | |||
!ProjectStatusEnum.NOT_APPROVED.eq(oldProj.getStage())) | |||
.throwMessage("提交失败,该项目不是立项备案审核不通过状态或者未立项阶段"); | |||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | |||
params.setUser(defaultDeclaredProjectManage.buildUser(user.getUserId())); | |||
params.setProcessUsers(Collections.emptyMap()); | |||
//把条件值给放入工作流 | |||
defaultDeclaredProjectManage.buildCondition(params, req); | |||
// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 | |||
Project project = new Project(); | |||
BeanUtils.copyProperties(reqProj, project); | |||
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(user.getUserId(), project); | |||
String instId = processInstanceService.startProcessLs(model, params, orgModelMap); | |||
log.info("立项备案重新提交 【{}】", instId); | |||
//保存项目相关 | |||
Project newProj = projectLibManage.saveProjectInDeclared(reqProj, instId, user.getUserId(), | |||
ProjectStatusEnum.NOT_APPROVED, | |||
ProjectStatusEnum.DECLARED_APPROVED_RECORD_AUDITING, | |||
processStageEnum); | |||
//发送给第一个审批人消息 | |||
noticeManage.sendFirstUser(newProj, model.getFormName(), instId, | |||
WorkNoticeConst.PASS_MSG_TEMPLATE, MsgTypeEnum.PROJECT_REVIEW); | |||
return instId; | |||
} | |||
} |
@@ -1,124 +0,0 @@ | |||
package com.hz.pm.api.projectlib.manage; | |||
import cn.hutool.core.util.StrUtil; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.hz.pm.api.projectlib.model.entity.MhProject; | |||
import com.hz.pm.api.projectlib.model.entity.MhProjectSchemaTargetData; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq; | |||
import com.hz.pm.api.projectlib.model.vo.DeclaredProjectListVO; | |||
import com.hz.pm.api.projectlib.model.vo.MhProjectBaseInfoVO; | |||
import com.hz.pm.api.projectlib.service.IMhProjectSchemaTargetDataService; | |||
import com.hz.pm.api.projectlib.service.IMhProjectService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.user.helper.MhUnitCache; | |||
import com.hz.pm.api.user.model.dto.UnitDTO; | |||
import com.hz.pm.api.user.security.model.UserInfoDetails; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
import com.ningdatech.basic.exception.BizException; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.basic.util.CollUtils; | |||
import lombok.RequiredArgsConstructor; | |||
import org.springframework.stereotype.Component; | |||
import java.util.Collections; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.stream.Collectors; | |||
/** | |||
* <p> | |||
* MhProjectManage | |||
* </p> | |||
* | |||
* @author WendyYang | |||
* @since 19:06 2024/1/30 | |||
*/ | |||
@Component | |||
@RequiredArgsConstructor | |||
public class MhProjectManage { | |||
private final IMhProjectService mhProjectService; | |||
private final IMhProjectSchemaTargetDataService mhProjectSchemaTargetDataService; | |||
private final IProjectService projectService; | |||
private final MhUnitCache mhUnitCache; | |||
private LambdaQueryWrapper<MhProject> buildQuery(DeclaredProjectListReq req) { | |||
LambdaQueryWrapper<MhProject> query = Wrappers.lambdaQuery(MhProject.class) | |||
.like(StrUtil.isNotBlank(req.getProjectName()), MhProject::getProjectName, req.getProjectName()) | |||
.like(StrUtil.isNotBlank(req.getDeclaredUnit()), MhProject::getUnitName, req.getDeclaredUnit()); | |||
if (req.getCreateDateMin() != null) { | |||
query.ge(MhProject::getCreateTime, req.getCreateDateMin()); | |||
} | |||
if (req.getCreateDateMax() != null) { | |||
query.lt(MhProject::getCreateTime, req.getCreateDateMax().minusDays(1)); | |||
} | |||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||
if (!user.getSuperAdmin() && !user.getRegionAdmin()) { | |||
query.eq(MhProject::getUnitId, user.getMhUnitId()); | |||
} | |||
return query; | |||
} | |||
public PageVo<DeclaredProjectListVO> pageDeclaredProject(DeclaredProjectListReq req) { | |||
LambdaQueryWrapper<MhProject> query = buildQuery(req); | |||
Page<MhProject> page = mhProjectService.page(req.page(), query); | |||
if (page.getTotal() == 0) { | |||
return PageVo.empty(); | |||
} | |||
List<MhProject> records = page.getRecords(); | |||
List<String> projectCodes = CollUtils.fieldList(records, MhProject::getProjectCode); | |||
Map<String, Project> projectMap; | |||
if (!projectCodes.isEmpty()) { | |||
List<Project> projects = projectService.listNewestByProjectCodes(projectCodes); | |||
projectMap = CollUtils.listToMap(projects, Project::getProjectCode); | |||
} else { | |||
projectMap = Collections.emptyMap(); | |||
} | |||
List<DeclaredProjectListVO> data = records.stream().map(w -> { | |||
DeclaredProjectListVO item = new DeclaredProjectListVO(); | |||
item.setMhProjectId(w.getId()); | |||
Project project = projectMap.get(w.getProjectCode()); | |||
if (project == null) { | |||
item.setStatus(null); | |||
item.setStage(null); | |||
} else { | |||
item.setStatus(project.getStatus()); | |||
item.setStage(project.getStage()); | |||
} | |||
item.setProjectCode(w.getProjectCode()); | |||
item.setProjectName(w.getProjectName()); | |||
item.setDeclaredAmount(w.getTotalMoney()); | |||
item.setCreateTime(w.getCreateTime()); | |||
return item; | |||
}).collect(Collectors.toList()); | |||
return PageVo.of(data, page.getTotal()); | |||
} | |||
public MhProjectBaseInfoVO getProjectBaseInfo(Long mhProjectId) { | |||
MhProject mhProject = mhProjectService.getById(mhProjectId); | |||
if (mhProject == null) { | |||
throw BizException.wrap("项目不存在"); | |||
} | |||
MhProjectBaseInfoVO detail = new MhProjectBaseInfoVO(); | |||
detail.setMhProjectId(mhProject.getId()); | |||
detail.setProjectName(mhProject.getProjectName()); | |||
detail.setDeclaredUnit(mhProject.getUnitName()); | |||
detail.setDeclaredUnitId(mhProject.getUnitId()); | |||
detail.setTotalInvestAmount(mhProject.getTotalMoney()); | |||
detail.setReviewInvestAmount(mhProject.getMoney()); | |||
MhProjectSchemaTargetData schemaTargetData = mhProjectSchemaTargetDataService.getByMhProjectId(mhProjectId); | |||
if (schemaTargetData != null) { | |||
detail.setTotalInvestBudgetAmount(schemaTargetData.getMoney()); | |||
} | |||
UnitDTO unit = mhUnitCache.getById(mhProject.getId()); | |||
if (unit != null) { | |||
detail.setDeclaredUnitUnifiedSocialCreditCode(unit.getUnifiedSocialCreditCode()); | |||
} | |||
return detail; | |||
} | |||
} |
@@ -787,6 +787,28 @@ public class ProjectLibManage { | |||
return project; | |||
} | |||
/** | |||
* 申报新项目时 保存项目信息和其它相关联的信息 | |||
* | |||
* @param projectDto \ | |||
* @param instanceId \ | |||
* @return \ | |||
*/ | |||
public Project saveProjectInDeclared(ProjectDTO projectDto, String instanceId, Long userId, | |||
ProjectStatusEnum stage, ProjectStatusEnum status, | |||
ProjectProcessStageEnum processStage) { | |||
Project project = saveProjectNewVersion(projectDto, instanceId, userId, Boolean.FALSE, stage, status); | |||
//保存项目和实例的关系 | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(processStage.getCode()); | |||
projectInstService.save(projectInst); | |||
return project; | |||
} | |||
/** | |||
* 建设方案申报项目时 保存项目信息和其它相关联的信息 | |||
@@ -828,6 +850,14 @@ public class ProjectLibManage { | |||
public Project saveProjectNewVersion(ProjectDTO projectDto, String instanceId, | |||
Long userId, Boolean isContruct) { | |||
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示 | |||
return saveProjectNewVersion(projectDto, instanceId, userId, isContruct, ProjectStatusEnum.NOT_APPROVED, ProjectStatusEnum.UNDER_INTERNAL_AUDIT); | |||
} | |||
public Project saveProjectNewVersion(ProjectDTO projectDto, String instanceId, | |||
Long userId, Boolean isContruct, | |||
ProjectStatusEnum stage, | |||
ProjectStatusEnum status) { | |||
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示 | |||
try { | |||
Project project = new Project(); | |||
//为空 代表是新申报的 | |||
@@ -835,8 +865,8 @@ public class ProjectLibManage { | |||
BeanUtils.copyProperties(projectDto, project); | |||
project.setCreateOn(LocalDateTime.now()); | |||
project.setUpdateOn(LocalDateTime.now()); | |||
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||
project.setStage(stage.getCode()); | |||
project.setStatus(status.getCode()); | |||
project.setInstCode(instanceId); | |||
project.setSponsor(String.valueOf(userId)); | |||
String projectCode = generateProjectCodeUtil.generateProjectCode(projectDto); | |||
@@ -5,6 +5,7 @@ import lombok.AllArgsConstructor; | |||
import lombok.Getter; | |||
import lombok.NoArgsConstructor; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.util.Objects; | |||
/** | |||
@@ -22,44 +23,50 @@ public enum ProjectStatusEnum { | |||
/** | |||
* 项目阶段:未立项 | |||
*/ | |||
NOT_APPROVED(10000, "未立项",null), | |||
UNDER_INTERNAL_AUDIT(10001, "单位内部审核中",null), | |||
UNDER_INTERNAL_AUDIT_NOT_PASS(10002, "单位内部审核不通过",null), | |||
PENDING_PREQUALIFICATION(10003, "待预审",null), | |||
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS(10004, "省级部门联审中",null), | |||
NOT_APPROVED(10000, "未立项", null), | |||
UNDER_INTERNAL_AUDIT(10001, "单位内部审核中", null), | |||
UNDER_INTERNAL_AUDIT_NOT_PASS(10002, "单位内部审核不通过", null), | |||
PENDING_PREQUALIFICATION(10003, "待预审", null), | |||
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS(10004, "省级部门联审中", null), | |||
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS(10018, "省级部门联审通过",null), | |||
THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED(10005, "省级部门联审不通过",null), | |||
PRE_APPLYING(10006, "预审中",null), | |||
PREQUALIFICATION_FAILED(10007, "预审不通过",null), | |||
DEPARTMENT_JOINT_REVIEW(10008, "部门联审中",null), | |||
DEPARTMENT_JOINT_REVIEW_FAILED(10009, "部门联审不通过",null), | |||
IN_THE_ANNUAL_PLAN(10010, "年度计划中",null), | |||
BE_SUSPENDED(10011, "被暂缓",null), | |||
SCHEME_UNDER_REVIEW(10012, "方案评审中",GovProjectStatusEnum.APPROVAL), | |||
SCHEME_REVIEW_FAILED(10013, "方案评审不通过",null), | |||
TO_BE_APPROVED(10014, "待立项批复",GovProjectStatusEnum.PENDING), | |||
TO_BE_DECLARED(10015, "待申报",null), | |||
PLAN_TO_BE_DECLARED(10016, "方案待申报",null), | |||
PENDING_PREQUALIFICATION_CHOICE(10017, "待预审选择态",null), | |||
PREQUALIFICATION_WITHDRAW_CHOICE(10019, "预审中撤回选择态",null), | |||
APPROVED_AFTER_CHOICE(10020, "立项批复后选择态",null), | |||
TO_BE_APP_REGISTER(10021, "待应用注册",null), | |||
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS(10018, "省级部门联审通过", null), | |||
THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED(10005, "省级部门联审不通过", null), | |||
PRE_APPLYING(10006, "预审中", null), | |||
PREQUALIFICATION_FAILED(10007, "预审不通过", null), | |||
DEPARTMENT_JOINT_REVIEW(10008, "部门联审中", null), | |||
DEPARTMENT_JOINT_REVIEW_FAILED(10009, "部门联审不通过", null), | |||
IN_THE_ANNUAL_PLAN(10010, "年度计划中", null), | |||
BE_SUSPENDED(10011, "被暂缓", null), | |||
SCHEME_UNDER_REVIEW(10012, "方案评审中", GovProjectStatusEnum.APPROVAL), | |||
SCHEME_REVIEW_FAILED(10013, "方案评审不通过", null), | |||
TO_BE_APPROVED(10014, "待立项批复", GovProjectStatusEnum.PENDING), | |||
TO_BE_DECLARED(10015, "待申报", null), | |||
PLAN_TO_BE_DECLARED(10016, "方案待申报", null), | |||
PENDING_PREQUALIFICATION_CHOICE(10017, "待预审选择态", null), | |||
PREQUALIFICATION_WITHDRAW_CHOICE(10019, "预审中撤回选择态", null), | |||
APPROVED_AFTER_CHOICE(10020, "立项批复后选择态", null), | |||
TO_BE_APP_REGISTER(10021, "待应用注册", null), | |||
/** | |||
* 信产项目备案 | |||
*/ | |||
DECLARED_APPROVED_TO_BE_RECORD(10022, "待立项备案", null), | |||
DECLARED_APPROVED_RECORD_AUDITING(10022, "立项备案审核中", null), | |||
DECLARED_APPROVED_RECORD_FAILED(10023, "立项备案审核不通过", null), | |||
/** | |||
* 项目阶段:已立项 | |||
*/ | |||
PROJECT_APPROVED(20000, "已立项",null), | |||
TO_BE_PURCHASED(20001, "待采购",GovProjectStatusEnum.APPROVED), | |||
UNDER_CONSTRUCTION(20002, "建设中",null), | |||
TO_BE_FINALLY_INSPECTED(20003, "待终验",GovProjectStatusEnum.HAS_PRE_INS), | |||
FINAL_ACCEPTANCE_IS_UNDER_REVIEW(20004, "终验审核中",null), | |||
FINAL_ACCEPTANCE_REVIEW_FAILED(20005, "终验审核不通过",null), | |||
OPERATION(20006, "待开工",GovProjectStatusEnum.PURCHASED), | |||
PROJECT_APPROVED(20000, "已立项", null), | |||
TO_BE_PURCHASED(20001, "待采购", GovProjectStatusEnum.APPROVED), | |||
UNDER_CONSTRUCTION(20002, "建设中", null), | |||
TO_BE_FINALLY_INSPECTED(20003, "待终验", GovProjectStatusEnum.HAS_PRE_INS), | |||
FINAL_ACCEPTANCE_IS_UNDER_REVIEW(20004, "终验审核中", null), | |||
FINAL_ACCEPTANCE_REVIEW_FAILED(20005, "终验审核不通过", null), | |||
OPERATION(20006, "待开工", GovProjectStatusEnum.PURCHASED), | |||
/** | |||
* 项目阶段:已归档 | |||
*/ | |||
ARCHIVED(30000, "已归档",null), | |||
ACCEPTED(30001, "已验收",GovProjectStatusEnum.HAS_FINAL_INS); | |||
ARCHIVED(30000, "已归档", null), | |||
ACCEPTED(30001, "已验收", GovProjectStatusEnum.HAS_FINAL_INS); | |||
private Integer code; | |||
private String desc; | |||
@@ -35,7 +35,7 @@ public class DeclaredProjectListVO { | |||
@ApiModelProperty("创建时间") | |||
private LocalDateTime createTime; | |||
@ApiModelProperty("项目名称") | |||
@ApiModelProperty("项目编码") | |||
private String projectCode; | |||
@ApiModelProperty("ID") | |||
@@ -28,7 +28,7 @@ import java.time.Duration; | |||
import java.util.List; | |||
import java.util.Objects; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConstant.CC_MSG_TEMPLATE; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.CC_MSG_TEMPLATE; | |||
/** | |||
* 抄送事件 事件监听 | |||
@@ -40,8 +40,8 @@ import java.util.List; | |||
import java.util.Objects; | |||
import java.util.Set; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConstant.PASS_MSG_TEMPLATE; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConstant.PASS_MSG_TEMPLATE2; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.PASS_MSG_TEMPLATE; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.PASS_MSG_TEMPLATE2; | |||
/** | |||
* 工作流开始 结束监听 自动审批的话 会漏掉 调用状态机 | |||
@@ -55,7 +55,7 @@ import java.util.Map; | |||
import java.util.Objects; | |||
import java.util.stream.Collectors; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConstant.AUDIT_WORK_TITLE; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.AUDIT_WORK_TITLE; | |||
/** | |||
* <p> | |||
@@ -7,13 +7,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.Assert; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.ningdatech.basic.function.VUtils; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.hz.pm.api.sys.model.entity.Notify; | |||
import com.hz.pm.api.sys.model.req.NotifyListReq; | |||
import com.hz.pm.api.sys.model.vo.NotifyVO; | |||
import com.hz.pm.api.sys.service.INotifyService; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConstant; | |||
import com.hz.pm.api.todocenter.constant.WorkNoticeConst; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
import lombok.RequiredArgsConstructor; | |||
import org.apache.commons.lang3.StringUtils; | |||
@@ -57,9 +56,9 @@ public class NotifyManage { | |||
String extraInfo = n.getExtraInfo(); | |||
if (StringUtils.isNotBlank(extraInfo)) { | |||
JSONObject jsonObject = JSON.parseObject(extraInfo); | |||
Long projectId = jsonObject.getLong(WorkNoticeConstant.PROJECT_ID); | |||
String instanceId = jsonObject.getString(WorkNoticeConstant.INSTANCE_ID); | |||
Long meetingId = jsonObject.getLong(WorkNoticeConstant.MEETING_ID); | |||
Long projectId = jsonObject.getLong(WorkNoticeConst.PROJECT_ID); | |||
String instanceId = jsonObject.getString(WorkNoticeConst.INSTANCE_ID); | |||
Long meetingId = jsonObject.getLong(WorkNoticeConst.MEETING_ID); | |||
notifyVo.setProjectId(projectId); | |||
notifyVo.setInstanceId(instanceId); | |||
notifyVo.setMeetingId(meetingId); | |||
@@ -4,9 +4,9 @@ package com.hz.pm.api.todocenter.constant; | |||
* @author CMM | |||
* @since 2023/02/01 14:56 | |||
*/ | |||
public class WorkNoticeConstant { | |||
public class WorkNoticeConst { | |||
private WorkNoticeConstant() { | |||
private WorkNoticeConst() { | |||
} | |||
public static final String PASS_MSG_TEMPLATE = "【%s】的【%s】需要您审核。"; |
@@ -16,6 +16,7 @@ import com.hz.pm.api.filemanage.service.INdProjectApplyBorrowService; | |||
import com.hz.pm.api.projectdeclared.manage.DeclaredProjectManage; | |||
import com.hz.pm.api.projectdeclared.model.dto.ProjectDraftSaveDTO; | |||
import com.hz.pm.api.projectdeclared.model.entity.ProjectConstructionSuggestions; | |||
import com.hz.pm.api.projectdeclared.model.enumerization.ProjectDraftTypeEnum; | |||
import com.hz.pm.api.projectdeclared.service.IConstructionSuggestionsService; | |||
import com.hz.pm.api.projectlib.model.dto.ProjectApplicationDTO; | |||
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; | |||
@@ -25,10 +26,7 @@ import com.hz.pm.api.projectlib.model.entity.ProjectDelayApply; | |||
import com.hz.pm.api.projectlib.model.entity.ProjectInst; | |||
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import com.hz.pm.api.projectlib.service.INdProjectDelayApplyService; | |||
import com.hz.pm.api.projectlib.service.IProjectApplicationService; | |||
import com.hz.pm.api.projectlib.service.IProjectInstService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.projectlib.service.*; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import com.hz.pm.api.staging.service.IProjectStagingService; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
@@ -60,7 +58,7 @@ import java.time.format.DateTimeFormatter; | |||
import java.util.*; | |||
import java.util.stream.Collectors; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConstant.*; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.*; | |||
/** | |||
* @Classname HandlerManage | |||
@@ -329,7 +327,7 @@ public class HandlerManage { | |||
}); | |||
projectInfo.setDynamicForm(dynamicMap); | |||
draftSaveDto.setProjectInfo(projectInfo); | |||
declaredProjectManage.saveToDraft(draftSaveDto); | |||
declaredProjectManage.saveToDraft(draftSaveDto, ProjectDraftTypeEnum.PROJECT_DECLARED.getCode()); | |||
} | |||
/** | |||
@@ -51,9 +51,9 @@ spring: | |||
# 是客户端等待连接池连接的最大毫秒数 | |||
connection-timeout: 30000 | |||
# 是允许连接在连接池中空闲的最长时间 | |||
minimum-idle: 5 | |||
minimum-idle: 10 | |||
# 配置最大池大小 | |||
maximum-pool-size: 300 | |||
maximum-pool-size: 20 | |||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||
idle-timeout: 60000 | |||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||
@@ -61,7 +61,7 @@ spring: | |||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||
auto-commit: true | |||
# 开启连接监测泄露 | |||
leak-detection-threshold: 5000 | |||
leak-detection-threshold: 6000 | |||
# 测试连接数据库 | |||
connection-test-query: SELECT 1 | |||
#设置上传 单个文件的大小 | |||
@@ -253,8 +253,8 @@ mh: | |||
api-host: https://hzszxc.hzswb.cn:8443/test/mh-gateway/auth-single | |||
expert-qr-code-url: https://jiema.wwei.cn/uploads/2023/12/28/658d7a3f15f06.jpg | |||
file: | |||
down-url: https://weixin.hzszxc.hzswb.cn:8443/mh-gateway/oss/oss/previewFileLogin | |||
detail-url: https://weixin.hzszxc.hzswb.cn:8443/mh-gateway/oss/ossfile/getFileInfoList | |||
down-url: https://weixin.hzszxc.hzswb.cn:8443/test/mh-gateway/oss/oss/previewFileLogin | |||
detail-url: https://weixin.hzszxc.hzswb.cn:8443/test/mh-gateway/oss/ossfile/getFileInfoList | |||
auth-code: | |||
secret-key: nqkmzqojg5j4eiypr3rb8s7nb4noa8b2 | |||
agent-login: | |||
@@ -38,7 +38,7 @@ import java.io.InputStream; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
import java.util.concurrent.*; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConstant.PASS_MSG_TEMPLATE; | |||
import static com.hz.pm.api.todocenter.constant.WorkNoticeConst.PASS_MSG_TEMPLATE; | |||
/** | |||
* 待办中心测试 | |||