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 | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/service/Warehouse/MesInvItemInCDetailsManager.cs b/service/Warehouse/MesInvItemInCDetailsManager.cs index 198f4e4..648e17b 100644 --- a/service/Warehouse/MesInvItemInCDetailsManager.cs +++ b/service/Warehouse/MesInvItemInCDetailsManager.cs @@ -26,15 +26,15 @@ 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("姝ゆ潯鐮佷笉灞炰簬鍒拌揣鏉$爜锛屾棤娉曠敤閲囪喘鍏ュ簱锛�"); @@ -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