From 3653c6f01a6de20f4f482c0998df3dbe0b1b201f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BE=99?= Date: Thu, 3 Apr 2025 15:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=86=E5=8D=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionSplitOrderTaskServiceImpl.java | 7 +++++++ .../distribution/vo/DistributionSplitOrderTaskVO.java | 1 + 2 files changed, 8 insertions(+) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java index 24cb21dcd..1a6587a8d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java @@ -90,11 +90,16 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl listVo = new ArrayList<>(); if (list != null && !list.isEmpty()) { Map userIdNameMap = getUserIdNameMap(list.stream().map(DistributionSplitOrderTaskEntity::getCreateUser).collect(Collectors.toList())); + List allTaskInfo = list.stream().map(DistributionSplitOrderTaskEntity::getSplitOrderAllTaskId).collect(Collectors.toList()); + + List allTaskList = distributionSplitOrderAllTaskService.listByIds(allTaskInfo); + Map allTaskListById = allTaskList.stream().collect(Collectors.toMap(DistributionSplitOrderAllTaskEntity::getId, u -> u)); listVo = list.stream().map(item -> { DistributionSplitOrderTaskVO distributionSplitOrderTaskVO = new DistributionSplitOrderTaskVO(); BeanUtil.copyProperties(item, distributionSplitOrderTaskVO); distributionSplitOrderTaskVO.setCreateUserName(userIdNameMap.get(item.getCreateUser())); + distributionSplitOrderTaskVO.setAllTaskStatus(allTaskListById.get(item.getSplitOrderAllTaskId()).getState()); return distributionSplitOrderTaskVO; }).collect(Collectors.toList()); } @@ -917,6 +922,8 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl list = distributionSplitOrderAllTaskService.list(page, queryWrapper); List listVo = new ArrayList<>(); if (list != null && !list.isEmpty()) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/vo/DistributionSplitOrderTaskVO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/vo/DistributionSplitOrderTaskVO.java index 35eb05339..22eb4b836 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/vo/DistributionSplitOrderTaskVO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/vo/DistributionSplitOrderTaskVO.java @@ -8,4 +8,5 @@ import lombok.EqualsAndHashCode; @Data public class DistributionSplitOrderTaskVO extends DistributionSplitOrderTaskEntity { private String createUserName; + private Integer allTaskStatus; }