|
|
@@ -5,14 +5,12 @@ import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.google.common.collect.Sets; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.basic.model.GenericResult; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
import com.ningdatech.pmapi.common.constant.CommonConstant; |
|
|
|
import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; |
|
|
|
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; |
|
|
|
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; |
|
|
|
import com.ningdatech.pmapi.common.util.ExcelDownUtil; |
|
|
|
import com.ningdatech.pmapi.common.util.SendWorkNoticeUtil; |
|
|
|
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; |
|
|
|
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; |
|
|
|
import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService; |
|
|
@@ -26,6 +24,7 @@ import com.ningdatech.pmapi.projectlib.service.IProjectService; |
|
|
|
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; |
|
|
|
import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo; |
|
|
|
import com.ningdatech.pmapi.todocenter.enumeration.IsAppendProjectEnum; |
|
|
|
import com.ningdatech.pmapi.todocenter.model.dto.req.ProcessDetailReq; |
|
|
|
import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedReq; |
|
|
|
import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedExportReq; |
|
|
|
import com.ningdatech.pmapi.todocenter.model.dto.vo.ResToBeProcessedVO; |
|
|
@@ -56,10 +55,6 @@ import org.springframework.stereotype.Component; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.CompletableFuture; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.Executors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static cn.hutool.core.collection.CollUtil.isEmpty; |
|
|
@@ -105,7 +100,7 @@ public class TodoCenterManage { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<String> instCodes = userTodoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
Map<String, ProcessTaskVo> taskVoMap = userTodoList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v)); |
|
|
|
//2.再分页查询项目信息 |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
|
projectListReq.setInstCodes(instCodes); |
|
|
@@ -120,6 +115,8 @@ public class TodoCenterManage { |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
|
BeanUtils.copyProperties(d, res); |
|
|
|
res.setProjectId(d.getId()); |
|
|
|
ProcessTaskVo taskVo = taskVoMap.get(d.getInstCode()); |
|
|
|
res.setNodeId(taskVo.getTaskDefKey()); |
|
|
|
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); |
|
|
|
res.setProcessLaunchTime(d.getCreateOn()); |
|
|
|
return res; |
|
|
@@ -555,11 +552,21 @@ public class TodoCenterManage { |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询流程表单数据及审批的进度步骤 |
|
|
|
* @param instanceId 流程实例ID |
|
|
|
* |
|
|
|
* @param request 请求参数 |
|
|
|
* @return 流程进度及表单详情 |
|
|
|
*/ |
|
|
|
public ProcessProgressDetailVo getProcessDetail(String instanceId) { |
|
|
|
ProcessProgressVo progressInstanceDetail = processInstanceService.getProgressInstanceDetail(null, instanceId); |
|
|
|
public ProcessProgressDetailVo getProcessDetail(ProcessDetailReq request) { |
|
|
|
String instanceId = request.getInstanceId(); |
|
|
|
String nodeId = request.getNodeId(); |
|
|
|
Long projectId = request.getProjectId(); |
|
|
|
ProcessProgressVo progressInstanceDetail = null; |
|
|
|
if (Objects.isNull(nodeId)) { |
|
|
|
progressInstanceDetail = processInstanceService.getProgressInstanceDetail(null, instanceId); |
|
|
|
}else { |
|
|
|
progressInstanceDetail = processInstanceService.getProgressInstanceDetail(nodeId, instanceId); |
|
|
|
} |
|
|
|
|
|
|
|
List<ProgressNode> progressInfo = progressInstanceDetail.getProgressInfo(); |
|
|
|
|
|
|
|
Set<String> userSet = Sets.newHashSet(); |
|
|
@@ -580,6 +587,7 @@ public class TodoCenterManage { |
|
|
|
ProcessProgressDetailVo res = new ProcessProgressDetailVo(); |
|
|
|
res.setProcessProgressVo(progressInstanceDetail); |
|
|
|
res.setStatus(progressInstanceDetail.getStatus()); |
|
|
|
res.setProjectId(projectId); |
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
@@ -796,6 +804,8 @@ public class TodoCenterManage { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<String> instCodes = ccMeList.stream().map(ProcessInstanceVo::getInstanceId).collect(Collectors.toList()); |
|
|
|
Map<String, ProcessInstanceVo> instanceVoMap = ccMeList.stream() |
|
|
|
.collect(Collectors.toMap(ProcessInstanceVo::getInstanceId, v -> v)); |
|
|
|
|
|
|
|
// 分页查询项目信息 |
|
|
|
ProjectListReq projectListReq = new ProjectListReq(); |
|
|
@@ -810,6 +820,8 @@ public class TodoCenterManage { |
|
|
|
List<ResToBeProcessedVO> resVos = projectPage.getRecords().stream().map(d -> { |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
|
BeanUtils.copyProperties(d, res); |
|
|
|
ProcessInstanceVo instanceVo = instanceVoMap.get(d.getInstCode()); |
|
|
|
res.setNodeId(instanceVo.getNodeId()); |
|
|
|
res.setProjectId(d.getId()); |
|
|
|
res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); |
|
|
|
res.setProcessLaunchTime(d.getCreateOn()); |
|
|
|