PoffyZhang 1 year ago
parent
commit
7d0ab6a3ca
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java

+ 9
- 9
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -481,7 +481,7 @@ public class ProjectLibManage {
*/
public Project saveProjectInDeclared(ProjectDTO projectDto, String instanceId,
String employeeCode) {
Project project = saveProjectNewVersion(projectDto, instanceId, employeeCode);
Project project = saveProjectNewVersion(projectDto, instanceId, employeeCode,Boolean.FALSE);
//保存项目和实例的关系
ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId());
@@ -533,7 +533,7 @@ public class ProjectLibManage {
* @return
*/
public Project saveProjectNewVersion(ProjectDTO projectDto, String instanceId,
String employeeCode) {
String employeeCode,Boolean isContruct) {
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示
try {
Project project = new Project();
@@ -553,7 +553,7 @@ public class ProjectLibManage {
}
} else {
//否则是重新提交的 新生成一个新版本的项目
project = newProjectWithVersion(projectDto);
project = newProjectWithVersion(projectDto,isContruct);
if (Objects.nonNull(project)) {
project.setInstCode(instanceId);
project.setSponsor(employeeCode);
@@ -606,7 +606,7 @@ public class ProjectLibManage {
project.setPrePlanProjectId(oldProject.getId());
}
if(projectService.save(project)){
saveApplication(projectDto,project,null);
saveApplication(projectDto,project,Boolean.TRUE);

// 将旧的项目版本置为不是最新
projectService.update(Wrappers.lambdaUpdate(Project.class)
@@ -617,7 +617,7 @@ public class ProjectLibManage {

} else {
//否则是被驳回,重新提交的 新生成一个新版本的项目
project = newProjectWithVersion(projectDto);
project = newProjectWithVersion(projectDto,Boolean.TRUE);
if (Objects.nonNull(project)) {
project.setInstCode(instanceId);
project.setSponsor(employeeCode);
@@ -638,10 +638,10 @@ public class ProjectLibManage {
* @param projectDto
* @return
*/
public Project reSaveProjectNewVersion(ProjectDTO projectDto) {
public Project reSaveProjectNewVersion(ProjectDTO projectDto,Boolean isContruct) {
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示
try {
return newProjectWithVersion(projectDto);
return newProjectWithVersion(projectDto,isContruct);
} catch (Exception e) {
log.error("项目信息入库错误 " + e);
throw new BusinessException("项目信息入库错误 :" + e);
@@ -652,7 +652,7 @@ public class ProjectLibManage {
* 重新提交工作流时 舍弃在原有项目修改
* 新增一个新的项目 新的版本号
*/
public Project newProjectWithVersion(ProjectDTO projecDto) {
public Project newProjectWithVersion(ProjectDTO projecDto,Boolean isContruct) {
Project oldProject = projectService.getById(projecDto.getId());
Project project = new Project();
VUtils.isTrue(Objects.isNull(oldProject))
@@ -677,7 +677,7 @@ public class ProjectLibManage {
.ne(Project::getId, project.getId())
.eq(Project::getProjectCode, project.getProjectCode()));

saveApplication(projecDto,project,null);
saveApplication(projecDto,project,isContruct);

return project;
}


Loading…
Cancel
Save