From 8b749305a8e8c3f4bf669f6980edf2bbb7bfa9c7 Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期五, 24 四月 2026 11:14:34 +0800
Subject: [PATCH] Merge branch 'dev_New_pro' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_New_pro

---
 src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java |   45 +++++++++++++++------------------------------
 1 files changed, 15 insertions(+), 30 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 570b2f5..32d6069 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -9,8 +9,9 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.account.service.AccountIncomeService;
+import com.ruoyi.basic.dto.CustomerPrivatePoolDto;
 import com.ruoyi.basic.mapper.CustomerMapper;
-import com.ruoyi.basic.mapper.ProductMapper;
+import com.ruoyi.basic.mapper.CustomerPrivatePoolMapper;
 import com.ruoyi.basic.mapper.ProductModelMapper;
 import com.ruoyi.basic.pojo.Customer;
 import com.ruoyi.common.enums.FileNameType;
@@ -25,7 +26,9 @@
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.other.mapper.TempFileMapper;
 import com.ruoyi.other.pojo.TempFile;
-import com.ruoyi.production.mapper.*;
+import com.ruoyi.production.mapper.ProductionProductInputMapper;
+import com.ruoyi.production.mapper.ProductionProductMainMapper;
+import com.ruoyi.production.mapper.ProductionProductOutputMapper;
 import com.ruoyi.production.service.ProductionProductMainService;
 import com.ruoyi.project.system.domain.SysDept;
 import com.ruoyi.project.system.domain.SysUser;
@@ -43,7 +46,6 @@
 import org.apache.commons.io.FilenameUtils;
 import org.jetbrains.annotations.Nullable;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.script.DefaultRedisScript;
@@ -94,40 +96,21 @@
     private final CommonFileServiceImpl commonFileService;
     private final ShippingInfoMapper shippingInfoMapper;
     private final InvoiceLedgerMapper invoiceLedgerMapper;
-    private final SalesLedgerSchedulingMapper salesLedgerSchedulingMapper;
-    private final SalesLedgerWorkMapper salesLedgerWorkMapper;
-    private final SalesLedgerProductionAccountingMapper salesLedgerProductionAccountingMapper;
     private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper;
     private final InvoiceRegistrationMapper invoiceRegistrationMapper;
-    private final ProductOrderMapper productOrderMapper;
-    private final ProcessRouteMapper processRouteMapper;
-    private final ProductProcessRouteMapper productProcessRouteMapper;
-    private final ProcessRouteItemMapper processRouteItemMapper;
-    private final ProductProcessRouteItemMapper productProcessRouteItemMapper;
-    private final ProductWorkOrderMapper productWorkOrderMapper;
     private final ProductionProductMainMapper productionProductMainMapper;
     private final ProductionProductOutputMapper productionProductOutputMapper;
     private final ProductionProductInputMapper productionProductInputMapper;
     private final QualityInspectMapper qualityInspectMapper;
+    private final ProductModelMapper productModelMapper;
     private final RedisTemplate<String, String> redisTemplate;
-    @Autowired
-    private SysDeptMapper sysDeptMapper;
+    private final SysDeptMapper sysDeptMapper;
     @Value("${file.upload-dir}")
     private String uploadDir;
-    @Autowired
-    private ProductModelMapper productModelMapper;
-
-    @Autowired
-    private ProductMapper productMapper;
-    @Autowired
-    private ProductStructureMapper productStructureMapper;
-    @Autowired
-    private ProductionProductMainService productionProductMainService;
-    @Autowired
-    private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper;
-    ;
-    @Autowired
-    private SysUserMapper sysUserMapper;
+    private final ProductionProductMainService productionProductMainService;
+    private final PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper;
+    private final SysUserMapper sysUserMapper;
+    private final CustomerPrivatePoolMapper customerPrivatePoolMapper;
 
     @Override
     public List<SalesLedger> selectSalesLedgerList(SalesLedgerDto salesLedgerDto) {
@@ -479,6 +462,8 @@
                         .eq(ShippingInfo::getSalesLedgerProductId, product.getId())
                         .orderByDesc(ShippingInfo::getCreateTime)
                         .last("limit 1"));
+                product.setShippingCarNumber(shippingInfo.getShippingCarNumber());
+                product.setShippingDate(shippingInfo.getShippingDate());
                 if (shippingInfo != null) {
                     product.setShippingStatus(shippingInfo.getStatus());
                 }
@@ -535,7 +520,7 @@
         List<Long> productIds = products.stream()
                 .map(SalesLedgerProduct::getId)
                 .collect(Collectors.toList());
-        //鍒犻櫎鐢熶骇鏁版嵁
+        //鍒犻櫎鐢熶骇璁″垝
         salesLedgerProductServiceImpl.deleteProductionData(productIds);
 
         // 鎵归噺鍒犻櫎浜у搧瀛愯〃
@@ -592,7 +577,7 @@
     public int addOrUpdateSalesLedger(SalesLedgerDto salesLedgerDto) {
         try {
             // 1. 鏍¢獙瀹㈡埛淇℃伅
-            Customer customer = customerMapper.selectById(salesLedgerDto.getCustomerId());
+            CustomerPrivatePoolDto customer = customerPrivatePoolMapper.selectInfo(salesLedgerDto.getCustomerId());
             if (customer == null) {
                 throw new BaseException("瀹㈡埛涓嶅瓨鍦�");
             }

--
Gitblit v1.9.3