Browse Source

省级联审后 发起审核

master
PoffyZhang 1 year ago
parent
commit
6ec06fd684
3 changed files with 23 additions and 2 deletions
  1. +0
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java
  2. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java
  3. +18
    -1
      pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java

+ 0
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java View File

@@ -84,7 +84,6 @@ public class PrequalificationDeclaredProjectManage {

/**
* 提交预审
*
* @param dto
* @return
*/


+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java View File

@@ -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);


+ 18
- 1
pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java View File

@@ -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());
}
}

Loading…
Cancel
Save