From c6dad51bdd23cf8425a2e6bb47b9b9412a0dabbe Mon Sep 17 00:00:00 2001
From: zongzhibin <zongzhibin@weben-smart.com>
Date: 周五, 29 11月 2024 15:53:06 +0800
Subject: [PATCH] add
---
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsStockQuan/WmsStockQuan/WmsStockQuanService.cs | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 49 insertions(+), 1 deletions(-)
diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsStockQuan/WmsStockQuan/WmsStockQuanService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsStockQuan/WmsStockQuan/WmsStockQuanService.cs
index 2b6dbf5..065be5e 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsStockQuan/WmsStockQuan/WmsStockQuanService.cs
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsStockQuan/WmsStockQuan/WmsStockQuanService.cs
@@ -371,6 +371,52 @@
};
}
+
+ /// <summary>
+ /// 鍒嗛〉鏌ヨ缂烘枡娓呭崟 涓嶉綈鍖� -鎸夌収鐢熶骇鍗曞彿鍒嗙粍
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ [ApiDescriptionSettings(Name = "ShortagePageGroupByInfo5")]
+ [Description("WmsStockQuan/ShortagePageGroupByInfo5")]
+ public async Task<SqlSugarPagedList<WmsShortageListOutput>> ShortagePageGroupByInfo5(KittingListInput input)
+ {
+ var listRes = await GetShortageListCore(input);
+
+ // 鎸夌収瀛楁 Info5 鍒嗙粍
+ var groupedList = listRes
+ .GroupBy(x => x.Info5) // 鏍规嵁 Info5 瀛楁杩涜鍒嗙粍
+ .Select(g => new WmsShortageListOutput // 鍋囪鎮ㄥ皢鍒嗙粍鍚庣殑缁撴灉杞崲涓� WmsShortageListOutput
+ {
+ Info5 = g.Key,
+ ShortageCount = g.Count(),
+ })
+ .ToList();
+
+ // 杩涜鍒嗛〉澶勭悊
+ var totalCount = groupedList.Count; // 鑾峰彇鎬绘暟
+ var pagedList = groupedList
+ //.OrderBy(x => x.Id) // 鏍规嵁闇�瑕佽繘琛屾帓搴�
+ .Skip((input.Page - 1) * input.PageSize)
+ .Take(input.PageSize)
+ .ToList();
+
+ // 鏋勯�犲苟杩斿洖鍒嗛〉缁撴灉
+ return new SqlSugarPagedList<WmsShortageListOutput>
+ {
+ Page = input.Page,
+ PageSize = input.PageSize,
+ Total = totalCount,
+ TotalPages = (int)Math.Ceiling((double)totalCount / input.PageSize),
+ Items = pagedList,
+ HasPrevPage = input.Page > 1,
+ HasNextPage = input.Page < ((int)Math.Ceiling((double)totalCount / input.PageSize))
+ };
+ }
+
+
+
/// <summary>
/// 缂哄寘鏁版嵁
/// </summary>
@@ -400,7 +446,9 @@
PackageCode = item.PackageCode,
DetailName = item.DetailName,
OrderId = item.OrderId,
- PlanNo = item.PlanNo
+ PlanNo = item.PlanNo,
+ Info5= item.Info5,
+ Info16 = item.Info16,
});
}
}
--
Gitblit v1.9.3