From 5c45b5f97c1365b6f89da2a0897a7c93fe16cb63 Mon Sep 17 00:00:00 2001
From: kyy <3283105747@qq.com>
Date: 星期三, 17 十二月 2025 18:09:01 +0800
Subject: [PATCH] 首检巡检
---
WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs | 42 ++++++++++++++++++++----------------------
1 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs b/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs
index d3bcde8..4895098 100644
--- a/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs
+++ b/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs
@@ -1,4 +1,5 @@
-锘縰sing Gs.Entity.BaseInfo;
+锘縰sing AngleSharp.Text;
+using Gs.Entity.BaseInfo;
using Gs.Entity.Sys;
using Gs.Toolbox;
using Gs.Toolbox.ApiCore.Abstract.Mvc;
@@ -29,27 +30,24 @@
var _sbWhere = new StringBuilder(" 1=1" + query.keyWhere);
var _sbBy = new StringBuilder(query.sortName + " " + query.sortOrder);
var totalCount = 0;
- var itemsList = Db.Queryable<MesDepots,MesDepotSections, SysOrganization, MesStaff, MesCustomer, MesSupplier, SysDepartment>(
- (a, b,Org, c, d, f, g) => new object[]
- {
- JoinType.Left, a.Guid == b.DepotGuid,
- JoinType.Left, a.FSubsidiary == Org.Fid,
- JoinType.Left, a.CreateBy == c.Id.ToString(),
- JoinType.Left,d.Id.ToString()==a.ClientId.ToString(),
- JoinType.Left,f.Id.ToString()==a.SuppLierId.ToString(),
- JoinType.Left,g.Id.ToString()==a.department.ToString(),
- }).Select((a, b, Org, c, d, f, g) => new MesDepotSections
- {
- Guid=b.Guid,
- DepotSectionCode=b.DepotSectionCode.ToString(),
- DepotSectionName=b.DepotSectionName.ToString(),
- CreateBy = c.StaffName.ToString()
-
- }, true)
- .Where(_sbWhere.ToString())
- .OrderBy(_sbBy.ToString())
- .ToPageList(query.currentPage, query.everyPageSize,
- ref totalCount);
+ // 鍏堟瀯寤哄熀纭�鏌ヨ
+ var queryBase = Db.Queryable<MesDepots>()
+ .LeftJoin<MesDepotSections>((a, b) => a.Guid == b.DepotGuid);
+ //.LeftJoin<SysOrganization>((a, b, c) => a.FSubsidiary == c.Fid)
+ //.LeftJoin<MesStaff>((a, b, c, d) => a.CreateBy == d.Id.ToString())
+ //.LeftJoin<MesCustomer>((a, b, c, d, e) => e.Id.ToString() == a.ClientId)
+ //.LeftJoin<MesSupplier>((a, b, c, d, e, f) => f.Id.ToString() == a.SuppLierId)
+ //.LeftJoin<SysDepartment>((a, b, c, d, e, f, g) => g.Id.ToString() == a.department);
+ // 鐒跺悗杩涜閫夋嫨鍜屽垎椤�
+ var itemsList = queryBase.Select((a, b) => new MesDepotSections
+ {
+ Guid = b.Guid,
+ DepotSectionCode = b.DepotSectionCode,
+ DepotSectionName = b.DepotSectionName
+ })
+ .Where(_sbWhere.ToString())
+ .OrderBy(_sbBy.ToString())
+ .ToPageList(query.currentPage, query.everyPageSize, ref totalCount);
pageList = new PageList<MesDepotSections>(itemsList, totalCount,
query.everyPageSize);
--
Gitblit v1.9.3