From 47ea867f43fee950e5770d9208a245379853a330 Mon Sep 17 00:00:00 2001
From: cy <1664593601@qq.com>
Date: 星期五, 03 十一月 2023 09:28:02 +0800
Subject: [PATCH] feat: 循环依赖

---
 consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java b/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java
index 31c2524..2eed7e3 100644
--- a/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java
+++ b/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java
@@ -18,7 +18,6 @@
 
 /**
  * @ClassName LWhFormScrappedCoreService
- * @Author cy
  * @Date 2023/10/30
  * @Description
  * @Version 1.0
@@ -26,7 +25,7 @@
 @Service
 @Slf4j
 public class LWhFormScrappedCoreService {
-    private LWhFormScrappedService lWhFormScrappedService;
+    private GoodsBaseServiceImpl goodsBaseService;
     private LWhFormScrappedGoodsService lWhFormScrappedGoodsService;
     private BaseGoodsTemplateServiceImpl baseGoodsTemplateService;
     private LWhGoodsService lWhGoodsService;
@@ -35,20 +34,21 @@
     private LWarehouseFlowService lWarehouseFlowService;
 
     @Autowired
-    public LWhFormScrappedCoreService(LWhFormScrappedService lWhFormScrappedService,
+    public LWhFormScrappedCoreService(GoodsBaseServiceImpl goodsBaseService,
                                       LWhFormScrappedGoodsService lWhFormScrappedGoodsService,
                                       BaseGoodsTemplateServiceImpl baseGoodsTemplateService,
                                       LWhGoodsService lWhGoodsService,
                                       LWhGoodsRecordDetailsService lWhGoodsRecordDetailsService,
                                       LWhGoodsRecordService lWhGoodsRecordService,
                                       LWarehouseFlowService lWarehouseFlowService) {
-        this.lWhFormScrappedService = lWhFormScrappedService;
+//        this.lWhFormScrappedService = lWhFormScrappedService;
         this.lWhFormScrappedGoodsService = lWhFormScrappedGoodsService;
         this.baseGoodsTemplateService = baseGoodsTemplateService;
         this.lWhGoodsService = lWhGoodsService;
         this.lWhGoodsRecordDetailsService = lWhGoodsRecordDetailsService;
         this.lWhGoodsRecordService = lWhGoodsRecordService;
         this.lWarehouseFlowService = lWarehouseFlowService;
+        this.goodsBaseService = goodsBaseService;
     }
 
 
@@ -64,7 +64,7 @@
             return null;
         }
         LWhFormScrapped lWhFormScrapped = new LWhFormScrapped(formScrappedId);
-        lWhFormScrapped = lWhFormScrappedService.get(lWhFormScrapped);
+        lWhFormScrapped = goodsBaseService.get(lWhFormScrapped);
         if (lWhFormScrapped != null && lWhFormScrapped.getStates() != 0) {
             log.error("鎶ュ簾澶辫触锛佽妫�鏌ユ姤搴熷崟鐘舵��");
             return null;
@@ -174,8 +174,8 @@
             return null;
         }
         // 鏇存柊鎶ュ簾鍗�
-         lWhFormScrapped = new LWhFormScrapped(formScrappedId);
-        lWhFormScrapped = lWhFormScrappedService.get(lWhFormScrapped);
+        lWhFormScrapped = new LWhFormScrapped(formScrappedId);
+        lWhFormScrapped = goodsBaseService.get(lWhFormScrapped);
         if (lWhFormScrapped != null && lWhFormScrapped.getStates() != 0) {
             log.error("鎶ュ簾澶辫触锛佽妫�鏌ユ姤搴熷崟鐘舵��");
             return null;
@@ -185,7 +185,7 @@
         lWhFormScrapped.setOperatorId(userId);
         lWhFormScrapped.setOperatorName(nickName);
         lWhFormScrapped.setDealTime(dealTime);
-        lWhFormScrappedService.update(lWhFormScrapped);
+        goodsBaseService.update(lWhFormScrapped);
         return lWarehouseFlowId;
     }
 

--
Gitblit v1.9.1