Bläddra i källkod

Merge remote-tracking branch 'origin/master'

master
WendyYang 1 år sedan
förälder
incheckning
fd2a9e7d89
6 ändrade filer med 16 tillägg och 24 borttagningar
  1. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java
  2. +0
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java
  3. +0
    -13
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  4. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  5. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java
  6. +6
    -2
      pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java

+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java Visa fil

@@ -91,7 +91,7 @@ public class ProjectDeclareStateMachineBuilder {
.withChoice()
.source(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE)
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),projectDeclareAction.new ProjectDeclareChoiceAction())
.last(ProjectStatusEnum.PRE_APPLYING).and()
.last(ProjectStatusEnum.PRE_APPLYING,projectDeclareAction.new ProjectDeclareChoiceAction()).and()
// 待预审撤回,从待预审到单位内部审核中
.withExternal()
.source(ProjectStatusEnum.PENDING_PREQUALIFICATION)
@@ -127,11 +127,11 @@ public class ProjectDeclareStateMachineBuilder {
.source(ProjectStatusEnum.PRE_APPLYING)
.target(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE)
.event(ProjectStatusChangeEvent.PRE_APPLYING_WITHDRAW).and()
// 预审中撤回,从待预审选择->省级部门联审中,预审,完成其中一种状态
// 预审中撤回,从待预审选择->省级部门联审中,预审,完成其中一种状态
.withChoice()
.source(ProjectStatusEnum.PRE_APPLYING)
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction())
.last(ProjectStatusEnum.PRE_APPLYING).and()
.last(ProjectStatusEnum.PENDING_PREQUALIFICATION,projectDeclareAction.new ProjectDeclareChoiceAction()).and()
// 部门联审通过,从部门联审中到年度计划中
.withExternal()
.source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW)


+ 0
- 6
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java Visa fil

@@ -40,10 +40,4 @@ public class ProjectLibController {
return projectLibManage.getProjectDetail(id);
}

@GetMapping("/getProjectInfo")
@ApiOperation("获取申报项目信息")
private Project getProjectInfo (@RequestParam String processInstanceId){
return projectLibManage.getProjectInfo(processInstanceId);
}

}

+ 0
- 13
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Visa fil

@@ -95,17 +95,4 @@ public class ProjectLibManage {
return vo;
}

/**
*
* @param instanceCode 申报项目流程实例编号
* @return com.ningdatech.pmapi.projectlib.model.entity.Project
* @author CMM
* @since 2023/02/11 11:15
*/
public Project getProjectInfo(String instanceCode) {
// 查询项目申报信息
Project projectInfo = projectService.getOne(Wrappers.lambdaQuery(Project.class)
.eq(Project::getInstCode, instanceCode));
return projectInfo;
}
}

+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Visa fil

@@ -161,6 +161,7 @@ public class TodoCenterManage {
List<ResToBeProcessedDTO> resVos = results.stream().map(d -> {
ResToBeProcessedDTO res = new ResToBeProcessedDTO();
BeanUtils.copyProperties(d, res);
res.setProjectId(d.getId());
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus()));
LocalDateTime processLaunchTime = d.getCreateOn();
String format = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm");
@@ -952,6 +953,7 @@ public class TodoCenterManage {

ResToBeProcessedDTO res = new ResToBeProcessedDTO();
BeanUtils.copyProperties(d, res);
res.setProjectId(d.getId());
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus()));
LocalDateTime processLaunchTime = d.getCreateOn();
String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm");
@@ -1124,6 +1126,7 @@ public class TodoCenterManage {
results.stream().map(d -> {
ResToBeProcessedDTO res = new ResToBeProcessedDTO();
BeanUtils.copyProperties(d, res);
res.setProjectId(d.getId());
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus()));
LocalDateTime processLaunchTime = d.getCreateOn();
String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm");
@@ -1330,6 +1333,7 @@ public class TodoCenterManage {
results.stream().map(d -> {
ResToBeProcessedDTO res = new ResToBeProcessedDTO();
BeanUtils.copyProperties(d, res);
res.setProjectId(d.getId());
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus()));
LocalDateTime processLaunchTime = d.getCreateOn();
String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm");


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java Visa fil

@@ -29,6 +29,9 @@ import org.springframework.format.annotation.DateTimeFormat;
public class ResToBeProcessedDTO implements Serializable {
private static final long serialVersionUID = 1L;

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

@ApiModelProperty("流程实例编号")
private String instanceCode;



+ 6
- 2
pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java Visa fil

@@ -8,6 +8,8 @@ import com.ningdatech.pmapi.projectlib.model.entity.Project;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;

/**
* 状态机测试
*
@@ -22,7 +24,9 @@ public class StateMachineTest extends AppTests {
@Test
public void stateMachineTest() throws Exception {
Project project = new Project();
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode());
stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS);
project.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode());
project.setDeclareAmount(BigDecimal.valueOf(2000));
// stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS);
stateMachineUtils.execute(project, stateMachineUtils.getProjectStatusPassEvent(project.getStatus()));
}
}

Laddar…
Avbryt
Spara