@@ -25,7 +25,7 @@ public class ProjectApplicationDto implements Serializable { | |||||
private Long id; | private Long id; | ||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private String projectId; | |||||
private Long projectId; | |||||
@ApiModelProperty("是否初次建设 0否 1是") | @ApiModelProperty("是否初次建设 0否 1是") | ||||
private Integer isFirst; | private Integer isFirst; | ||||
@@ -57,13 +57,13 @@ public class ProjectDto implements Serializable { | |||||
private String contactPhone; | private String contactPhone; | ||||
@ApiModelProperty("建设单位名称") | @ApiModelProperty("建设单位名称") | ||||
private String buildUnitName; | |||||
private String buildOrgName; | |||||
@ApiModelProperty("建设单位统一社会信用代码") | @ApiModelProperty("建设单位统一社会信用代码") | ||||
private String buildUnitCode; | |||||
private String buildOrgCode; | |||||
@ApiModelProperty("建设单位浙政钉ID") | @ApiModelProperty("建设单位浙政钉ID") | ||||
private String buildUnitZheJiangGovernmentDingId; | |||||
private String buildOrgZheJiangGovDingId; | |||||
@ApiModelProperty("项目类型 1:建设 2:运维") | @ApiModelProperty("项目类型 1:建设 2:运维") | ||||
private Integer projectType; | private Integer projectType; | ||||
@@ -122,10 +122,10 @@ public class ProjectDto implements Serializable { | |||||
private BigDecimal declareHaveAmount; | private BigDecimal declareHaveAmount; | ||||
@ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") | @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") | ||||
private BigDecimal declareGovernmentOwnFinanceAmount; | |||||
private BigDecimal declareGovOwnFinanceAmount; | |||||
@ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") | @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") | ||||
private BigDecimal declareGovernmentSuperiorFinanceAmount; | |||||
private BigDecimal declareGovSuperiorFinanceAmount; | |||||
@ApiModelProperty("银行贷款(万元)") | @ApiModelProperty("银行贷款(万元)") | ||||
private BigDecimal declareBankLendingAmount; | private BigDecimal declareBankLendingAmount; | ||||
@@ -149,10 +149,10 @@ public class ProjectDto implements Serializable { | |||||
private BigDecimal annualPlanHaveAmount; | private BigDecimal annualPlanHaveAmount; | ||||
@ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") | @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") | ||||
private BigDecimal annualPlanGovernmentOwnFinanceAmount; | |||||
private BigDecimal annualPlanGovOwnFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") | @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") | ||||
private BigDecimal annualPlanGovernmentSuperiorFinanceAmount; | |||||
private BigDecimal annualPlanGovSuperiorFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-银行贷款(万元)") | @ApiModelProperty("年度支付计划-银行贷款(万元)") | ||||
private BigDecimal annualPlanBankLendingAmount; | private BigDecimal annualPlanBankLendingAmount; | ||||
@@ -257,16 +257,16 @@ public class ProjectDto implements Serializable { | |||||
private BigDecimal approvedTotalInvestmentIncrease; | private BigDecimal approvedTotalInvestmentIncrease; | ||||
@ApiModelProperty("上级主管部门") | @ApiModelProperty("上级主管部门") | ||||
private String higherSuperUnit; | |||||
private String higherSuperOrg; | |||||
@ApiModelProperty("上级主管部门Code") | @ApiModelProperty("上级主管部门Code") | ||||
private String higherSuperUnitCode; | |||||
private String higherSuperOrgCode; | |||||
@ApiModelProperty("主管部门名称") | @ApiModelProperty("主管部门名称") | ||||
private String superUnit; | |||||
private String superOrg; | |||||
@ApiModelProperty("主管部门Code") | @ApiModelProperty("主管部门Code") | ||||
private String superUnitCode; | |||||
private String superOrgCode; | |||||
@ApiModelProperty("前端所需验证字段") | @ApiModelProperty("前端所需验证字段") | ||||
private Integer allApplicationsDone; | private Integer allApplicationsDone; | ||||
@@ -22,7 +22,7 @@ public class StateMachineTest extends AppTests { | |||||
@Test | @Test | ||||
public void stateMachineTest() throws Exception { | public void stateMachineTest() throws Exception { | ||||
Project project = new Project(); | 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); | stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); | ||||
} | } | ||||
} | } |
@@ -1,11 +1,13 @@ | |||||
package com.ningdatech.pmapi.sys.project; | package com.ningdatech.pmapi.sys.project; | ||||
import cn.hutool.core.date.StopWatch; | import cn.hutool.core.date.StopWatch; | ||||
import com.alibaba.fastjson.JSON; | |||||
import com.ningdatech.pmapi.AppTests; | import com.ningdatech.pmapi.AppTests; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | ||||
import com.ningdatech.pmapi.projectlib.enums.ProjectStatusEnum; | import com.ningdatech.pmapi.projectlib.enums.ProjectStatusEnum; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | |||||
import org.junit.Test; | import org.junit.Test; | ||||
import javax.annotation.Resource; | import javax.annotation.Resource; | ||||
@@ -21,6 +23,9 @@ public class ProjectStateTest extends AppTests { | |||||
@Resource | @Resource | ||||
private StateMachineUtils stateMachineUtils; | private StateMachineUtils stateMachineUtils; | ||||
@Resource | |||||
private IProjectService projectService; | |||||
@Test | @Test | ||||
public void execute() throws Exception { | public void execute() throws Exception { | ||||
StopWatch stopWatch = new StopWatch(); | StopWatch stopWatch = new StopWatch(); | ||||
@@ -30,11 +35,22 @@ public class ProjectStateTest extends AppTests { | |||||
Project project = new Project(); | Project project = new Project(); | ||||
project.setInstCode("1"); | project.setInstCode("1"); | ||||
project.setId(1L); | 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); | stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); | ||||
stopWatch.stop(); | stopWatch.stop(); | ||||
System.out.println("调用状态机结束 :" + stopWatch.getTotalTimeSeconds()); | 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)); | |||||
} | |||||
} | } |