From 0aa54059b26e6641196e9953490dd18616e916e3 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期三, 10 九月 2025 17:26:47 +0800 Subject: [PATCH] 精简修正代码 --- service/Warehouse/MesDepotSectionsManager.cs | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/service/Warehouse/MesDepotSectionsManager.cs b/service/Warehouse/MesDepotSectionsManager.cs index 33fda90..e69057f 100644 --- a/service/Warehouse/MesDepotSectionsManager.cs +++ b/service/Warehouse/MesDepotSectionsManager.cs @@ -9,16 +9,15 @@ { public dynamic GetSectionName(WarehouseQuery query) { - var sectionName = Db.Queryable<MesDepotSections, MesDepots>( - (a, b) => - new JoinQueryInfos(JoinType.Inner, - a.DepotGuid == b.Guid)) // 纭繚Guid绫诲瀷姝g‘姣旇緝 + var sectionName = Db.Queryable<MesDepotSections, MesDepots>((a, b) => + new JoinQueryInfos(JoinType.Inner, + a.DepotGuid == b.Guid)) // 纭繚Guid绫诲瀷姝g‘姣旇緝 .Where((a, b) => a.DepotSectionCode == query.sectionCode) - .Select((a, b) => new // 鏀圭敤鍖垮悕绫诲瀷鏇夸唬dynamic + .Select((a, b) => new // 鏀圭敤鍖垮悕绫诲瀷鏇夸唬dynamic { a.DepotSectionName, - DepotName = b.DepotName, // 鏄惧紡鎸囧畾瀛楁鍒悕 - DepotCode = b.DepotCode + b.DepotName, // 鏄惧紡鎸囧畾瀛楁鍒悕 + b.DepotCode }).Single(); if (sectionName == null) @@ -33,10 +32,10 @@ if (string.IsNullOrEmpty(query.sectionCode)) throw new Exception("璇锋壂搴撲綅鏉$爜!"); - var mesDepotSections = Db.Queryable<MesDepotSections, MesDepots>( - (a, b) => - new JoinQueryInfos(JoinType.Inner, - a.DepotGuid == b.Guid)) + var mesDepotSections = Db + .Queryable<MesDepotSections, MesDepots>((a, b) => + new JoinQueryInfos(JoinType.Inner, + a.DepotGuid == b.Guid)) .Where((a, b) => a.DepotSectionCode == query.sectionCode) .Select((a, b) => new MesDepotSections { @@ -57,10 +56,10 @@ if (string.IsNullOrEmpty(entity.sectionCode)) throw new Exception("璇锋壂搴撲綅鏉$爜!"); - var mesDepotSections = Db.Queryable<MesDepotSections, MesDepots>( - (a, b) => - new JoinQueryInfos(JoinType.Inner, - a.Zuid.ToString() == b.Zuid)) + var mesDepotSections = Db + .Queryable<MesDepotSections, MesDepots>((a, b) => + new JoinQueryInfos(JoinType.Inner, + a.Zuid.ToString() == b.Zuid)) .Where((a, b) => a.DepotSectionCode == entity.sectionCode) .First(); if (mesDepotSections == null) -- Gitblit v1.9.3