From 0e860de56fbf7ac66b9563fb946055207f09f9d6 Mon Sep 17 00:00:00 2001 From: lg <999544862qq.com> Date: 星期四, 15 八月 2024 10:25:43 +0800 Subject: [PATCH] Merge branch 'master' of http://43.142.96.171:8080/r/~tjx/StandardPda --- 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