@@ -28,7 +28,7 @@ public class ProjectDeclareChoiceAction implements Action<ProjectStatusEnum, Pro | |||||
if (projectStatusEnum.equals(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE)){ | if (projectStatusEnum.equals(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE)){ | ||||
Project project = stateContext.getMessage().getHeaders().get(PROJECT_DECLARE, Project.class); | Project project = stateContext.getMessage().getHeaders().get(PROJECT_DECLARE, Project.class); | ||||
log.info("预审申报事件之前,项目的状态为:{}"+project.getProjectStatusSecond()); | log.info("预审申报事件之前,项目的状态为:{}"+project.getProjectStatusSecond()); | ||||
if (StateMachineUtils.isCityProject(project) && StateMachineUtils.JudgeDeclareAmount(project)){ | |||||
if (StateMachineUtils.isCityProject(project) && StateMachineUtils.judgeDeclareAmount(project)){ | |||||
project.setProjectStatusSecond(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()); | project.setProjectStatusSecond(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()); | ||||
}else { | }else { | ||||
project.setProjectStatusSecond(ProjectStatusEnum.PRE_APPLYING.getCode()); | project.setProjectStatusSecond(ProjectStatusEnum.PRE_APPLYING.getCode()); | ||||
@@ -24,7 +24,7 @@ public class ProjectDeclareGuardFactory { | |||||
public boolean evaluate(StateContext<ProjectStatusEnum, ProjectStatusChangeEvent> context) { | public boolean evaluate(StateContext<ProjectStatusEnum, ProjectStatusChangeEvent> context) { | ||||
Project project = context.getMessage().getHeaders().get(PROJECT_DECLARE, Project.class); | Project project = context.getMessage().getHeaders().get(PROJECT_DECLARE, Project.class); | ||||
// 判断申报项目是否是市级项目,且申报金额是否大于等于1000万元 | // 判断申报项目是否是市级项目,且申报金额是否大于等于1000万元 | ||||
if (StateMachineUtils.isCityProject(project) && StateMachineUtils.JudgeDeclareAmount(project)){ | |||||
if (StateMachineUtils.isCityProject(project) && StateMachineUtils.judgeDeclareAmount(project)){ | |||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
@@ -46,13 +46,13 @@ public class StateMachineUtils { | |||||
} | } | ||||
/** | /** | ||||
* 判断 | |||||
* 判断项目申报金额是否大于1000万元 | |||||
* @param project | * @param project | ||||
* @return boolean | * @return boolean | ||||
* @author CMM | * @author CMM | ||||
* @since 2023/02/07 17:13 | * @since 2023/02/07 17:13 | ||||
*/ | */ | ||||
public static boolean JudgeDeclareAmount(Project project) { | |||||
public static boolean judgeDeclareAmount(Project project) { | |||||
int flag = project.getDeclareAmount().compareTo(ProjectDeclareConstants.Number.DECLARE_AMOUNT_JUDGEMENT); | int flag = project.getDeclareAmount().compareTo(ProjectDeclareConstants.Number.DECLARE_AMOUNT_JUDGEMENT); | ||||
if (flag > 0 || flag == 0){ | if (flag > 0 || flag == 0){ | ||||
return true; | return true; | ||||