From 7717e061132e510abd448ddaeb78e595b1d5d46d Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期三, 22 四月 2026 14:25:33 +0800
Subject: [PATCH] refactor(system): 优化通知保存逻辑,移除冗余依赖
---
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java | 29 ++++++-----------------------
1 files changed, 6 insertions(+), 23 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 0ee10b7..1076356 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -12,7 +12,6 @@
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;
@@ -27,7 +26,6 @@
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.service.ProductionProductMainService;
import com.ruoyi.project.system.domain.SysDept;
import com.ruoyi.project.system.domain.SysUser;
@@ -35,7 +33,6 @@
import com.ruoyi.project.system.mapper.SysUserMapper;
import com.ruoyi.purchase.dto.SimpleReturnOrderGroupDto;
import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper;
-import com.ruoyi.quality.mapper.QualityInspectMapper;
import com.ruoyi.sales.dto.*;
import com.ruoyi.sales.mapper.*;
import com.ruoyi.sales.pojo.*;
@@ -45,7 +42,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;
@@ -98,28 +94,15 @@
private final InvoiceLedgerMapper invoiceLedgerMapper;
private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper;
private final InvoiceRegistrationMapper invoiceRegistrationMapper;
- private final ProductionProductMainMapper productionProductMainMapper;
- private final ProductionProductOutputMapper productionProductOutputMapper;
- private final ProductionProductInputMapper productionProductInputMapper;
- private final QualityInspectMapper qualityInspectMapper;
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 ProductionProductMainService productionProductMainService;
- @Autowired
- private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper;
- @Autowired
- private SysUserMapper sysUserMapper;
- @Autowired
- private CustomerPrivatePoolMapper customerPrivatePoolMapper;
+ private final ProductionProductMainService productionProductMainService;
+ private final PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper;
+ private final SysUserMapper sysUserMapper;
+ private final CustomerPrivatePoolMapper customerPrivatePoolMapper;
+ private final ProductModelMapper productModelMapper;
@Override
public List<SalesLedger> selectSalesLedgerList(SalesLedgerDto salesLedgerDto) {
--
Gitblit v1.9.3