From 7b84eb64d11b12b6fb41ae7f7085452512ad5d3f Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 20 六月 2025 08:18:08 +0800
Subject: [PATCH] 1.采购入库优化

---
 service/Warehouse/MesInvItemInCDetailsManager.cs |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/service/Warehouse/MesInvItemInCDetailsManager.cs b/service/Warehouse/MesInvItemInCDetailsManager.cs
index d26a2e7..648e17b 100644
--- a/service/Warehouse/MesInvItemInCDetailsManager.cs
+++ b/service/Warehouse/MesInvItemInCDetailsManager.cs
@@ -26,21 +26,21 @@
         var freeze = 0;
         decimal cSyQty = 0;
 
-        //if (string.IsNullOrEmpty(sectionCode))
-        //    throw new Exception("璇锋壂搴撲綅鏉$爜锛�");
+        if (string.IsNullOrEmpty(sectionCode))
+            throw new Exception("璇锋壂搴撲綅鏉$爜锛�");
 
         var itemBarcodeDetails = Db.Queryable<MesInvItemBarcodes>()
             .Where(it => it.ItemBarcode == itemBarcode)
             .First();
 
-        //if (itemBarcodeDetails == null)
-        //    throw new Exception("鏉$爜涓嶅瓨鍦紝璇锋牳瀵癸紒");
+        if (itemBarcodeDetails == null)
+            throw new Exception("鏉$爜涓嶅瓨鍦紝璇锋牳瀵癸紒");
 
         if (string.IsNullOrEmpty(itemBarcodeDetails.Memo) || itemBarcodeDetails.Memo != "閲囪喘鍏ュ簱")
             throw new Exception("姝ゆ潯鐮佷笉灞炰簬鍒拌揣鏉$爜锛屾棤娉曠敤閲囪喘鍏ュ簱锛�");
 
         var inventory = Db.Queryable<MesInvItemArn>()
-            .Where(it => it.BillNo == itemBarcodeDetails.BillNo && it.Status == 1 )
+            .Where(it => it.BillNo == itemBarcodeDetails.BillNo && it.Fstatus == true )
             .First();
 
         if (inventory == null)
@@ -87,10 +87,10 @@
         MesDepots mesDepost = null;
 
         var checkGuid = UtilityHelper.CheckGuid(depotCode);
-        if (checkGuid && depotCode2 != null)
+        if (checkGuid && depotCode != null)
         {
             mesDepost = Db.Queryable<MesDepots>()
-                .Where(s => s.DepotId.ToString() == depotCode2).First();
+                .Where(s => s.DepotId.ToString() == depotCode).First();
 
             // if (depotCode != mesDepost.Guid)
             //     throw new Exception("鎵弿搴撲綅涓庨噰璐叆搴撳簱浣嶄笉涓�鑷达紒");
@@ -789,7 +789,8 @@
                         FQty = a.Quantity, // 鐢宠鏁伴噺
                         FMaterialId = b.ItemId,
                         Id = a.Guid.ToString(),
-                        kw = a.DepotSectionCode
+                        kw = a.DepotSectionCode,
+                        barcode = a.ItemBarcode
                     })
                     .ToList();
 

--
Gitblit v1.9.3