| | |
| | | if (Objects.isNull(params.getWhAreaId())) { |
| | | throw new CoolException("库区标识不能为空!!"); |
| | | } |
| | | WarehouseAreasItem areasItem = warehouseAreasItemService.getOne(new LambdaQueryWrapper<WarehouseAreasItem>().eq(WarehouseAreasItem::getAreaId, params.getWhAreaId())); |
| | | WarehouseAreas areasItem = warehouseAreasService.getOne(new LambdaQueryWrapper<WarehouseAreas>().eq(WarehouseAreas::getId, params.getWhAreaId())); |
| | | if (Objects.isNull(areasItem)) { |
| | | throw new CoolException("数据错误:当前库区不存在!!"); |
| | | } |
| | | List<ReceiptDetlsDto> receipts = params.getReceipts(); |
| | | List<WarehouseAreasItem> allOrders = new ArrayList<>(); |
| | | receipts.forEach(dto -> { |
| | |
| | | } |
| | | WarehouseAreasItem item = new WarehouseAreasItem(); |
| | | item.setBarcode(dto.getBarcode()) |
| | | .setAreaName(areasItem.getAreaName()) |
| | | .setAreaId(areasItem.getAreaId()) |
| | | .setAreaName(areasItem.getName()) |
| | | .setAreaId(areasItem.getId()) |
| | | .setStockUnit(dto.getStockUnit()) |
| | | .setBatch(SerialRuleUtils.generateRuleCode("sys_receipt_batch", dto)) |
| | | .setAnfme(dto.getReceiptQty()) |