diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java index d77704f..80df271 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java @@ -269,7 +269,7 @@ public class ProjectDeclareStateMachineJNBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_JN_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java index 0e1e70b..e6eca53 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java @@ -270,7 +270,7 @@ public class ProjectDeclareStateMachineJYBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_JY_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java index a9c54d0..670d0c9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java @@ -270,7 +270,7 @@ public class ProjectDeclareStateMachineKFQBuilder implements ProjectDeclareState @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_KFQ_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java index 575ff1a..669f3e4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java @@ -270,7 +270,7 @@ public class ProjectDeclareStateMachineLDBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_LD_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java index 737d7f5..f62873d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java @@ -271,7 +271,7 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_LQ_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java index 43dae81..18ac62a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java @@ -270,7 +270,7 @@ public class ProjectDeclareStateMachineQTBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_QT_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java index 617c7d7..cca839d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java @@ -270,7 +270,7 @@ public class ProjectDeclareStateMachineQYBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_QY_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java index c321412..0923d7c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java @@ -1,6 +1,5 @@ package com.ningdatech.pmapi.common.statemachine.builder; -import com.ningdatech.pmapi.common.enumeration.CommonEnum; import com.ningdatech.pmapi.common.statemachine.action.ProjectDeclareChoiceAction; import com.ningdatech.pmapi.common.statemachine.contants.RegionContant; import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; @@ -271,7 +270,7 @@ public class ProjectDeclareStateMachineSBJBuilder implements ProjectDeclareState @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_SBJ_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java index eddf681..af126d6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java @@ -280,7 +280,7 @@ public class ProjectDeclareStateMachineSCBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_SC_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java index 048aac5..fc92307 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java @@ -270,7 +270,7 @@ public class ProjectDeclareStateMachineSYBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_SY_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java index e7bbd74..e6dafa4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java @@ -270,7 +270,7 @@ public class ProjectDeclareStateMachineYHBuilder implements ProjectDeclareStateM @Override public StateMachineContext read(Project contextObj) { - StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.getValue(contextObj.getStatus()), + StateMachineContext result = new DefaultStateMachineContext(ProjectStatusEnum.match(contextObj.getStatus()), null, null, null, null, RegionContant.LS_YH_CODE); return result; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java index 0339f6b..d7ae477 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java @@ -12,6 +12,7 @@ import com.ningdatech.pmapi.gov.model.vo.*; import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PaymentPlanVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; +import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeNewEnum; import com.ningdatech.pmapi.projectlib.model.vo.ProjectApplicationVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; @@ -93,8 +94,12 @@ public class ProjectConvertUtil { baseinfo.setBaseProvManDeprt(project.getHigherSuperOrg()); baseinfo.setBaseProvManDepartDing(project.getHigherSuperOrgCode()); baseinfo.setBaseProvManDeprtType(project.getBaseProvManDeprtType()); - // TODO 缺少状态映射 -// baseinfo.setBaseProjSetProg(); + ProjectStatusEnum match = ProjectStatusEnum.match(project.getStatus()); + if(Objects.nonNull(match)){ + if(Objects.nonNull(match.getCollectionStatus())){ + baseinfo.setBaseProjSetProg(match.getCollectionStatus().getCode()); + } + } baseinfo.setBaseProjType(project.getProjectType()); baseinfo.setDeleted(Boolean.FALSE); return baseinfo; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java index 466aed3..d424929 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.projectlib.enumeration; +import com.ningdatech.pmapi.gov.enumeration.GovProjectStatusEnum; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -21,48 +22,50 @@ public enum ProjectStatusEnum { /** * 项目阶段:未立项 */ - NOT_APPROVED(10000, "未立项"), - UNDER_INTERNAL_AUDIT(10001, "单位内部审核中"), - UNDER_INTERNAL_AUDIT_NOT_PASS(10002, "单位内部审核不通过"), - PENDING_PREQUALIFICATION(10003, "待预审"), - JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS(10004, "省级部门联审中"), + 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, "省级部门联审通过"), - THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED(10005, "省级部门联审不通过"), - PRE_APPLYING(10006, "预审中"), - PREQUALIFICATION_FAILED(10007, "预审不通过"), - DEPARTMENT_JOINT_REVIEW(10008, "部门联审中"), - DEPARTMENT_JOINT_REVIEW_FAILED(10009, "部门联审不通过"), - IN_THE_ANNUAL_PLAN(10010, "年度计划中"), - BE_SUSPENDED(10011, "被暂缓"), - SCHEME_UNDER_REVIEW(10012, "方案评审中"), - SCHEME_REVIEW_FAILED(10013, "方案评审不通过"), - TO_BE_APPROVED(10014, "待立项批复"), - TO_BE_DECLARED(10015, "待申报"), - PLAN_TO_BE_DECLARED(10016, "方案待申报"), - PENDING_PREQUALIFICATION_CHOICE(10017, "待预审选择态"), - PREQUALIFICATION_WITHDRAW_CHOICE(10019, "预审中撤回选择态"), - APPROVED_AFTER_CHOICE(10020, "立项批复后选择态"), - TO_BE_APP_REGISTER(10021, "待应用注册"), + 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), /** * 项目阶段:已立项 */ - PROJECT_APPROVED(20000, "已立项"), - TO_BE_PURCHASED(20001, "待采购"), - UNDER_CONSTRUCTION(20002, "建设中"), - TO_BE_FINALLY_INSPECTED(20003, "待终验"), - FINAL_ACCEPTANCE_IS_UNDER_REVIEW(20004, "终验审核中"), - FINAL_ACCEPTANCE_REVIEW_FAILED(20005, "终验审核不通过"), - OPERATION(20006, "待开工"), + 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, "已归档"), - ACCEPTED(30001, "已验收"); + ARCHIVED(30000, "已归档",null), + ACCEPTED(30001, "已验收",GovProjectStatusEnum.HAS_FINAL_INS); private Integer code; private String desc; + private GovProjectStatusEnum collectionStatus; + public static String getDesc(Integer code) { if (Objects.isNull(code)) { return StringUtils.EMPTY; @@ -75,7 +78,7 @@ public enum ProjectStatusEnum { return StringUtils.EMPTY; } - public static ProjectStatusEnum getValue(Integer code) { + public static ProjectStatusEnum match(Integer code) { if (Objects.isNull(code)) { return null; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/listener/ProcessEndListener.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/listener/ProcessEndListener.java index 6c5f32a..7f2c8b1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/listener/ProcessEndListener.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/listener/ProcessEndListener.java @@ -198,7 +198,7 @@ public class ProcessEndListener { throw new BizException("传入实例类型错误: " + instTypeEnum); } }else { - switch (Objects.requireNonNull(ProjectStatusEnum.getValue(declaredProject.getStatus()))) { + switch (Objects.requireNonNull(ProjectStatusEnum.match(declaredProject.getStatus()))) { // 当前项目状态是预审中 case PRE_APPLYING: //先修改项目状态 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java index 690c7f0..ff38a4c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java @@ -12,7 +12,12 @@ import com.ningdatech.pmapi.gov.model.vo.GovBizProjectListVO; import com.ningdatech.pmapi.gov.model.vo.GovOperationProjectBaseinfoVO; import com.ningdatech.pmapi.gov.model.vo.GovOperationProjectDetailVO; import com.ningdatech.pmapi.gov.service.*; +import com.ningdatech.pmapi.gov.utils.ProjectConvertUtil; +import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; +import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; +import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; +import com.ningdatech.pmapi.projectlib.service.IProjectService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -22,7 +27,6 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.net.InetAddress; import java.net.UnknownHostException; -import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.StringJoiner; @@ -61,6 +65,12 @@ public class SynProjectCollectionTask { @Autowired private IGovBizProjectProcureService procureService; + @Autowired + private IProjectService projectService; + + @Autowired + private ProjectLibManage projectLibManage; + private final Integer PAGE_NUMBER = 1; /** @@ -104,7 +114,7 @@ public class SynProjectCollectionTask { collectionManage.pushProjectVo(projectDetail); } - //运维备案项目 + //2.运维备案项目 PageVo operationList = collectionManage.operationList(req); log.info("operation list size :{}",operationList.getTotal()); for(GovBizProjectListVO vo : operationList.getRecords()){ @@ -117,6 +127,19 @@ public class SynProjectCollectionTask { collectionManage.pushProjectVo(operationDetail); } + //3.申报项目 需要推送的项目 + List projects = projectService.list(Wrappers.lambdaQuery(Project.class) + .eq(Project::getNewest,Boolean.TRUE) + .eq(Project::getPush,Boolean.TRUE)); + log.info("projects need push size :{}",projects.size()); + for(Project project : projects){ + ProjectDetailVO projectDetailVO = projectLibManage.detailProjectCode(project.getProjectCode()); + GovBizProjectDetailVO vo = ProjectConvertUtil.declaredToCollection(projectDetailVO); + if(Objects.nonNull(vo)){ + collectionManage.pushProjectVo(vo); + } + } + stopWatch.stop(); log.info("数据同步任务结束====={}s",stopWatch.getTotalTimeSeconds()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java index 5cbe052..3d63e72 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java @@ -168,7 +168,7 @@ public class HandlerManage { throw new BizException("传入实例类型错误: " + instTypeEnum); } }else { - switch (Objects.requireNonNull(ProjectStatusEnum.getValue(declaredProject.getStatus()))) { + switch (Objects.requireNonNull(ProjectStatusEnum.match(declaredProject.getStatus()))) { // 当前项目状态是预审中 case PRE_APPLYING: //先修改项目状态 @@ -323,7 +323,7 @@ public class HandlerManage { public void rootWithDraw(Project declaredProject) { Long userId = LoginUserUtil.getUserId(); // 若是流程发起人点击撤回,项目回到上一个状态,需调用状态机更新项目状态,流程状态更新为审核通过 - switch (Objects.requireNonNull(ProjectStatusEnum.getValue(declaredProject.getStatus()))) { + switch (Objects.requireNonNull(ProjectStatusEnum.match(declaredProject.getStatus()))) { // 当前项目状态是单位内部审核中 case UNDER_INTERNAL_AUDIT: // 更新项目状态为待申报