From 1342f568f4b6470efdfc69be7bb153e2b12762f9 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 31 三月 2026 17:00:57 +0800
Subject: [PATCH] feat:1.销售,采购,库存,质检模块产品添加批号,供应商 2.销售产品关联批号,供应商递归查询

---
 src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
index eedc54f..bd71f54 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -194,6 +194,9 @@
             product.setTempnoInvoiceAmount(product.getNoInvoiceAmount());
             product.setTempNoInvoiceNum(product.getNoInvoiceNum());
             product.setRegister(SecurityUtils.getLoginUser().getUser().getNickName());
+            product.setUidNo(product.getUidNo());
+            product.setUnit(product.getUnit());
+            product.setBatchNo(product.getBatchNo());
             product.setRegisterDate(LocalDateTime.now());
             // 鍙戣揣淇℃伅
             ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>()
@@ -202,6 +205,13 @@
                     .last("limit 1"));
             if (shippingInfo != null) {
                 product.setShippingStatus(shippingInfo.getStatus());
+            }
+            // 鏌ヨ鍏宠仈浜у搧鐨刄ID
+            if (product.getProductModelId() != null) {
+                ProductModel productModel = productModelMapper.selectById(product.getProductModelId());
+                if (productModel != null) {
+                    product.setUidNo(productModel.getUidNo());
+                }
             }
         }
 
@@ -911,6 +921,7 @@
             map.put("taxInclusiveUnitPrice", product.getTaxInclusiveUnitPrice().setScale(2, RoundingMode.HALF_UP).toString());
             map.put("taxInclusiveTotalPrice", product.getTaxInclusiveTotalPrice().setScale(2, RoundingMode.HALF_UP).toString());
             map.put("batchNo", product.getBatchNo());
+            map.put("uidNo", product.getUidNo());
             // 鏌ヨ鍑瘉
             ProductModel productModel = productModelMapper.selectById(product.getProductModelId());
             if (productModel != null) {

--
Gitblit v1.9.3