|
|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.ningdatech.basic.model.ApiResponse; |
|
|
|
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage; |
|
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
|
import com.ningdatech.pmapi.projectlib.service.IProjectService; |
|
|
@@ -39,6 +40,8 @@ public class CheckProvincialReviewResultTask { |
|
|
|
private final IProjectService projectService; |
|
|
|
private final StateMachineUtils stateMachineUtils; |
|
|
|
|
|
|
|
private final PrequalificationDeclaredProjectManage prequalificationDeclaredProjectManage; |
|
|
|
|
|
|
|
@Scheduled(cron = "0 */2 * * * ?") |
|
|
|
public void statusFlow() throws UnknownHostException { |
|
|
|
//测试暂时用自己电脑HOST |
|
|
@@ -73,9 +76,11 @@ public class CheckProvincialReviewResultTask { |
|
|
|
log.info("此项目 【{}】 还在审核中",projectRes.getProjectId()); |
|
|
|
}else if(ProjectProvincialAuditStatusEnum.SUCCESS.getCode().equals(projectRes.getProjectStatus())){ |
|
|
|
log.info("此项目 【{}】 审核通过",projectRes.getProjectId()); |
|
|
|
//直接去预审 |
|
|
|
stateMachineUtils.pass(project); |
|
|
|
project.setUpdateOn(LocalDateTime.now()); |
|
|
|
projectService.updateById(project); |
|
|
|
prequalificationDeclaredProjectManage.directStartProcess(project,project.getPreStartUserId()); |
|
|
|
}else if(ProjectProvincialAuditStatusEnum.FAIL.getCode().equals(projectRes.getProjectStatus())){ |
|
|
|
log.info("此项目 【{}】 审核不通过",projectRes.getProjectId()); |
|
|
|
stateMachineUtils.reject(project); |
|
|
|