diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java index 9039afe..b0d7ad9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java @@ -84,7 +84,6 @@ public class PrequalificationDeclaredProjectManage { /** * 提交预审 - * * @param dto * @return */ diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java index 5a8fb0b..2accde0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java @@ -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); diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java b/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java index aa84154..a4eba2d 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java @@ -1,8 +1,13 @@ package com.ningdatech.pmapi.provincial; import cn.hutool.crypto.SecureUtil; +import com.ningdatech.pmapi.AppTests; +import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage; +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.service.IProjectService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.binary.Base64; +import org.springframework.beans.factory.annotation.Autowired; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; @@ -17,7 +22,13 @@ import java.security.NoSuchAlgorithmException; * @Author PoffyZhang */ @Slf4j -public class Test { +public class Test extends AppTests { + + @Autowired + private PrequalificationDeclaredProjectManage prequalificationDeclaredProjectManage; + + @Autowired + private IProjectService projectService; @org.junit.Test public void test() throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException { @@ -34,4 +45,10 @@ public class Test { String str = SecureUtil.hmacSha256(secret).digestBase64(bytesToSign,false); log.info("" + str); } + + @org.junit.Test + public void Test222(){ + Project project = projectService.getById(340); + prequalificationDeclaredProjectManage.directStartProcess(project,project.getPreStartUserId()); + } }