From 30561a499608d9591b8caa4462709a1fbaf76447 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 14 十一月 2025 16:04:49 +0800
Subject: [PATCH] 1.期初入库优化

---
 service/Warehouse/InventoryManager.cs |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/service/Warehouse/InventoryManager.cs b/service/Warehouse/InventoryManager.cs
index 7fab709..3d1b39e 100644
--- a/service/Warehouse/InventoryManager.cs
+++ b/service/Warehouse/InventoryManager.cs
@@ -31,7 +31,7 @@
                 ))
             .Where((a, b) => a.DepotSectionCode == p_section_code)
             .Select((a, b) => new
-                { a.DepotSectionName, b.DepotCode, b.DepotName })
+            { a.DepotSectionName, b.DepotCode, b.DepotName })
             .Single();
 
         // 濡傛灉搴撲綅浠g爜涓嶅瓨鍦紝鍒欒繑鍥為敊璇俊鎭�
@@ -63,7 +63,7 @@
                 ))
             .Where((a, b) => a.DepotSectionCode == p_section_code)
             .Select((a, b) => new
-                { a.DepotSectionName, b.DepotCode, b.DepotName, b.DepotId,b.FSubsidiary })
+            { a.DepotSectionName, b.DepotCode, b.DepotName, b.DepotId, b.FSubsidiary })
             .Single();
 
         // 濡傛灉搴撲綅浠g爜涓嶅瓨鍦紝鍒欒繑鍥為敊璇俊鎭�
@@ -110,8 +110,8 @@
             billNo: "", // 鏍规嵁瀹為檯鍗曟嵁鍙蜂紶鍊�
             transactionNo: "601" // 浜嬪姟绫诲瀷涓庡瓨鍌ㄨ繃绋嬪尮閰�
         );
-        
-        if ( Convert.ToInt32(checkResult.result) < 1) 
+
+        if (Convert.ToInt32(checkResult.result) < 1)
             throw new Exception($"鍏ュ簱鏍¢獙澶辫触锛歿checkResult.strMsg}");
 
         UseTransaction(db =>
@@ -226,7 +226,8 @@
                 WorkNo = c_mes_inv_item_barcodes.WorkNo,
                 WorkLine = c_mes_inv_item_barcodes.WorkLine,
                 SuppNo = c_mes_inv_item_barcodes.SuppNo,
-                ItemId = c_mes_inv_item_barcodes.ItemId
+                ItemId = c_mes_inv_item_barcodes.ItemId,
+                Description = "鏈熷垵鍏ュ簱"
             }).IgnoreColumns(true).ExecuteCommand();
 
             // 鎻掑叆搴撳瓨淇℃伅
@@ -255,6 +256,8 @@
                 ItemId = c_mes_inv_item_barcodes.ItemId,
                 IndepUserCode = c_user,
                 StockOrgId = depotSection.FSubsidiary,
+                OwnerId = depotSection.FSubsidiary,
+                OwnerType = "BD_OwnerOrg",
                 // Fsubsidiary = c_organize
             }).IgnoreColumns(true).ExecuteCommand();
 
@@ -366,20 +369,20 @@
                     while (reader.Read())
                     {
                         var barcode = reader.GetString(0);
-                        
+
                         // 鏋勫缓绗﹀悎鏂规硶绛惧悕鐨勫弬鏁板璞�
-                        var scanQuery = new WarehouseQuery 
+                        var scanQuery = new WarehouseQuery
                         {
                             barcode = barcode,
                             DepotCode = query.sectionCode, // 浠庡師濮媞uery鑾峰彇搴撲綅缂栫爜
                             userName = query.userName // 浠庡師濮媞uery鑾峰彇鐢ㄦ埛璐﹀彿
                         };
-                        
+
                         try
                         {
                             // 璋冪敤姝e紡绛惧悕鏂规硶
                             ScanBarcode(scanQuery);
-                            var printData = GetPrintBar(barcode); 
+                            var printData = GetPrintBar(barcode);
                             resultList.Add(printData);
                         }
                         catch (Exception ex)

--
Gitblit v1.9.3