| | |
| | | if (stockItems.isEmpty()) { |
| | | return; |
| | | } |
| | | Set<Long> stockIds = stockItems.stream().map(StockItem::getStockId).collect(Collectors.toSet()); |
| | | List<Stock> stocks = stockService.listByIds(stockIds); |
| | | //过滤拣货入库明细,避免上报 |
| | | List<Stock> stockList = stocks.stream().filter(stock -> stock.getType().equals(OrderType.ORDER_OUT.type)).collect(Collectors.toList()); |
| | | List<Long> list = stockList.stream().map(Stock::getId).collect(Collectors.toList()); |
| | | List<StockItem> stockItems1 = stockItemService.list(new LambdaQueryWrapper<StockItem>().eq(StockItem::getStockId, list)); |
| | | String finalNickName = nickName; |
| | | stockItems.forEach(stockItem -> { |
| | | stockItems1.forEach(stockItem -> { |
| | | List<ReportDataParam> dataParams = new ArrayList<>(); |
| | | //获取索引内容 |
| | | Map<String, String> fields = FieldsUtils.getFields(stockItem.getFieldsIndex()); |
| | |
| | | |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |
| | | //保存入出库流水 |
| | | saveStockItems(taskItems, task, null, null, taskItem.getWkType(), taskItem.getOrderType(), loginUserId); |
| | | saveStockItems(taskItems, task, null, null, taskItem.getWkType(), OrderType.ORDER_IN.type, loginUserId); |
| | | |
| | | locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId())); |
| | | |