|
|
@@ -7,6 +7,8 @@ import java.util.Objects; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.ningdatech.basic.util.NdDateUtils; |
|
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
|
import com.ningdatech.pmapi.projectlib.service.IProjectService; |
|
|
|
import com.ningdatech.pmapi.projectlib.utils.ProjectVersionUtil; |
|
|
|
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; |
|
|
|
import com.wflow.workflow.bean.process.ProgressNode; |
|
|
@@ -35,12 +37,17 @@ import com.wflow.workflow.service.ProcessInstanceService; |
|
|
|
public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { |
|
|
|
|
|
|
|
private final IProjectInstService projectInstService; |
|
|
|
|
|
|
|
private final IProjectService projectService; |
|
|
|
private final ProcessInstanceService processInstanceService; |
|
|
|
private final BuildUserUtils buildUserUtils; |
|
|
|
private final ProjectVersionUtil projectVersionUtil; |
|
|
|
|
|
|
|
public DeptUnitedReviewHandle(IProjectInstService projectInstService, ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils, ProjectVersionUtil projectVersionUtil){ |
|
|
|
public DeptUnitedReviewHandle(IProjectInstService projectInstService,IProjectService projectService |
|
|
|
, ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils, |
|
|
|
ProjectVersionUtil projectVersionUtil){ |
|
|
|
this.projectInstService = projectInstService; |
|
|
|
this.projectService = projectService; |
|
|
|
this.processInstanceService = processInstanceService; |
|
|
|
this.buildUserUtils = buildUserUtils; |
|
|
|
this.projectVersionUtil = projectVersionUtil; |
|
|
@@ -49,12 +56,16 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { |
|
|
|
@Override |
|
|
|
void businessHandle(Long projectId, List<ProcessDetailVO> processSchedule) { |
|
|
|
ProcessDetailVO processDetailVO = new ProcessDetailVO(); |
|
|
|
|
|
|
|
//查出历史版本的 所有项目ID |
|
|
|
List<Long> allVersionProjectIds = projectService.getAllVersionProjectId(projectId); |
|
|
|
|
|
|
|
// 根据项目ID查询出部门联审流程的流程状态 |
|
|
|
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.eq(ProjectInst::getProjectId, projectId) |
|
|
|
.in(ProjectInst::getProjectId, allVersionProjectIds) |
|
|
|
.eq(ProjectInst::getInstType, InstTypeEnum.DEPT_UNITED_REVIEW.getCode()) |
|
|
|
.orderByDesc(ProjectInst::getCreatOn) |
|
|
|
.last("limit 1")); |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if (Objects.isNull(projectInst)){ |
|
|
|
processDetailVO.setStepStatus(StepStatusEnum.NOT_START); |
|
|
|
processDetailVO.setProcessName(CommonConst.DEPT_UNITED_REVIEW); |
|
|
|