From 271f4a25576ac6c2c8f2c4eb4c9782d6eef85124 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 07 五月 2026 13:13:55 +0800
Subject: [PATCH] 修改报错

---
 src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java |   33 ++++++++++++++++++++-------------
 1 files changed, 20 insertions(+), 13 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 607ada0..9803611 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -9,9 +9,8 @@
 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.CustomerPrivatePoolMapper;
+import com.ruoyi.basic.mapper.ProductMapper;
 import com.ruoyi.basic.mapper.ProductModelMapper;
 import com.ruoyi.basic.pojo.Customer;
 import com.ruoyi.common.enums.FileNameType;
@@ -26,9 +25,7 @@
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.other.mapper.TempFileMapper;
 import com.ruoyi.other.pojo.TempFile;
-import com.ruoyi.production.mapper.ProductionProductInputMapper;
-import com.ruoyi.production.mapper.ProductionProductMainMapper;
-import com.ruoyi.production.mapper.ProductionProductOutputMapper;
+import com.ruoyi.production.mapper.*;
 import com.ruoyi.production.service.ProductionProductMainService;
 import com.ruoyi.project.system.domain.SysDept;
 import com.ruoyi.project.system.domain.SysUser;
@@ -41,11 +38,13 @@
 import com.ruoyi.sales.mapper.*;
 import com.ruoyi.sales.pojo.*;
 import com.ruoyi.sales.service.ISalesLedgerService;
+import com.ruoyi.sales.vo.SalesLedgerVo;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 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;
@@ -102,15 +101,23 @@
     private final ProductionProductOutputMapper productionProductOutputMapper;
     private final ProductionProductInputMapper productionProductInputMapper;
     private final QualityInspectMapper qualityInspectMapper;
-    private final ProductModelMapper productModelMapper;
     private final RedisTemplate<String, String> redisTemplate;
-    private final SysDeptMapper sysDeptMapper;
+    @Autowired
+    private SysDeptMapper sysDeptMapper;
     @Value("${file.upload-dir}")
     private String uploadDir;
-    private final ProductionProductMainService productionProductMainService;
-    private final PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper;
-    private final SysUserMapper sysUserMapper;
-    private final CustomerPrivatePoolMapper customerPrivatePoolMapper;
+    @Autowired
+    private ProductModelMapper productModelMapper;
+
+    @Autowired
+    private ProductMapper productMapper;
+    @Autowired
+    private ProductionProductMainService productionProductMainService;
+    @Autowired
+    private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper;
+    ;
+    @Autowired
+    private SysUserMapper sysUserMapper;
 
     @Override
     public List<SalesLedger> selectSalesLedgerList(SalesLedgerDto salesLedgerDto) {
@@ -317,7 +324,7 @@
     }
 
     @Override
-    public IPage<SalesLedger> selectSalesLedgerListPage(Page page, SalesLedgerDto salesLedgerDto) {
+    public IPage<SalesLedgerVo> selectSalesLedgerListPage(Page page, SalesLedgerDto salesLedgerDto) {
         return salesLedgerMapper.selectSalesLedgerListPage(page, salesLedgerDto);
     }
 
@@ -577,7 +584,7 @@
     public int addOrUpdateSalesLedger(SalesLedgerDto salesLedgerDto) {
         try {
             // 1. 鏍¢獙瀹㈡埛淇℃伅
-            CustomerPrivatePoolDto customer = customerPrivatePoolMapper.selectInfo(salesLedgerDto.getCustomerId());
+            Customer customer = customerMapper.selectById(salesLedgerDto.getCustomerId());
             if (customer == null) {
                 throw new BaseException("瀹㈡埛涓嶅瓨鍦�");
             }

--
Gitblit v1.9.3