|
|
|
@ -90,11 +90,16 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
|
|
|
|
|
List<DistributionSplitOrderTaskVO> listVo = new ArrayList<>(); |
|
|
|
|
if (list != null && !list.isEmpty()) { |
|
|
|
|
Map<Long, String> userIdNameMap = getUserIdNameMap(list.stream().map(DistributionSplitOrderTaskEntity::getCreateUser).collect(Collectors.toList())); |
|
|
|
|
List<Long> allTaskInfo = list.stream().map(DistributionSplitOrderTaskEntity::getSplitOrderAllTaskId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
List<DistributionSplitOrderAllTaskEntity> allTaskList = distributionSplitOrderAllTaskService.listByIds(allTaskInfo); |
|
|
|
|
Map<Long, DistributionSplitOrderAllTaskEntity> 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<Distr
|
|
|
|
|
queryWrapper.eq(DistributionSplitOrderAllTaskEntity::getId, splitOrderAllTaskId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
queryWrapper.orderByDesc(DistributionSplitOrderAllTaskEntity::getCreateTime); |
|
|
|
|
|
|
|
|
|
List<DistributionSplitOrderAllTaskEntity> list = distributionSplitOrderAllTaskService.list(page, queryWrapper); |
|
|
|
|
List<DistributionSplitOrderAllTaskVO> listVo = new ArrayList<>(); |
|
|
|
|
if (list != null && !list.isEmpty()) { |
|
|
|
|