From e57987bff5891297af9ecbbec5ed6dc9e84bdad2 Mon Sep 17 00:00:00 2001
From: cnf <3283105747@qq.com>
Date: 星期六, 29 十一月 2025 19:41:12 +0800
Subject: [PATCH] 备单领料及维护接口
---
WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs b/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs
index 9e4606c..b81d0b3 100644
--- a/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs
+++ b/WebApi/Gs.Warehouse/Services/MesDepotSectionsManager.cs
@@ -24,6 +24,51 @@
// UtilityHelper.GetUserGuidAndOrgGuid(_http);
}
+ /// <summary>
+ /// 鏌ヨ鍒楄〃锛屾敮鎸佸垎椤�
+ /// </summary>
+ /// <param name="query"></param>
+ /// <returns></returns>
+ [RequestMethod(RequestMethods.POST)]
+ public ReturnDto<PageList<MesDepotSections>> GetListPage(PageQuery query)
+ {
+ var pageList = new PageList<MesDepotSections>();
+ try
+ {
+ var _sbWhere = new StringBuilder(" 1=1" + query.keyWhere);
+ var _sbBy = new StringBuilder(query.sortName + " " + query.sortOrder);
+ var totalCount = 0;
+ // 鍏堟瀯寤哄熀纭�鏌ヨ
+ 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);
+ return ReturnDto<PageList<MesDepotSections>>.QuickReturn(pageList,
+ ReturnCode.Success, "璇诲彇鎴愬姛");
+ }
+ catch (Exception ex)
+ {
+ return ReturnDto<PageList<MesDepotSections>>.QuickReturn(pageList,
+ ReturnCode.Default, ex.Message);
+ }
+ }
+
/// <summary>
/// 鏌ヨ鍒楄〃锛屾敮鎸佸垎椤�,鐢ㄤ簬鍚勭缁戝畾
--
Gitblit v1.9.3