maven
2025-11-10 5ff5e7cf4bc2034f728c7edfbfd249345a000104
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
@@ -342,13 +342,15 @@
        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())