Browse Source

修改拆单问题

dev
陈龙 2 days ago
parent
commit
3653c6f01a
  1. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/vo/DistributionSplitOrderTaskVO.java

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java

@ -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()) {

1
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;
}

Loading…
Cancel
Save