From abea0edf2306d61b7ade028bcf7e2e6f9282fbd5 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Wed, 2 Oct 2024 09:53:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E3=80=91=20=E6=B5=81=E7=A8=8B=E6=8A=84=E9=80=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BF=94=E5=9B=9E=20activityId=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/task/BpmProcessInstanceCopyController.java | 8 ++++---- .../admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java | 2 ++ .../bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java | 1 - .../bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java | 2 +- .../service/task/BpmProcessInstanceCopyServiceImpl.java | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java index e9f0eb444..8aa4aaaa0 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceCopyController.java @@ -60,9 +60,9 @@ public class BpmProcessInstanceCopyController { return success(new PageResult<>(pageResult.getTotal())); } - // 拼接返回 - Map taskNameMap = taskService.getTaskNameByTaskIds( - convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getTaskId)); + // 拼接返回 TODO @芋艿。这个 taskName 查询是不是可以不用。 保存的时候 taskName 已经存了, review 一下。 不知道有什么特殊场景 +// Map taskNameMap = taskService.getTaskNameByTaskIds( +// convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getTaskId)); Map processInstanceMap = processInstanceService.getHistoricProcessInstanceMap( convertSet(pageResult.getList(), BpmProcessInstanceCopyDO::getProcessInstanceId)); Map userMap = adminUserApi.getUserMap(convertListByFlatMap(pageResult.getList(), @@ -70,7 +70,7 @@ public class BpmProcessInstanceCopyController { return success(BeanUtils.toBean(pageResult, BpmProcessInstanceCopyRespVO.class, copyVO -> { MapUtils.findAndThen(userMap, Long.valueOf(copyVO.getCreator()), user -> copyVO.setCreatorName(user.getNickname())); MapUtils.findAndThen(userMap, copyVO.getStartUserId(), user -> copyVO.setStartUserName(user.getNickname())); - MapUtils.findAndThen(taskNameMap, copyVO.getTaskId(), copyVO::setTaskName); +// MapUtils.findAndThen(taskNameMap, copyVO.getTaskId(), copyVO::setTaskName); MapUtils.findAndThen(processInstanceMap, copyVO.getProcessInstanceId(), processInstance -> copyVO.setProcessInstanceStartTime(DateUtils.of(processInstance.getStartTime()))); })); diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java index 4b397fc1c..f5163faa3 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/cc/BpmProcessInstanceCopyRespVO.java @@ -24,6 +24,8 @@ public class BpmProcessInstanceCopyRespVO { @Schema(description = "流程实例的发起时间") private LocalDateTime processInstanceStartTime; + @Schema(description = "抄送的节点的活动编号") + private String activityId; @Schema(description = "发起抄送的任务编号") private String taskId; @Schema(description = "发起抄送的任务名称") diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java index c7d10396f..29da3fcfc 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmProcessInstanceCopyDO.java @@ -57,7 +57,6 @@ public class BpmProcessInstanceCopyDO extends BaseDO { private String activityId; /** * 任务主键 - * // @芋艿 这个 taskId 是不是可以去掉了;TODO 可能要留着,因为得知道是来自哪个 task 的抄送 * 关联 Task 的 id 属性 */ private String taskId; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java index daf93747a..8f23024e8 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmProcessInstanceCopyMapper.java @@ -20,7 +20,7 @@ public interface BpmProcessInstanceCopyMapper extends BaseMapperX selectListByProcessIstanceIdAndActivityId(String processInstanceId, String activityId) { + default List selectListByProcessInstanceIdAndActivityId(String processInstanceId, String activityId) { return selectList(BpmProcessInstanceCopyDO::getProcessInstanceId, processInstanceId, BpmProcessInstanceCopyDO::getActivityId, activityId); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java index 211f508a5..ad677eb28 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceCopyServiceImpl.java @@ -89,7 +89,7 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy @Override public Set getCopyUserIds(String processInstanceId, String activityId) { - return CollectionUtils.convertSet(processInstanceCopyMapper.selectListByProcessIstanceIdAndActivityId(processInstanceId, activityId), + return CollectionUtils.convertSet(processInstanceCopyMapper.selectListByProcessInstanceIdAndActivityId(processInstanceId, activityId), BpmProcessInstanceCopyDO::getUserId); }