From 2de09bec5cc05bf875543fa8956167ca7db73021 Mon Sep 17 00:00:00 2001 From: 刘磊 <1161824510@qq.com> Date: 星期三, 25 六月 2025 11:36:44 +0800 Subject: [PATCH] 合并 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/Dt_WheelsStockService.cs | 51 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 41 insertions(+), 10 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/Dt_WheelsStockService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/Dt_WheelsStockService.cs" index 5b67789..e44767e 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/Dt_WheelsStockService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/Dt_WheelsStockService.cs" @@ -71,17 +71,16 @@ //杩囩泩閲忎笅闄� decimal selectionLowerValue = selectionStandards.lowerValue; - decimal mesStand = 0; string level = string.Empty; if ("left".Equals(wheelsPosition)) //鍖归厤宸﹁疆搴ц疆瀛� { - mesStand = decimal.Parse(CZInfo_Mes.ZLZZJ); + decimal mesStand = decimal.Parse(CZInfo_Mes.ZLZZJ); level = LevelChangeHelper.LevelChangeType(CZInfo_Mes.ZLZDJ); WheelsList = WheelsList.Where(x => mesStand - (decimal.Parse(x.Wheels_gkcc)) >= selectionLowerValue && mesStand - (decimal.Parse(x.Wheels_gkcc)) <= selectionUpperValue && x.Wheels_level == level && x.Wheels_NewOrOld == newOrOld).ToList(); } else //鍚﹀垯鍖归厤鍙宠疆搴ц疆瀛� { - mesStand = decimal.Parse(CZInfo_Mes.YLZZJ); + decimal mesStand = decimal.Parse(CZInfo_Mes.YLZZJ); level = LevelChangeHelper.LevelChangeType(CZInfo_Mes.YLZDJ); WheelsList = WheelsList.Where(x => mesStand - (decimal.Parse(x.Wheels_gkcc)) >= selectionLowerValue && mesStand - (decimal.Parse(x.Wheels_gkcc)) <= selectionUpperValue && x.Wheels_level == level && x.Wheels_NewOrOld == newOrOld).ToList(); } @@ -131,7 +130,7 @@ - public Dt_WheelsStock_Old GetSelectionWheels(List<Dt_WheelsStock_Old> wheelsStocks, Dt_SelectionStandards selectionStandards, Dt_CZInfo_mes CZInfo_Mes, string wheelsPosition, string newOrOld) + public Dt_WheelsStock_Old GetSelectionWheels(List<Dt_WheelsStock_Old> wheelsStocks, Dt_SelectionStandards selectionStandards, Dt_CZInfo_mes CZInfo_Mes, string wheelsPosition, string newOrOld, string wheelsProps) { try { @@ -148,14 +147,14 @@ { mesStand = decimal.Parse(CZInfo_Mes.ZLZZJ); level = LevelChangeHelper.JkChangeType(CZInfo_Mes.YLZDJ); - wheelsStocks = wheelsStocks.Where(x => x.venderno== level && x.repair_item == newOrOld).ToList(); + wheelsStocks = wheelsStocks.Where(x => x.venderno == level && x.repair_item == newOrOld).ToList(); } else //鍚﹀垯鍖归厤鍙宠疆搴ц疆瀛� { mesStand = decimal.Parse(CZInfo_Mes.YLZZJ); level = LevelChangeHelper.JkChangeType(CZInfo_Mes.YLZDJ); - wheelsStocks = wheelsStocks.Where(x => x.venderno== level && x.repair_item == newOrOld).ToList(); + wheelsStocks = wheelsStocks.Where(x => x.venderno == level && x.repair_item == newOrOld).ToList(); } foreach (var item in wheelsStocks) { @@ -163,16 +162,23 @@ string Wheels_gkzja = ""; string Wheels_gkzjb = ""; string Wheels_gkzjc = ""; + string clsx = ""; SaveModel saveModel = new SaveModel(); saveModel.MainData = new Dictionary<string, object> - { - { "cltm", item.wheel_code } - }; + { + { "cltm", item.wheel_code } + }; WebResponseContent webResponse = _toZYService.ZY_GetCLInfo(saveModel); if (webResponse.Status) { CLInfo_ZY data = (CLInfo_ZY)webResponse.Data; + + if(wheelsProps== data.CLSX) + { + wheelsStocks.Remove(item); + continue; + } Wheels_gkcc = data.gkcc; // 姣傚瓟a鐣岄潰鍧囧�� @@ -190,6 +196,7 @@ { wheelsStocks.Remove(item); + continue; } if (selectionStandards.isCantainGK) { @@ -210,6 +217,7 @@ && ZLZC - (decimal.Parse(Wheels_gkzjc)) < selectionLowerValue_gk && ZLZC - (decimal.Parse(Wheels_gkzjc)) > selectionUpperValue_gk) { wheelsStocks.Remove(item); + continue; } } else @@ -223,6 +231,7 @@ && YLZC - (decimal.Parse(Wheels_gkzjc)) >= selectionLowerValue_gk && YLZC - (decimal.Parse(Wheels_gkzjc)) <= selectionUpperValue_gk) { wheelsStocks.Remove(item); + continue; } @@ -242,7 +251,29 @@ } } + public WebResponseContent InventoryStatistics() + { + WebResponseContent content = new WebResponseContent(); + + List<Dt_WheelsStock> stockInfos = BaseDal.QueryData(); + + //鑾峰彇杞﹀瀷 + List<string> Wheels_CarTypeList = stockInfos.Select(x => x.Wheels_CarType).Distinct().ToList(); + + foreach (var CarType in Wheels_CarTypeList) + { + content.Data = stockInfos.Where(x => x.Wheels_CarType == CarType).GroupBy(w => w.Wheels_ldxh) + .Select(typeGroup => new + { + Wheels_CarType = CarType, //杞﹀瀷 + Wheels_ldxh = typeGroup.Key, + Count = typeGroup.Count(), + + }).ToList(); + } + return content; + } - + } \ No newline at end of file -- Gitblit v1.9.3