From 8893638de46547923e0684220df3d9782f7ec283 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周一, 10 3月 2025 11:01:49 +0800 Subject: [PATCH] 缓存岛需要加个批次号条件、可以选择某个批次出 --- LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryInput.cs | 10 ++++++++++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json | 4 ++-- LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryOutput.cs | 11 +++++++++++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/WmsCommonnQueryService.cs | 12 ++++++++---- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json index 329f063..6121877 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json @@ -9,7 +9,7 @@ //"ConfigId": "1300000000001", // 榛樿搴撴爣璇�-绂佹淇敼 "DbType": "SqlServer", // MySql銆丼qlServer銆丼qlite銆丱racle銆丳ostgreSQL銆丏m銆並dbndp銆丱scar銆丮ySqlConnector銆丄ccess銆丱penGauss銆丵uestDB銆丠G銆丆lickHouse銆丟Base銆丱dbc銆丆ustom // "ConnectionString": "Server=.;Database=iWare_RawMaterialWarehouse_Wms;User=sa;Password=123456;MultipleActiveResultSets=True;", // 搴撹繛鎺ュ瓧绗︿覆 - "ConnectionString": "Server=172.17.1.111;Database=LA24030_LuLiPackageLine;User=sa;Password=admin@123;MultipleActiveResultSets=True;", // 搴撹繛鎺ュ瓧绗︿覆 + "ConnectionString": "Server=.;Database=LA24030_LuLiPackageLine;User=sa;Password=123abc.com;MultipleActiveResultSets=True;", // 搴撹繛鎺ュ瓧绗︿覆 //"SlaveConnectionConfigs": [ // 璇诲啓鍒嗙/涓讳粠 // { // "HitRate": 10, @@ -26,7 +26,7 @@ "EnableUnderLine": false // 鍚敤椹煎嘲杞笅鍒掔嚎 }, "TableSettings": { - "EnableInitTable": true, // 鍚敤琛ㄥ垵濮嬪寲 + "EnableInitTable": false, // 鍚敤琛ㄥ垵濮嬪寲 "EnableIncreTable": false // 鍚敤琛ㄥ閲忔洿鏂�-鐗规�IncreTable] }, "SeedSettings": { diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryInput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryInput.cs index cd52d53..0c62907 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryInput.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryInput.cs @@ -19,4 +19,14 @@ public string PackageCode { get; set; } + /// <summary> + /// 鎵规 + /// </summary> + public string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string OrderId { get; set; } + } diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryOutput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryOutput.cs index 99bf379..00b4eb0 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryOutput.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/Dto/WmsCommonnQueryOutput.cs @@ -12,6 +12,17 @@ public class WmsPackListOutput { public string PackageCode { get; set; } // 鍖呰浠g爜 + + /// <summary> + /// 鎵规 + /// </summary> + public string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string OrderId { get; set; } + /// <summary> /// 缂撳瓨宀涘凡鏈夋暟閲� /// </summary> diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/WmsCommonnQueryService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/WmsCommonnQueryService.cs index cd631f5..e064dd5 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/WmsCommonnQueryService.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/WmsCommonnQueryService.cs @@ -264,24 +264,28 @@ // 鑾峰彇绗﹀悎鏉′欢鐨勮褰曪紝骞舵彁鍙栨墍闇�淇℃伅 var list = await _wmsStockQuanRep.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.PackageCode), u => u.PackageCode.Contains(input.PackageCode.Trim())) - .Select(x => new { x.PackageCode }) + .WhereIF(!string.IsNullOrWhiteSpace(input.PlanNo), u => u.PlanNo.Contains(input.PlanNo.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.OrderId), u => u.OrderId.Contains(input.OrderId.Trim())) + .Select(x => new { x.PackageCode, x.PlanNo, x.OrderId }) .ToListAsync(); // 鍒涘缓涓�涓垪琛ㄤ互瀛樺偍 WmsPackListOutput var resultList = new List<WmsPackListOutput>(); // 鍒嗙粍骞惰绠楁瘡缁勪俊鎭� - var groupedResult = list.GroupBy(x => x.PackageCode); + var groupedResult = list.GroupBy(x => new { x.PackageCode, x.PlanNo, x.OrderId }); foreach (var g in groupedResult) { // 鍦ㄨ繖閲岃绠楁瘡缁勭殑鎬绘暟 var count = g.Count(); - var mesTotalCount = await _mesBatchOrderUpiRep.AsQueryable().CountAsync(m => m.PackageCode == g.Key); + var mesTotalCount = await _mesBatchOrderUpiRep.AsQueryable().CountAsync(m => m.PackageCode == g.Key.PackageCode); resultList.Add(new WmsPackListOutput { - PackageCode = g.Key, + PackageCode = g.Key.PackageCode, + PlanNo = g.Key.PlanNo, + OrderId = g.Key.OrderId, Count = count, MesTotalCount = mesTotalCount, IsPack = count >= mesTotalCount, // 妫�鏌ユ槸鍚︽墦鍖� -- Gitblit v1.9.3