Commit 320288ca authored by yanghao's avatar yanghao

fix: 云效 JDAA-245: 6.装柜页面,NG2500009L 没有显示储位

parent a3a9def4
......@@ -2761,6 +2761,39 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
public BoxCabinetLoadVO getBoxCabinetDetail(Long shipmentId) {
List<BoxLoadSectionBackVO> boxLoadDetailBackVO = boxPreloadGoodsService.loadSecGoodsList(shipmentId);
//查询所有库区库域信息
List<WarehouseAreaDO> areaList = warehouseAreaService.list(new LambdaQueryWrapper<>());
List<WarehouseAreaPositionDO> positionList = warehouseAreaPositionService.list(new LambdaQueryWrapper<>());
for (BoxLoadSectionBackVO sectionBackVO : boxLoadDetailBackVO) {
List<BoxLoadOrderVO> orderList = sectionBackVO.getSectionOrderList();
if (CollectionUtil.isEmpty(orderList)) continue;
for (BoxLoadOrderVO orderVO : orderList) {
Long orderId = orderVO.getOrderId();
List<OrderLocationDO> orderLocationLists = orderLocationService.getOrderLocationListByOrderId(orderId);
//按照订单纬度返回信息,分组
Map<String, List<OrderLocationDO>> positionMap = orderLocationLists.stream()
.collect(Collectors.groupingBy(
t -> t.getOrderId() + "_" +
// t.getOrderItemId() + "_" +
t.getWareId() + "_" + t.getAreaId() + "_" + t.getLocationId()));
List<OrderLocationDO> locationList = new ArrayList<>();
for (Map.Entry<String, List<OrderLocationDO>> entry : positionMap.entrySet()) {
List<OrderLocationDO> orderLocationDOList = entry.getValue();
locationList.add(orderLocationDOList.get(0));
}
String positionNo = matchLocation(areaList, positionList, locationList);
orderVO.setPositionNo(positionNo);
orderVO.setOrderLocationList(OrderLocationConvert.INSTANCE.convertList(locationList));
List<BoxPreloadGoodsBackVO> orderGoodsItemList = orderVO.getGoodsList();
for (BoxPreloadGoodsBackVO itemVO : orderGoodsItemList) {
matchItemLocation(areaList, positionList, locationList, itemVO);
}
}
}
BoxCabinetLoadVO boxCabinetLoadVO = new BoxCabinetLoadVO();
boxCabinetLoadVO.setLoadDetail(boxLoadDetailBackVO);
......
### 获得装柜详情 cabinetDetail
GET {{baseUrl}}/my/shipment/cabinetDetail?shipmentId=2497
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
Content-Type: application/json
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment