From 332c012e7336f2996c4fe5c8c110d00713c1bde2 Mon Sep 17 00:00:00 2001
From: haoyahui <2032914783@qq.com>
Date: 星期六, 11 十一月 2023 18:51:33 +0800
Subject: [PATCH] 采购单,采购明细,库存管理,出入库,调拨管理,库存盘点

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

diff --git a/consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java b/consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java
index 3a28b30..3e32a02 100644
--- a/consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java
+++ b/consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java
@@ -20,20 +20,19 @@
 
 /**
  * @ClassName WhFormOutputCoreService
- * @Author cy
  * @Date 2023/10/26
  * @Description
  * @Version 1.0
  **/
 @Slf4j
 @Service
+@Transactional(rollbackFor = Exception.class)
 public class LWhFormOutputCoreService {
 
     private BaseGoodsTemplateServiceImpl baseGoodsTemplateService;
     private LWhGoodsService lWhGoodsService;
     private CodeGeneratorService codeGeneratorService;
     private LWhProcureModelService lWhProcureModelService;
-//    private LWhFormTransferServiceImpl lWhFormTransferService;
     private LWhFormOutputService lWhFormOutputService;
     private LWarehouseFlowService lWarehouseFlowService;
     private LWhGoodsRecordDetailsService lWhGoodsRecordDetailsService;
@@ -44,7 +43,6 @@
                                     LWhGoodsService lWhGoodsService,
                                     CodeGeneratorService codeGeneratorService,
                                     LWhProcureModelService lWhProcureModelService,
-//                                    LWhFormTransferServiceImpl lWhFormTransferService,
                                     LWhFormOutputService lWhFormOutputService,
                                     LWarehouseFlowService lWarehouseFlowService,
                                     LWhGoodsRecordDetailsService lWhGoodsRecordDetailsService,
@@ -53,7 +51,6 @@
         this.lWhGoodsService = lWhGoodsService;
         this.codeGeneratorService = codeGeneratorService;
         this.lWhProcureModelService = lWhProcureModelService;
-//        this.lWhFormTransferService = lWhFormTransferService;
         this.lWhFormOutputService = lWhFormOutputService;
         this.lWarehouseFlowService = lWarehouseFlowService;
         this.lWhGoodsRecordDetailsService = lWhGoodsRecordDetailsService;
@@ -115,7 +112,7 @@
         whFormOutput.setId(outWarehouseFormId);
         // 姝ゆ椂骞舵病鏈夊嚭搴�
         whFormOutput.setWarehouseFlowId(null);
-        whFormOutput.setBusinessFormCode(codeGeneratorService.createCodeByPrefix(CodeGeneratorEnum.OutPut_Warehouse.getValue(), 4));
+        whFormOutput.setBusinessFormCode(codeGeneratorService.createBusinessFormCode(CodeGeneratorEnum.OutPut_Warehouse));
         //杩涘嚭搴撴祦姘存�昏〃 鍏ュ簱鍗旾D
         whFormOutput.setInWarehouseFlowId(null);
 //        璋冩嫧鍗旾D(璋冩嫧鏃堕渶瑕�)
@@ -168,6 +165,9 @@
         Integer outWarehouseType = lWhFormOutput.getOutWarehouseType();
         Long outWarehouseId = lWhFormOutput.getWarehouseId();
         String warehouseName = lWhFormOutput.getWarehouseName();
+        Integer inWarehouseType = lWhFormOutput.getInWarehouseType();
+        Long inWarehouseId = lWhFormOutput.getInWarehouseId();
+        String inWarehouseName = lWhFormOutput.getInWarehouseName();
 
         Long userId = currentUser.getId();
         String nickName = currentUser.getNick_name();
@@ -201,10 +201,6 @@
         short queryModelStatus = queryModelStatusT;
         Short buyType = buyTypeT;
         Short modGoodsTransferingStatus = modGoodsTransferingStatusT;
-
-        // 鎺ユ敹鏂逛粨搴撲俊鎭�
-        Long inWarehouseId = lWhFormOutput.getInWarehouseId();
-        String inWarehouseName = lWhFormOutput.getInWarehouseName();
 
         goodsModelNumList.forEach(itemModelInfo -> {
             // 闇�瑕佽皟鎷ㄧ殑鐗╁搧鐨勬煇涓瀷鍙�
@@ -257,7 +253,7 @@
 
                 //鍑哄簱鏃跺�欙紝鎸� 鍏堝叆搴撶殑鍏堝嚭搴擄紝鍚屾椂鍏ュ簱鐨勶紝鎸変环鏍奸珮鐨勫厛鍑哄簱
                 List<Long> outGoodsId = lWhGoodsService.queryOutGoodsId(outWarehouseType, outWarehouseId, baseGoodsModelsId, queryModelStatus, buyType, goodsModelNum);
-                lWhGoodsService.modGoodsTransfering(outGoodsId, outWarehouseType, inWarehouseId, inWarehouseName, modGoodsTransferingStatus);
+                lWhGoodsService.modGoodsTransfering(outGoodsId, inWarehouseType, inWarehouseId, inWarehouseName, modGoodsTransferingStatus);
                 // 鎵归噺鎻掑叆 杩涘嚭搴撴祦姘存槑缁哰L_WH_GOODS_RECORD_DETAILS]
                 lWhGoodsRecordDetailsService.sameGoodsInsertMore(outGoodsId, whGoodsRecordId, (short) 0);
                 lWhGoodsRecordService.insert(whGoodsRecord);

--
Gitblit v1.9.1