|
|
@@ -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; |
|
|
|
} |
|
|
|
} |