Selaa lähdekoodia

龙泉市 单独的状态机 建设方案禁用 直接下一个状态

tags/24080901
PoffyZhang 1 vuosi sitten
vanhempi
commit
470110887d
3 muutettua tiedostoa jossa 17 lisäystä ja 5 poistoa
  1. +10
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java
  2. +2
    -4
      pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java
  3. +5
    -1
      pmapi/src/test/resources/application-dev.yml

+ 10
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java Näytä tiedosto

@@ -120,6 +120,16 @@ public class ConstructionPlanManage {
throw new BusinessException(String.format("此 【%s】区域找不到 建设申报流程配置", regionCode));
}

//如果被禁用了的话 直接跳过 进入到下一个状态
if(model.getIsStop()){
//被禁用了 调2次状态机
stateMachineUtils.pass(projectInfo);
stateMachineUtils.pass(projectInfo);
projectInfo.setUpdateOn(LocalDateTime.now());
projectService.updateById(projectInfo);
return "因为建设方案流程被禁用了 直接跳过!";
}

//首先要判断 项目当前状态 是不是 方案待申报
VUtils.isTrue(!ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(projectInfo.getStatus()) ||
!ProjectStatusEnum.NOT_APPROVED.getCode().equals(projectInfo.getStage()))


+ 2
- 4
pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java Näytä tiedosto

@@ -6,11 +6,9 @@ import com.ningdatech.pmapi.AppTests;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;

/**
* 状态机测试
*
@@ -27,7 +25,7 @@ public class StateMachineTest extends AppTests {

@Test
public void stateMachineTest() {
Project project = projectService.getById(292);
Project project = projectService.getById(485);
stateMachineUtils.pass(project);
System.out.println(String.format("project:%s", JSON.toJSONString(project)));
projectService.updateById(project);


+ 5
- 1
pmapi/src/test/resources/application-dev.yml Näytä tiedosto

@@ -11,6 +11,7 @@ spring:
store-type: redis
redis:
namespace: "spring:session"
timeout: 864000
redis:
timeout: 5000
host: 47.98.125.47
@@ -208,7 +209,10 @@ irs:
access-key: 42bcb49bea174986a3bfdfba7d005566
secret-key: bebff29877d4443abd67fc4f8fb335d8
api-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220309000004/seal-platform/seal/v1/rest/sign/signPdf

app-report:
url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020230427000001/irs-res-bill/report/pdfUrl
appScret: BCDSGS_4ab4235d26a9a357170a39f3a13fd68c
appKey: BCDSGA_d874c8e46b541eb4e8aac6510fd3351b
hostname: iZbp13nwyvib53j4j1p2xoZ

login:


Loading…
Peruuta
Tallenna