From f8a1b2069044f16707eedaa22b57d542081d5e26 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 27 四月 2026 15:23:33 +0800
Subject: [PATCH] refactor(sales): 将依赖注入方式从构造函数改为字段注入

---
 src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java
index 3d105fd..90193b2 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java
@@ -23,6 +23,7 @@
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Collections;
@@ -34,22 +35,28 @@
  */
 @Service
 @Slf4j
-@RequiredArgsConstructor
 public class ShippingInfoServiceImpl extends ServiceImpl<ShippingInfoMapper, ShippingInfo> implements ShippingInfoService {
 
-    private final ShippingInfoMapper shippingInfoMapper;
-    private final TempFileServiceImpl tempFileService;
-    private final SalesLedgerProductMapper salesLedgerProductMapper;
-    private final StockUtils stockUtils;
-    private final CommonFileServiceImpl commonFileService;
-    private final ApproveProcessServiceImpl approveProcessService;
-    private final FileUtil fileUtil;
+    @Autowired
+    private ShippingInfoMapper shippingInfoMapper;
+    @Autowired
+    private TempFileServiceImpl tempFileService;
+    @Autowired
+    private SalesLedgerProductMapper salesLedgerProductMapper;
+    @Autowired
+    private StockUtils stockUtils;
+    @Autowired
+    private CommonFileServiceImpl commonFileService;
+    @Autowired
+    private ApproveProcessServiceImpl approveProcessService;
+    @Autowired
+    private FileUtil fileUtil;
 
     @Override
     public IPage<ShippingInfoDto> listPage(Page page, ShippingInfo req) {
         IPage<ShippingInfoDto> listPage = shippingInfoMapper.listPage(page, req);
         listPage.getRecords().forEach(item ->{
-            item.setCommonFileList(commonFileService.getFileListByBusinessId(item.getId(), FileNameType.SHIP.getValue()));
+            item.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.IMAGE, RecordTypeEnum.SHIPPING_INFO, item.getId()));
         });
         return listPage;
     }
@@ -72,7 +79,7 @@
         byId.setShippingDate(req.getShippingDate());
         boolean update = this.updateById(byId);
         // 淇濆瓨鏂囦欢
-        fileUtil.saveStorageAttachment(ApplicationTypeEnum.IMAGE, RecordTypeEnum.ShippingInfo, req.getId(), req.getStorageBlobDTOs());
+        fileUtil.saveStorageAttachment(ApplicationTypeEnum.IMAGE, RecordTypeEnum.SHIPPING_INFO, req.getId(), req.getStorageBlobDTOs());
         return update ;
     }
 

--
Gitblit v1.9.3