maven
4 天以前 3ca0af49b87942c86cdd973d5a0aea5757b87e71
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
@@ -120,13 +120,11 @@
        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())