PoffyZhang 1 год назад
Родитель
Сommit
8f678e4828
3 измененных файлов: 15 добавлений и 11 удалений
  1. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/FinalAcceptanceController.java
  2. +3
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java
  3. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java

+ 8
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/FinalAcceptanceController.java Просмотреть файл

@@ -59,4 +59,12 @@ public class FinalAcceptanceController {
String instanceId = finalAcceptanceManage.startProcess(dto);
return "终验申报 【" + instanceId + "】 成功";
}

@ApiOperation(value = "终验申报重新提交", notes = "终验申报重新提交")
@WebLog("终验申报重新提交")
@PostMapping("/restart-process")
public String restartTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) {
String instanceId = finalAcceptanceManage.restartProcess(dto);
return "终验申报 【" + instanceId + "】 成功";
}
}

+ 3
- 9
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java Просмотреть файл

@@ -206,9 +206,6 @@ public class FinalAcceptanceManage {

String regionCode = projectInfo.getAreaCode();

//放入终验材料
projectInfo.setFinalAcceptanceMaterials(projectDto.getFinalAcceptanceMaterials());

WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class)
.eq(WflowModels::getRegionCode, regionCode)
.eq(WflowModels::getProcessType, ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode())
@@ -238,8 +235,8 @@ public class FinalAcceptanceManage {

//保存终验项目
//生成新版本 并且进入下一状态
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId,
InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode(),Boolean.TRUE);
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId,projectDto,
InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode(),Boolean.FALSE);

//发送给第一个审批人消息
noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId,
@@ -267,9 +264,6 @@ public class FinalAcceptanceManage {

String regionCode = projectInfo.getAreaCode();

//放入终验材料
projectInfo.setFinalAcceptanceMaterials(projectDto.getFinalAcceptanceMaterials());

WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class)
.eq(WflowModels::getRegionCode, regionCode)
.eq(WflowModels::getProcessType, ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode())
@@ -299,7 +293,7 @@ public class FinalAcceptanceManage {

//保存终验项目
//生成新版本 并且进入下一状态
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId,
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId,projectDto,
InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode(),Boolean.TRUE);

//发送给第一个审批人消息


+ 4
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Просмотреть файл

@@ -790,7 +790,7 @@ public class ProjectLibManage {
return project;
}

public Project saveProjectWithVersionAndPass(Project oldProject, String instanceId, Integer instType,Boolean isBackReject) {
public Project saveProjectWithVersionAndPass(Project oldProject, String instanceId,ProjectDTO dto, Integer instType,Boolean isBackReject) {
Project project = new Project();
VUtils.isTrue(Objects.isNull(oldProject))
.throwMessage("项目不存在!");
@@ -804,9 +804,11 @@ public class ProjectLibManage {
// 标识保存的项目信息是否为建设方案申报项目
project.setIsConstruct(Boolean.FALSE);
project.setIsBackReject(isBackReject);
//终验材料
project.setFinalAcceptanceMaterials(dto.getFinalAcceptanceMaterials());
stateMachineUtils.pass(project);

oldProject.setIsBackReject(Boolean.TRUE);
oldProject.setIsBackReject(isBackReject);
projectService.updateById(oldProject);

if (projectService.save(project)) {


Загрузка…
Отмена
Сохранить