@@ -262,7 +262,7 @@ public class ProjectDeclareAction { | |||
Project project = stateContext.getMessage().getHeaders().get(PROJECT_DECLARE, Project.class); | |||
log.info("预审申报事件之前,项目的状态为:{}" + project.getStatus()); | |||
if (StateMachineUtils.isCityProject(project) && StateMachineUtils.judgeDeclareAmount(project)) { | |||
project.setStatus(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()); | |||
project.setStatus(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode()); | |||
} else { | |||
project.setStatus(ProjectStatusEnum.PRE_APPLYING.getCode()); | |||
} | |||
@@ -28,7 +28,7 @@ public class ProjectDeclareChoiceAction implements Action<ProjectStatusEnum, Pro | |||
Project project = stateContext.getMessage().getHeaders().get(PROJECT_DECLARE, Project.class); | |||
log.info("预审申报事件之前,项目的状态为:{}"+project.getStatus()); | |||
if (StateMachineUtils.isCityProject(project) && StateMachineUtils.judgeDeclareAmount(project)){ | |||
project.setStatus(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()); | |||
project.setStatus(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode()); | |||
}else { | |||
project.setStatus(ProjectStatusEnum.PRE_APPLYING.getCode()); | |||
} | |||
@@ -97,11 +97,16 @@ public class ProjectDeclareStateMachineBuilder { | |||
.source(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) | |||
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),projectDeclareAction.new ProjectDeclareChoiceAction()) | |||
.last(ProjectStatusEnum.PRE_APPLYING,projectDeclareAction.new ProjectDeclareChoiceAction()).and() | |||
// 省级部门联审通过,从省级部门联审中到预审中 | |||
// 省级部门联审通过,从省级部门联审中到升级部门联审成功 | |||
.withExternal() | |||
.source(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS) | |||
.target(ProjectStatusEnum.PRE_APPLYING) | |||
.target(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS) | |||
.event(ProjectStatusChangeEvent.PROVINCIAL_DEPARTMENT_REVIEW_PASS).and() | |||
// 省级部门联审通过,从省级部门联审成功到预审中 | |||
.withExternal() | |||
.source(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS) | |||
.target(ProjectStatusEnum.PRE_APPLYING) | |||
.event(ProjectStatusChangeEvent.PROVINCIAL_PASS_TO_PRELIMINARY_REVIEW).and() | |||
// 省级部门联审不通过,从省级部门联审中到省级部门联审不通过 | |||
.withExternal() | |||
.source(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS) | |||
@@ -117,10 +122,10 @@ public class ProjectDeclareStateMachineBuilder { | |||
.source(ProjectStatusEnum.PRE_APPLYING) | |||
.target(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) | |||
.event(ProjectStatusChangeEvent.PRE_APPLYING_WITHDRAW).and() | |||
// 省级部门联审不通过重新申报,从待预审选择->省级部门联审中,待预审,完成其中一种状态 | |||
// 省级部门联审不通过重新申报,从待预审选择->省级部门联审成功,待预审,完成其中一种状态 | |||
.withChoice() | |||
.source(ProjectStatusEnum.PRE_APPLYING) | |||
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) | |||
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) | |||
.last(ProjectStatusEnum.PENDING_PREQUALIFICATION,projectDeclareAction.new ProjectDeclareChoiceAction()).and() | |||
// 预审通过,从预审中到部门联审中 | |||
.withExternal() | |||
@@ -137,10 +142,10 @@ public class ProjectDeclareStateMachineBuilder { | |||
.source(ProjectStatusEnum.PRE_APPLYING) | |||
.target(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) | |||
.event(ProjectStatusChangeEvent.PRE_APPLYING_WITHDRAW).and() | |||
// 预审中撤回,从待预审选择->省级部门联审中,待预审,完成其中一种状态 | |||
// 预审中撤回,从待预审选择->省级部门联审成功,待预审,完成其中一种状态 | |||
.withChoice() | |||
.source(ProjectStatusEnum.PRE_APPLYING) | |||
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) | |||
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) | |||
.last(ProjectStatusEnum.PENDING_PREQUALIFICATION,projectDeclareAction.new ProjectDeclareChoiceAction()).and() | |||
// 预审不通过重新提交,从预审不通过到待预审选择 | |||
.withExternal() | |||
@@ -44,9 +44,14 @@ public enum ProjectStatusChangeEvent { | |||
*/ | |||
PROVINCIAL_DEPARTMENT_REVIEW_REJECT(null, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode(), null), | |||
/** | |||
* 省级部门联审通过(项目状态变为:预审中) | |||
* 省级部门联审通过(项目状态变为:省级联审成功) | |||
*/ | |||
PROVINCIAL_DEPARTMENT_REVIEW_PASS(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode(), null, null), | |||
/** | |||
* 去到预审(项目状态变为:预审中) | |||
*/ | |||
PROVINCIAL_PASS_TO_PRELIMINARY_REVIEW(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode(), null, null), | |||
/** | |||
* 预审驳回(项目状态变为:预审不通过) | |||
*/ | |||
@@ -7,6 +7,7 @@ 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.google.common.collect.Lists; | |||
import com.ningdatech.basic.function.VUtils; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.basic.util.CollUtils; | |||
@@ -105,9 +106,10 @@ public class PrequalificationDeclaredProjectManage { | |||
.throwMessage(String.format("只有主管单位 【%s】的人 才能够提交",projectInfo.getSuperOrg())); | |||
//首先要判断 项目当前状态 是不是 待预审 | |||
VUtils.isTrue(!ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(projectInfo.getStatus()) || | |||
VUtils.isTrue((!ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(projectInfo.getStatus()) && | |||
!ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode().equals(projectInfo.getStatus())) || | |||
!ProjectStatusEnum.NOT_APPROVED.getCode().equals(projectInfo.getStage())) | |||
.throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段"); | |||
.throwMessage("提交失败 该项目不是 待预审状态(省级部门联审成功)或者未立项阶段"); | |||
//使用状态机 进入下一步 看看需不需要走省级审批 放入文件 | |||
projectInfo.setHigherLineSuperOrgReviewComments(projectDto.getHigherLineSuperOrgReviewComments()); | |||
@@ -233,9 +235,10 @@ public class PrequalificationDeclaredProjectManage { | |||
//限定参数 复制bean | |||
ProjectListReq req = new ProjectListReq(); | |||
BeanUtils.copyProperties(preReq,req); | |||
//项目阶段 状态 已定 待预审 | |||
//项目阶段 状态 已定 待预审和省级部门联审成功 | |||
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); | |||
req.setStatusList(Lists.newArrayList(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode(), | |||
ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode())); | |||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | |||
buildPermission(query,user); | |||
Page<Project> page = projectService.page(req.page(), query); | |||
@@ -259,7 +262,8 @@ public class PrequalificationDeclaredProjectManage { | |||
item.setInstCode(w.getInstCode()); | |||
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg()); | |||
if(user.getIsOrgAdmin() && | |||
ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus()) | |||
(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus()) || | |||
ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode().equals(item.getStatus())) | |||
&& StringUtils.isNotBlank(w.getSuperOrgCode()) && StringUtils.isNotBlank(user.getOrganizationCode()) | |||
&& w.getSuperOrgCode().equals(user.getOrganizationCode())){ | |||
item.setCanPreDeclared(Boolean.TRUE); | |||
@@ -291,7 +295,8 @@ public class PrequalificationDeclaredProjectManage { | |||
BeanUtils.copyProperties(preReq,req); | |||
//项目阶段 状态 已定 待预审 | |||
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); | |||
req.setStatusList(Lists.newArrayList(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode(), | |||
ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode())); | |||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | |||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | |||
//角色权限 | |||
@@ -29,6 +29,8 @@ public enum ProjectStatusEnum { | |||
UNDER_INTERNAL_AUDIT_NOT_PASS(10002, "单位内部审核不通过"), | |||
PENDING_PREQUALIFICATION(10003, "待预审"), | |||
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS(10004, "省级部门联审中"), | |||
JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS(10018, "省级部门联审通过"), | |||
THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED(10005, "省级部门联审不通过"), | |||
PRE_APPLYING(10006, "预审中"), | |||
PREQUALIFICATION_FAILED(10007, "预审不通过"), | |||
@@ -83,8 +83,8 @@ public class CheckProvincialReviewResultTask { | |||
project.setSjlsResult(CollUtil.isNotEmpty(projectRes.getProcessComment()) | |||
? JSON.toJSONString(projectRes.getProcessComment()) : StringUtils.EMPTY); | |||
projectService.updateById(project); | |||
//直接去预审 | |||
prequalificationDeclaredProjectManage.directStartProcess(project,project.getPreStartUserId()); | |||
//直接去预审(改成 省级部门联审成功 也可以去申报) | |||
// prequalificationDeclaredProjectManage.directStartProcess(project,project.getPreStartUserId()); | |||
}else if(ProjectProvincialAuditStatusEnum.FAIL.getCode().equals(projectRes.getProjectStatus())){ | |||
log.info("此项目 【{}】 审核不通过",projectRes.getProjectId()); | |||
stateMachineUtils.reject(project); | |||