Bladeren bron

项目调整 自测完成

master
PoffyZhang 1 jaar geleden
bovenliggende
commit
dde6d5b093
1 gewijzigde bestanden met toevoegingen van 14 en 6 verwijderingen
  1. +14
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java

+ 14
- 6
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java Bestand weergeven

@@ -57,6 +57,19 @@ public class ProjectAdjustmentManage {
//项目名称去重
defaultDeclaredProjectManage.checkDuplication(projectDto);

//修改项目内容
if(!modifyProject(projectDto)){
throw new BusinessException("调整项目失败!");
}

//最后去重新 提交项目流程 不同的状态 提交到不同的工作流去
Function<DefaultDeclaredDTO, String> declaredFunction =
reStartProcessMapUtil.reStartProcessMap.get(projectInfo.getStatus());
VUtils.isTrue(Objects.isNull(declaredFunction)).throwMessage("状态不正常 没有找到对应申报函数!");
return declaredFunction.apply(dto);
}

private Boolean modifyProject(ProjectDTO projectDto) {
//先修改项目信息
Project project = new Project();
BeanUtils.copyProperties(projectDto,project);
@@ -78,11 +91,6 @@ public class ProjectAdjustmentManage {
}).collect(Collectors.toList());
projectApplicationService.saveBatch(applications);
}

//最后去重新 提交项目流程 不同的状态 提交到不同的工作流去
Function<DefaultDeclaredDTO, String> declaredFunction =
reStartProcessMapUtil.reStartProcessMap.get(projectInfo.getStatus());
VUtils.isTrue(Objects.isNull(declaredFunction)).throwMessage("状态不正常 没有找到对应申报函数!");
return declaredFunction.apply(dto);
return Boolean.TRUE;
}
}

Laden…
Annuleren
Opslaan