|
|
@@ -41,7 +41,6 @@ import com.hz.pm.api.projectlib.service.IProjectInstService; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectService; |
|
|
|
import com.hz.pm.api.signature.entity.CompanySignature; |
|
|
|
import com.hz.pm.api.signature.service.ICompanySignatureService; |
|
|
|
import com.hz.pm.api.sys.service.IRegionService; |
|
|
|
import com.hz.pm.api.todocenter.constant.TodoCenterConst; |
|
|
|
import com.hz.pm.api.todocenter.constant.TodoCenterConst.Declared; |
|
|
|
import com.hz.pm.api.todocenter.constant.TodoCenterConst.SealTemplate; |
|
|
@@ -74,6 +73,7 @@ import com.ningdatech.basic.util.StrPool; |
|
|
|
import com.ningdatech.file.entity.File; |
|
|
|
import com.ningdatech.file.entity.vo.result.FileResultVO; |
|
|
|
import com.ningdatech.file.service.FileService; |
|
|
|
import com.wflow.bean.entity.WflowModelHistorys; |
|
|
|
import com.wflow.contants.HisProInsEndActId; |
|
|
|
import com.wflow.contants.ProcessConstant; |
|
|
|
import com.wflow.exception.BusinessException; |
|
|
@@ -86,6 +86,7 @@ import com.wflow.workflow.bean.vo.ProcessInstanceVo; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessProgressVo; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessTaskVo; |
|
|
|
import com.wflow.workflow.service.ProcessInstanceService; |
|
|
|
import com.wflow.workflow.service.ProcessModelHistorysService; |
|
|
|
import com.wflow.workflow.service.ProcessTaskService; |
|
|
|
import com.wflow.workflow.utils.ProcessTaskUtils; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
@@ -147,11 +148,11 @@ public class TodoCenterManage { |
|
|
|
private final WithDrawHandle withDrawHandle; |
|
|
|
private final PassHandle passHandle; |
|
|
|
private final RepositoryService repositoryService; |
|
|
|
private final IRegionService regionService; |
|
|
|
private final ITodoService todoService; |
|
|
|
private final IPurchaseInstService purchaseInstService; |
|
|
|
private final IXinchuangService xinchuangService; |
|
|
|
private final IXinchuangInstService xinchuangInstService; |
|
|
|
private final ProcessModelHistorysService processModelHistorysService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 待办中心待我处理项目列表查询 |
|
|
@@ -229,7 +230,10 @@ public class TodoCenterManage { |
|
|
|
.collect(Collectors.toMap(ProcessTaskVo::getNodeId, v -> v)); |
|
|
|
List<String> instCodes = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId); |
|
|
|
Map<String, Long> purchaseInstMap = listInstCodeBidIdMap(instCodes); |
|
|
|
|
|
|
|
List<String> processDefIds = CollUtils.fieldList(userTodoList, ProcessTaskVo::getProcessDefId); |
|
|
|
List<WflowModelHistorys> wflowModels = processModelHistorysService.list(Wrappers.lambdaQuery(WflowModelHistorys.class) |
|
|
|
.in(WflowModelHistorys::getProcessDefId, processDefIds)); |
|
|
|
Map<String, WflowModelHistorys> modelsMap = CollUtils.listToMap(wflowModels, WflowModelHistorys::getProcessDefId); |
|
|
|
List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> { |
|
|
|
Project projectInfo = projectInfoMap.get(d.getInstanceId()); |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
@@ -243,6 +247,8 @@ public class TodoCenterManage { |
|
|
|
res.setProcessStatusName(taskVo.getStatus()); |
|
|
|
res.setProcessLaunchTime(d.getTaskCreateTime()); |
|
|
|
res.setProcessDefName(d.getProcessDefName()); |
|
|
|
WflowModelHistorys models = modelsMap.get(d.getProcessDefId()); |
|
|
|
res.setProcessDefType(models == null ? null : models.getProcessType()); |
|
|
|
res.setTaskId(d.getTaskId()); |
|
|
|
res.setNodeName(findSubProcessName(d)); |
|
|
|
res.setPretrialFileId(projectInfo.getPretrialFileId()); |
|
|
@@ -769,7 +775,6 @@ public class TodoCenterManage { |
|
|
|
if (Objects.isNull(progressInstanceDetail)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
List<ProgressNode> progressInfo = progressInstanceDetail.getProgressInfo(); |
|
|
|
Boolean isHighLine = Boolean.FALSE; |
|
|
|
if (CollUtil.isNotEmpty(progressInfo)) { |
|
|
@@ -785,6 +790,15 @@ public class TodoCenterManage { |
|
|
|
} else { |
|
|
|
res.setProjectId(request.getProjectId()); |
|
|
|
} |
|
|
|
String processDefId = progressInstanceDetail.getProcessDefId(); |
|
|
|
if (StrUtil.isNotBlank(processDefId)) { |
|
|
|
WflowModelHistorys wflowModels = processModelHistorysService.getOne(Wrappers.lambdaQuery(WflowModelHistorys.class) |
|
|
|
.eq(WflowModelHistorys::getProcessDefId, processDefId) |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if (Objects.nonNull(wflowModels)) { |
|
|
|
res.setProcessDefType(wflowModels.getProcessType()); |
|
|
|
} |
|
|
|
} |
|
|
|
res.setProcessProgressVo(progressInstanceDetail); |
|
|
|
res.setStatus(progressInstanceDetail.getStatus()); |
|
|
|
res.setCanWithdraw(withDrawHandle.checkCanWithdraw(instanceId, progressInstanceDetail, request.getTaskId())); |
|
|
@@ -932,7 +946,13 @@ public class TodoCenterManage { |
|
|
|
List<ProcessTaskVo> userIdoList = CollUtils.page(iDoList, pageNumber, pageSize); |
|
|
|
List<String> currPageInstCodes = CollUtils.fieldList(userIdoList, ProcessTaskVo::getInstanceId); |
|
|
|
Map<String, Long> purchaseInstMap = listInstCodeBidIdMap(currPageInstCodes); |
|
|
|
|
|
|
|
List<String> processDefIds = CollUtils.fieldList(userIdoList, ProcessTaskVo::getProcessDefId); |
|
|
|
List<WflowModelHistorys> wflowModels = processModelHistorysService.list(Wrappers.lambdaQuery(WflowModelHistorys.class) |
|
|
|
.in(WflowModelHistorys::getProcessDefId, processDefIds)); |
|
|
|
Map<String, WflowModelHistorys> modelsMap = CollUtils.listToMap(wflowModels, WflowModelHistorys::getProcessDefId); |
|
|
|
List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> { |
|
|
|
WflowModelHistorys models = modelsMap.get(d.getProcessDefId()); |
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
|
Project projectInfo = projectInfoMap.get(d.getInstanceId()); |
|
|
|
BeanUtils.copyProperties(projectInfo, res); |
|
|
@@ -943,6 +963,7 @@ public class TodoCenterManage { |
|
|
|
res.setProcessStatusName(d.getStatus()); |
|
|
|
res.setProcessLaunchTime(d.getCreateTime()); |
|
|
|
res.setProcessHandleTime(d.getTaskEndTime()); |
|
|
|
res.setProcessDefType(models == null ? null : models.getProcessType()); |
|
|
|
res.setTaskId(d.getTaskId()); |
|
|
|
res.setNodeName(findSubProcessName(d)); |
|
|
|
res.setBidId(purchaseInstMap.get(d.getInstanceId())); |
|
|
|