Преглед изворни кода

提交项目 优化

tags/24080901
PoffyZhang пре 1 година
родитељ
комит
d893fb6dcc
4 измењених фајлова са 31 додато и 15 уклоњено
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDto.java
  2. +11
    -11
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java
  3. +1
    -1
      pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java
  4. +18
    -2
      pmapi/src/test/java/com/ningdatech/pmapi/sys/project/ProjectStateTest.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDto.java Прегледај датотеку

@@ -25,7 +25,7 @@ public class ProjectApplicationDto implements Serializable {
private Long id;

@ApiModelProperty("项目ID")
private String projectId;
private Long projectId;

@ApiModelProperty("是否初次建设 0否 1是")
private Integer isFirst;


+ 11
- 11
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java Прегледај датотеку

@@ -57,13 +57,13 @@ public class ProjectDto implements Serializable {
private String contactPhone;

@ApiModelProperty("建设单位名称")
private String buildUnitName;
private String buildOrgName;

@ApiModelProperty("建设单位统一社会信用代码")
private String buildUnitCode;
private String buildOrgCode;

@ApiModelProperty("建设单位浙政钉ID")
private String buildUnitZheJiangGovernmentDingId;
private String buildOrgZheJiangGovDingId;

@ApiModelProperty("项目类型 1:建设 2:运维")
private Integer projectType;
@@ -122,10 +122,10 @@ public class ProjectDto implements Serializable {
private BigDecimal declareHaveAmount;

@ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)")
private BigDecimal declareGovernmentOwnFinanceAmount;
private BigDecimal declareGovOwnFinanceAmount;

@ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)")
private BigDecimal declareGovernmentSuperiorFinanceAmount;
private BigDecimal declareGovSuperiorFinanceAmount;

@ApiModelProperty("银行贷款(万元)")
private BigDecimal declareBankLendingAmount;
@@ -149,10 +149,10 @@ public class ProjectDto implements Serializable {
private BigDecimal annualPlanHaveAmount;

@ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)")
private BigDecimal annualPlanGovernmentOwnFinanceAmount;
private BigDecimal annualPlanGovOwnFinanceAmount;

@ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)")
private BigDecimal annualPlanGovernmentSuperiorFinanceAmount;
private BigDecimal annualPlanGovSuperiorFinanceAmount;

@ApiModelProperty("年度支付计划-银行贷款(万元)")
private BigDecimal annualPlanBankLendingAmount;
@@ -257,16 +257,16 @@ public class ProjectDto implements Serializable {
private BigDecimal approvedTotalInvestmentIncrease;

@ApiModelProperty("上级主管部门")
private String higherSuperUnit;
private String higherSuperOrg;

@ApiModelProperty("上级主管部门Code")
private String higherSuperUnitCode;
private String higherSuperOrgCode;

@ApiModelProperty("主管部门名称")
private String superUnit;
private String superOrg;

@ApiModelProperty("主管部门Code")
private String superUnitCode;
private String superOrgCode;

@ApiModelProperty("前端所需验证字段")
private Integer allApplicationsDone;


+ 1
- 1
pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java Прегледај датотеку

@@ -22,7 +22,7 @@ public class StateMachineTest extends AppTests {
@Test
public void stateMachineTest() throws Exception {
Project project = new Project();
project.setProjectStatusSecond(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode());
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode());
stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS);
}
}

+ 18
- 2
pmapi/src/test/java/com/ningdatech/pmapi/sys/project/ProjectStateTest.java Прегледај датотеку

@@ -1,11 +1,13 @@
package com.ningdatech.pmapi.sys.project;

import cn.hutool.core.date.StopWatch;
import com.alibaba.fastjson.JSON;
import com.ningdatech.pmapi.AppTests;
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectlib.enums.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import org.junit.Test;

import javax.annotation.Resource;
@@ -21,6 +23,9 @@ public class ProjectStateTest extends AppTests {
@Resource
private StateMachineUtils stateMachineUtils;

@Resource
private IProjectService projectService;

@Test
public void execute() throws Exception {
StopWatch stopWatch = new StopWatch();
@@ -30,11 +35,22 @@ public class ProjectStateTest extends AppTests {
Project project = new Project();
project.setInstCode("1");
project.setId(1L);
project.setProjectStatusFirst(ProjectStatusEnum.NOT_APPROVED.getCode());
project.setProjectStatusSecond(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode());
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode());
stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS);

stopWatch.stop();
System.out.println("调用状态机结束 :" + stopWatch.getTotalTimeSeconds());
}

@Test
public void getProject() {
StopWatch stopWatch = new StopWatch();
stopWatch.start();

Project project = projectService.getById(1);

stopWatch.stop();
System.out.println("project :" + JSON.toJSONString(project));
}
}

Loading…
Откажи
Сачувај