| | |
| | | for (Details detail : procurementDto.getDetails()) { |
| | | // 查询采购入库数量 |
| | | LambdaQueryWrapper<ProcurementRecordStorage> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordStorage::getSalesLedgerProductId, detail.getId()); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordStorage::getSalesLedgerProductId, detail.getId()) |
| | | .eq(ProcurementRecordStorage::getType, procurementDto.getType()); |
| | | Long aLong = procurementRecordMapper.selectCount(procurementRecordLambdaQueryWrapper); |
| | | |
| | | ProcurementRecordStorage.ProcurementRecordStorageBuilder procurementRecordBuilder = ProcurementRecordStorage.builder() |
| | | .salesLedgerProductId(detail.getId()) |
| | | .inboundBatches(aLong.equals(0L) ? "第1批次" : "第"+ (aLong + 1) + "批次") |
| | | .inboundBatches(aLong.equals(0L) ? "第1批次("+ procurementDto.getTypeName() +")" : "第"+ (aLong + 1) + "批次(" + procurementDto.getTypeName() + ")" ) |
| | | .inboundNum(detail.getInboundQuantity()) |
| | | .type(procurementDto.getType()) |
| | | .warnNum(detail.getWarnNum()) |
| | | .createTime(LocalDateTime.now()) |
| | | .createUser(loginUser.getUserId()) |