From e93d2a1c8fdfadf50f9fbf9e30c04ffe73df023a Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期三, 14 八月 2024 16:26:03 +0800 Subject: [PATCH] 11 --- MES.Service/service/Warehouse/MesDepotSectionsManager.cs | 39 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/MES.Service/service/Warehouse/MesDepotSectionsManager.cs b/MES.Service/service/Warehouse/MesDepotSectionsManager.cs index 5803893..3a02a02 100644 --- a/MES.Service/service/Warehouse/MesDepotSectionsManager.cs +++ b/MES.Service/service/Warehouse/MesDepotSectionsManager.cs @@ -8,7 +8,7 @@ public class MesDepotSectionsManager : Repository<MesDepotSections> { //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉� - + public string GetSectionName(WarehouseQuery query) { var sectionName = Db.Queryable<MesDepotSections, MesDepots>((a, b) => @@ -23,4 +23,41 @@ return sectionName; } + + public MesDepotSections ScanInDepotSectionsName(WarehouseQuery query) + { + + if (string.IsNullOrEmpty(query.sectionCode)) + { + throw new Exception("璇锋壂搴撲綅鏉$爜!"); + } + + var mesDepotSections = Db.Queryable<MesDepotSections, MesDepots>( + (a, b) => + new JoinQueryInfos(JoinType.Inner, a.DepotId == b.DepotId)) + .Where((a, b) => a.DepotSectionCode == query.sectionCode) + .Select((a, b) => new MesDepotSections + { + DepotSectionName = a.DepotSectionName, + DepotCode = b.DepotCode, + DepotName = b.DepotName + }).First(); + + if (mesDepotSections == null) + { + throw new Exception("搴撲綅缂栫爜" + query.sectionCode + " 涓嶅瓨鍦紝璇风‘璁�!"); + } + + return mesDepotSections; + } + + public MesInvItemStocks ScanEditBarcode(WarehouseQuery entity) + { + if (string.IsNullOrEmpty(entity.sectionCode)) + { + throw new Exception("璇锋壂搴撲綅鏉$爜!"); + } + + return null; + } } \ No newline at end of file -- Gitblit v1.9.3