From 38339731265cb8ffef7954fb90874036fd46f09d Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 22 十二月 2025 09:46:11 +0800
Subject: [PATCH] 供应商分数获取调整
---
service/Warehouse/MesInvItemInCDetailsManager.cs | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/service/Warehouse/MesInvItemInCDetailsManager.cs b/service/Warehouse/MesInvItemInCDetailsManager.cs
index 3ecf875..a0d3fb0 100644
--- a/service/Warehouse/MesInvItemInCDetailsManager.cs
+++ b/service/Warehouse/MesInvItemInCDetailsManager.cs
@@ -61,6 +61,9 @@
.Where(it => it.EbelnK3id == inventoryDetails.LineK3id)
.First();
+ if (cgddDetails == null)
+ throw new Exception("姝ゆ潯鐮佹壘涓嶅埌瀵瑰簲閲囪喘璁㈠崟鏄庣粏锛�");
+
if (inventoryDetails == null)
throw new Exception("姝ゆ潯鐮佹壘涓嶅埌瀵瑰簲鏀惰揣鍗曟槑缁嗭紒");
@@ -101,6 +104,33 @@
}
+ // ========== 鏂板锛氶獙璇佸綋鍓嶅簱浣嶄笌鐗╂枡榛樿搴撲綅鏄惁涓�鑷� ==========
+ // 鑾峰彇鐗╂枡淇℃伅
+ var mesItems = Db.Queryable<MesItems>()
+ .Where(s => s.Id == itemBarcodeDetails.ItemId)
+ .First();
+
+ if (mesItems == null)
+ throw new Exception("鎵句笉鍒板搴旂殑鐗╂枡淇℃伅锛�");
+
+ // 妫�鏌ョ墿鏂欐槸鍚︽湁榛樿搴撲綅璁剧疆
+ if (!string.IsNullOrEmpty(mesItems.DepotCode))
+ {
+ // 鑾峰彇鐗╂枡榛樿搴撲綅瀵瑰簲鐨勪粨搴撲俊鎭�
+ var defaultDepot = Db.Queryable<MesDepots>()
+ .Where(d => d.DepotCode == mesItems.DepotCode)
+ .First();
+
+ if (mesItems.DepotCode != null && mesItems.DepotCode != "0")
+ {
+ // 姣旇緝褰撳墠鎵弿鐨勫簱浣嶆墍灞炰粨搴撶紪鐮佷笌鐗╂枡榛樿浠撳簱缂栫爜鏄惁涓�鑷�
+ if (mesDepost.DepotId?.ToString() != mesItems.DepotCode)
+ {
+ throw new Exception($"褰撳墠搴撲綅鎵�灞炰粨搴揫{mesDepost.DepotId}]涓庣墿鏂欓粯璁や粨搴揫{mesItems.DepotCode}]涓嶄竴鑷达紝璇锋壂鎻忔纭殑搴撲綅锛�");
+ }
+ }
+ }
+
//num = Db.Queryable<MesInvItemInCDetails>()
// .Where(it => it.ItemBarcode == itemBarcode)
// .Count();
--
Gitblit v1.9.3