@@ -238,7 +238,8 @@ public class FinalAcceptanceManage { | |||||
//保存终验项目 | //保存终验项目 | ||||
//生成新版本 并且进入下一状态 | //生成新版本 并且进入下一状态 | ||||
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()); | |||||
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, | |||||
InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode(),Boolean.TRUE); | |||||
//发送给第一个审批人消息 | //发送给第一个审批人消息 | ||||
noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, | noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, | ||||
@@ -298,7 +299,8 @@ public class FinalAcceptanceManage { | |||||
//保存终验项目 | //保存终验项目 | ||||
//生成新版本 并且进入下一状态 | //生成新版本 并且进入下一状态 | ||||
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()); | |||||
projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, | |||||
InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode(),Boolean.TRUE); | |||||
//发送给第一个审批人消息 | //发送给第一个审批人消息 | ||||
noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, | noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, | ||||
@@ -102,9 +102,6 @@ public class ReviewByDeptJointManage { | |||||
//保存项目信息 | //保存项目信息 | ||||
projectInfo = projectLibManage.saveProjectWithVersion(projectInfo,instanceId,ProjectProcessStageEnum.DEPARTMENT_JOINT_APPROVAL_PROCESS.getCode()); | projectInfo = projectLibManage.saveProjectWithVersion(projectInfo,instanceId,ProjectProcessStageEnum.DEPARTMENT_JOINT_APPROVAL_PROCESS.getCode()); | ||||
// if(!modifyProject(projectInfo, instanceId)){ | |||||
// return Boolean.FALSE; | |||||
// } | |||||
//发送给第一个审批人消息 | //发送给第一个审批人消息 | ||||
noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, | noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, | ||||
@@ -12,6 +12,7 @@ import com.ningdatech.pmapi.common.constant.BizConst; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | ||||
import com.ningdatech.pmapi.todocenter.constant.TodoCenterConstant; | |||||
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | import com.wflow.workflow.bean.process.ProgressNode; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | import com.wflow.workflow.bean.vo.ProcessDetailVO; | ||||
@@ -64,6 +65,7 @@ public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle | |||||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ||||
.in(ProjectInst::getProjectId, allVersionProjectIds) | .in(ProjectInst::getProjectId, allVersionProjectIds) | ||||
.eq(ProjectInst::getInstType, InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode()) | .eq(ProjectInst::getInstType, InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode()) | ||||
.ne(ProjectInst::getInstCode, TodoCenterConstant.Declared.NULL_INST_CODE) | |||||
.orderByDesc(ProjectInst::getCreatOn) | .orderByDesc(ProjectInst::getCreatOn) | ||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
ProcessProgressVo instanceDetail = null; | ProcessProgressVo instanceDetail = null; | ||||
@@ -10,6 +10,7 @@ import com.ningdatech.basic.util.NdDateUtils; | |||||
import com.ningdatech.pmapi.common.constant.BizConst; | import com.ningdatech.pmapi.common.constant.BizConst; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | ||||
import com.ningdatech.pmapi.todocenter.constant.TodoCenterConstant; | |||||
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | import com.wflow.workflow.bean.process.ProgressNode; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | import com.wflow.workflow.bean.vo.ProcessDetailVO; | ||||
@@ -66,6 +67,7 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { | |||||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ||||
.in(ProjectInst::getProjectId, allVersionProjectIds) | .in(ProjectInst::getProjectId, allVersionProjectIds) | ||||
.eq(ProjectInst::getInstType, InstTypeEnum.DEPT_UNITED_REVIEW.getCode()) | .eq(ProjectInst::getInstType, InstTypeEnum.DEPT_UNITED_REVIEW.getCode()) | ||||
.ne(ProjectInst::getInstCode, TodoCenterConstant.Declared.NULL_INST_CODE) | |||||
.orderByDesc(ProjectInst::getCreatOn) | .orderByDesc(ProjectInst::getCreatOn) | ||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
if (Objects.isNull(projectInst)){ | if (Objects.isNull(projectInst)){ | ||||
@@ -12,6 +12,7 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | ||||
import com.ningdatech.pmapi.todocenter.constant.TodoCenterConstant; | |||||
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | import com.wflow.workflow.bean.process.ProgressNode; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | import com.wflow.workflow.bean.vo.ProcessDetailVO; | ||||
@@ -65,6 +66,7 @@ public class PreliminaryPreviewHandle extends AbstractProcessBusinessHandle { | |||||
.eq(ProjectInst::getProjectId, projectId) | .eq(ProjectInst::getProjectId, projectId) | ||||
.eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode()) | .eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode()) | ||||
.orderByDesc(ProjectInst::getCreatOn) | .orderByDesc(ProjectInst::getCreatOn) | ||||
.ne(ProjectInst::getInstCode, TodoCenterConstant.Declared.NULL_INST_CODE) | |||||
.last("limit 1")); | .last("limit 1")); | ||||
ProcessProgressVo instanceDetail = null; | ProcessProgressVo instanceDetail = null; | ||||
// 未找到当前版本项目的预审审核流程且当前项目版本号大于1(是被驳回重新申报的项目或者建设方案申报的项目) | // 未找到当前版本项目的预审审核流程且当前项目版本号大于1(是被驳回重新申报的项目或者建设方案申报的项目) | ||||
@@ -13,6 +13,7 @@ import com.ningdatech.pmapi.projectlib.model.entity.Project; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.todocenter.constant.TodoCenterConstant; | |||||
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | import com.wflow.workflow.bean.process.ProgressNode; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | import com.wflow.workflow.bean.vo.ProcessDetailVO; | ||||
@@ -60,6 +61,7 @@ public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle | |||||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ||||
.in(ProjectInst::getProjectId, allVersionProjectIds) | .in(ProjectInst::getProjectId, allVersionProjectIds) | ||||
.eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()) | .eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()) | ||||
.ne(ProjectInst::getInstCode, TodoCenterConstant.Declared.NULL_INST_CODE) | |||||
.orderByDesc(ProjectInst::getCreatOn) | .orderByDesc(ProjectInst::getCreatOn) | ||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
@@ -20,6 +20,7 @@ import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | |||||
import com.ningdatech.pmapi.common.constant.CommonConst; | import com.ningdatech.pmapi.common.constant.CommonConst; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; | ||||
import com.ningdatech.pmapi.todocenter.constant.TodoCenterConstant; | |||||
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; | ||||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | import com.wflow.workflow.bean.process.ProgressNode; | ||||
@@ -67,6 +68,7 @@ public class UnitInnerAuditHandle extends AbstractProcessBusinessHandle { | |||||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | ||||
.in(ProjectInst::getProjectId, allVersionProjectIds) | .in(ProjectInst::getProjectId, allVersionProjectIds) | ||||
.eq(ProjectInst::getInstType, InstTypeEnum.UNIT_INNER_AUDIT.getCode()) | .eq(ProjectInst::getInstType, InstTypeEnum.UNIT_INNER_AUDIT.getCode()) | ||||
.ne(ProjectInst::getInstCode, TodoCenterConstant.Declared.NULL_INST_CODE) | |||||
.orderByDesc(ProjectInst::getCreatOn) | .orderByDesc(ProjectInst::getCreatOn) | ||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
ProcessProgressVo instanceDetail = null; | ProcessProgressVo instanceDetail = null; | ||||
@@ -317,6 +317,7 @@ public class ProjectLibManage { | |||||
project.setVersion(oldProject.getVersion() + 1); | project.setVersion(oldProject.getVersion() + 1); | ||||
// 标记为建设方案申报 | // 标记为建设方案申报 | ||||
project.setIsConstruct(Boolean.TRUE); | project.setIsConstruct(Boolean.TRUE); | ||||
project.setIsBackReject(Boolean.FALSE); | |||||
// 保存初步方案项目ID | // 保存初步方案项目ID | ||||
if (Boolean.TRUE.equals(oldProject.getIsConstruct())) { | if (Boolean.TRUE.equals(oldProject.getIsConstruct())) { | ||||
// 重新提交 | // 重新提交 | ||||
@@ -384,9 +385,13 @@ public class ProjectLibManage { | |||||
project.setId(null); | project.setId(null); | ||||
project.setCreateOn(LocalDateTime.now()); | project.setCreateOn(LocalDateTime.now()); | ||||
project.setUpdateOn(LocalDateTime.now()); | project.setUpdateOn(LocalDateTime.now()); | ||||
project.setIsBackReject(Boolean.FALSE); | |||||
stateMachineUtils.pass(project); | stateMachineUtils.pass(project); | ||||
projectService.save(project); | projectService.save(project); | ||||
oldProject.setIsBackReject(Boolean.TRUE); | |||||
projectService.updateById(oldProject); | |||||
projectService.update(Wrappers.lambdaUpdate(Project.class) | projectService.update(Wrappers.lambdaUpdate(Project.class) | ||||
.set(Project::getNewest, Boolean.FALSE) | .set(Project::getNewest, Boolean.FALSE) | ||||
.ne(Project::getId, project.getId()) | .ne(Project::getId, project.getId()) | ||||
@@ -410,6 +415,8 @@ public class ProjectLibManage { | |||||
project.setId(null); | project.setId(null); | ||||
project.setCreateOn(LocalDateTime.now()); | project.setCreateOn(LocalDateTime.now()); | ||||
project.setUpdateOn(LocalDateTime.now()); | project.setUpdateOn(LocalDateTime.now()); | ||||
//都是在驳回 重新提交时用的 | |||||
project.setIsBackReject(Boolean.FALSE); | |||||
if (Objects.nonNull(stageCode)) { | if (Objects.nonNull(stageCode)) { | ||||
project.setStage(stageCode); | project.setStage(stageCode); | ||||
} | } | ||||
@@ -417,6 +424,9 @@ public class ProjectLibManage { | |||||
project.setStatus(statusCode); | project.setStatus(statusCode); | ||||
} | } | ||||
oldProject.setIsBackReject(Boolean.TRUE); | |||||
projectService.updateById(oldProject); | |||||
if (projectService.save(project)) { | if (projectService.save(project)) { | ||||
projectService.update(Wrappers.lambdaUpdate(Project.class) | projectService.update(Wrappers.lambdaUpdate(Project.class) | ||||
.set(Project::getNewest, Boolean.FALSE) | .set(Project::getNewest, Boolean.FALSE) | ||||
@@ -500,7 +510,7 @@ public class ProjectLibManage { | |||||
return project; | return project; | ||||
} | } | ||||
public Project saveProjectWithVersionAndPass(Project oldProject, String instanceId, Integer instType) { | |||||
public Project saveProjectWithVersionAndPass(Project oldProject, String instanceId, Integer instType,Boolean isBackReject) { | |||||
Project project = new Project(); | Project project = new Project(); | ||||
VUtils.isTrue(Objects.isNull(oldProject)) | VUtils.isTrue(Objects.isNull(oldProject)) | ||||
.throwMessage("项目不存在!"); | .throwMessage("项目不存在!"); | ||||
@@ -512,9 +522,13 @@ public class ProjectLibManage { | |||||
project.setCreateOn(LocalDateTime.now()); | project.setCreateOn(LocalDateTime.now()); | ||||
project.setUpdateOn(LocalDateTime.now()); | project.setUpdateOn(LocalDateTime.now()); | ||||
// 标识保存的项目信息是否为建设方案申报项目 | // 标识保存的项目信息是否为建设方案申报项目 | ||||
project.setIsConstruct(Boolean.TRUE); | |||||
project.setIsConstruct(Boolean.FALSE); | |||||
project.setIsBackReject(isBackReject); | |||||
stateMachineUtils.pass(project); | stateMachineUtils.pass(project); | ||||
oldProject.setIsBackReject(Boolean.TRUE); | |||||
projectService.updateById(oldProject); | |||||
if (projectService.save(project)) { | if (projectService.save(project)) { | ||||
//保存项目和实例的关系 | //保存项目和实例的关系 | ||||
ProjectInst projectInst = new ProjectInst(); | ProjectInst projectInst = new ProjectInst(); | ||||
@@ -549,9 +563,12 @@ public class ProjectLibManage { | |||||
project.setCreateOn(LocalDateTime.now()); | project.setCreateOn(LocalDateTime.now()); | ||||
project.setUpdateOn(LocalDateTime.now()); | project.setUpdateOn(LocalDateTime.now()); | ||||
// 标识保存的项目信息是否为建设方案申报项目 | // 标识保存的项目信息是否为建设方案申报项目 | ||||
project.setIsConstruct(Boolean.TRUE); | |||||
project.setIsConstruct(Boolean.FALSE); | |||||
stateMachineUtils.pass(project); | stateMachineUtils.pass(project); | ||||
oldProject.setIsBackReject(Boolean.TRUE); | |||||
projectService.updateById(oldProject); | |||||
if (projectService.save(project)) { | if (projectService.save(project)) { | ||||
//保存项目和实例的关系 | //保存项目和实例的关系 | ||||
ProjectInst projectInst = new ProjectInst(); | ProjectInst projectInst = new ProjectInst(); | ||||
@@ -1020,8 +1037,11 @@ public class ProjectLibManage { | |||||
return res; | return res; | ||||
} | } | ||||
//只查 当前版本 和历史被驳回|退回的版本 | |||||
List<Project> historyProjects = projectService.list(Wrappers.lambdaQuery(Project.class) | List<Project> historyProjects = projectService.list(Wrappers.lambdaQuery(Project.class) | ||||
.eq(Project::getProjectCode, project.getProjectCode()) | .eq(Project::getProjectCode, project.getProjectCode()) | ||||
.and(q1->q1.eq(Project::getNewest, Boolean.TRUE) | |||||
.or(q2->q2.eq(Project::getIsBackReject,Boolean.TRUE))) | |||||
.orderByDesc(Project::getCreateOn)); | .orderByDesc(Project::getCreateOn)); | ||||
if (CollUtil.isEmpty(historyProjects)) { | if (CollUtil.isEmpty(historyProjects)) { | ||||
@@ -317,4 +317,7 @@ public class ProjectDTO implements Serializable { | |||||
@ApiModelProperty("项目类型 01首次建设;02迭代升级;03结转建设;04新运维;05续运维") | @ApiModelProperty("项目类型 01首次建设;02迭代升级;03结转建设;04新运维;05续运维") | ||||
private String baseProjType; | private String baseProjType; | ||||
@ApiModelProperty("是否退回|驳回的项目版本") | |||||
private Boolean isBackReject = Boolean.FALSE; | |||||
} | } |
@@ -483,4 +483,8 @@ public class Project implements Serializable { | |||||
@ApiModelProperty("区县预审本级主管单位盖章审核日期") | @ApiModelProperty("区县预审本级主管单位盖章审核日期") | ||||
private String countrySealAuditDate; | private String countrySealAuditDate; | ||||
@ApiModelProperty("是否退回|驳回的项目版本") | |||||
private Boolean isBackReject; | |||||
} | } |
@@ -395,6 +395,9 @@ public class ProjectDetailVO { | |||||
@ApiModelProperty("审批详情") | @ApiModelProperty("审批详情") | ||||
private ProcessProgressDetailVo process; | private ProcessProgressDetailVo process; | ||||
@ApiModelProperty("是否退回|驳回的项目版本") | |||||
private Boolean isBackReject; | |||||
public String getVersionStr() { | public String getVersionStr() { | ||||
if (Objects.nonNull(this.newest) && this.newest) { | if (Objects.nonNull(this.newest) && this.newest) { | ||||
this.versionStr = "当前版本"; | this.versionStr = "当前版本"; | ||||
@@ -653,10 +653,7 @@ public class TodoCenterManage { | |||||
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) | List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) | ||||
.in(ProjectInst::getProjectId, projectIdList) | .in(ProjectInst::getProjectId, projectIdList) | ||||
.orderByDesc(ProjectInst::getProjectId)); | .orderByDesc(ProjectInst::getProjectId)); | ||||
Map<String, Project> projectInfoMap = projectInstList.stream() | |||||
.filter(p -> Objects.nonNull(p.getInstCode()) && | |||||
!TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode())) | |||||
.collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); | |||||
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); | |||||
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); | List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); | ||||
// 查出用户工作流 | // 查出用户工作流 | ||||
@@ -796,10 +793,7 @@ public class TodoCenterManage { | |||||
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) | List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) | ||||
.in(ProjectInst::getProjectId, projectIdList) | .in(ProjectInst::getProjectId, projectIdList) | ||||
.orderByDesc(ProjectInst::getProjectId)); | .orderByDesc(ProjectInst::getProjectId)); | ||||
Map<String, Project> projectInfoMap = projectInstList.stream() | |||||
.filter(p -> Objects.nonNull(p.getInstCode()) && | |||||
!TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode())) | |||||
.collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); | |||||
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); | |||||
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); | List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); | ||||
// 查出用户工作流 | // 查出用户工作流 | ||||
@@ -1113,7 +1107,7 @@ public class TodoCenterManage { | |||||
.eq(ProjectInst::getInstCode, oldProject.getInstCode())); | .eq(ProjectInst::getInstCode, oldProject.getInstCode())); | ||||
String instCode = oldProject.getInstCode(); | String instCode = oldProject.getInstCode(); | ||||
oldInst.setInstCode("EMPTY"); | |||||
oldInst.setInstCode(TodoCenterConstant.Declared.NULL_INST_CODE); | |||||
projectInstService.updateById(oldInst); | projectInstService.updateById(oldInst); | ||||
ProjectInst newPi = new ProjectInst(); | ProjectInst newPi = new ProjectInst(); | ||||
@@ -1142,6 +1136,9 @@ public class TodoCenterManage { | |||||
.eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); | .eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); | ||||
if (CollUtil.isNotEmpty(applicationList)) { | if (CollUtil.isNotEmpty(applicationList)) { | ||||
projectApplicationService.removeBatchByIds(applicationList); | projectApplicationService.removeBatchByIds(applicationList); | ||||
List<Long> applicationIds = applicationList.stream().map(ProjectApplication::getId).collect(Collectors.toList()); | |||||
// projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) | |||||
// .in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds)); | |||||
} | } | ||||
List<ProjectApplicationDTO> applications = projectDto.getApplicationList(); | List<ProjectApplicationDTO> applications = projectDto.getApplicationList(); | ||||
@@ -1159,11 +1156,19 @@ public class TodoCenterManage { | |||||
!InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) { | !InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) { | ||||
projectApplication.setIsConstruct(Boolean.TRUE); | projectApplication.setIsConstruct(Boolean.TRUE); | ||||
} | } | ||||
if(StringUtils.isNotBlank(application.getRelatedExistsApplication())){ | |||||
projectApplication.setApplicationName(null); | |||||
} | |||||
projectApplication.setProjectVersion(project.getVersion()); | projectApplication.setProjectVersion(project.getVersion()); | ||||
projectApplicationService.save(projectApplication); | |||||
boolean result = projectApplicationService.save(projectApplication); | |||||
// // 保存应用关联的核心业务 | |||||
// List<ProjectCoreBusinessDTO> coreBusinessList = application.getCoreBusinessList(); | |||||
// Boolean hasCoreBusiness = CollUtil.isNotEmpty(coreBusinessList) ? Boolean.TRUE : Boolean.FALSE; | |||||
// if (Boolean.TRUE.equals(result) && Boolean.TRUE.equals(hasCoreBusiness)){ | |||||
// for (ProjectCoreBusinessDTO coreBusiness : coreBusinessList) { | |||||
// ProjectCoreBusinessIndicators projectCoreBusinessIndicators = new ProjectCoreBusinessIndicators(); | |||||
// BeanUtils.copyProperties(coreBusiness, projectCoreBusinessIndicators); | |||||
// projectCoreBusinessIndicators.setApplicationId(application.getId()); | |||||
// projectCoreBusinessIndicatorsService.save(projectCoreBusinessIndicators); | |||||
// } | |||||
// } | |||||
} | } | ||||
} | } | ||||
return Boolean.TRUE; | return Boolean.TRUE; | ||||