| | |
| | | for (Details detail : procurementDto.getDetails()) { |
| | | // 查询采购入库数量 |
| | | LambdaQueryWrapper<ProcurementRecord> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecord::getSalesLedgerProductId, detail.getId()) |
| | | .eq(ProcurementRecord::getProcurementCategory, 1); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecord::getSalesLedgerProductId, detail.getId()); |
| | | Long aLong = procurementRecordMapper.selectCount(procurementRecordLambdaQueryWrapper); |
| | | |
| | | ProcurementRecord.ProcurementRecordBuilder procurementRecordBuilder = ProcurementRecord.builder() |
| | | .salesLedgerProductId(detail.getId()) |
| | | .procurementCategory(1) |
| | | .inboundBatches(aLong.equals(0L) ? "第1批次" : "第"+ (aLong + 1) + "批次") |
| | | .inboundNum(detail.getInboundQuantity()) |
| | | .createDate(LocalDateTime.now()) |