| | |
| | | return type; |
| | | } |
| | | |
| | | @Override |
| | | public List<MesProBagCodeDO> getUnboundTonBags() { |
| | | Map<Long, Boolean> tonItems = new LinkedHashMap<>(); |
| | | return bagCodeMapper.selectUnboundPalletlessList().stream() |
| | | .filter(bag -> tonItems.computeIfAbsent(bag.getItemId(), id -> { |
| | | MesMdmItemDO item = mdmItemService.getItem(id); |
| | | if (item == null || item.getUnitMeasureId() == null) return false; |
| | | CommonResult<MdmUnitMeasureRespDTO> result = unitMeasureApi.getUnitMeasure(item.getUnitMeasureId()); |
| | | return result != null && result.isSuccess() && result.getData() != null |
| | | && UNIT_TYPE_TON.equals(StrUtil.trim(result.getData().getType())); |
| | | })) |
| | | .toList(); |
| | | } |
| | | |
| | | /** |
| | | * 解析「N袋」类型得出每托盘袋数 |
| | | */ |