10 小时以前 7bf754a7835d06f26240c4ca15bc5f83650de377
src/main/java/com/ruoyi/account/service/impl/sales/AccountInvoiceApplicationServiceImpl.java
@@ -67,6 +67,16 @@
                throw new ServiceException("存在重复的出库单");
            }
        }
        // 油品出库按客户拆成多条绑定行,与出库单是两个独立的 id 空间,必须分开判重
        String stockOutBindingIds = accountInvoiceApplication.getStockOutBindingIds();
        if (stockOutBindingIds != null && !stockOutBindingIds.isEmpty()) {
            List<Long> bindingIds = Arrays.stream(stockOutBindingIds.split(","))
                    .map(Long::valueOf)
                    .toList();
            if (accountInvoiceApplicationMapper.existsByStockOutBindingId(bindingIds)){
                throw new ServiceException("存在重复的出库单");
            }
        }
        return save(accountInvoiceApplication);
    }