From 08dd2afd7a9614dad029e94918516b068d413cac Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期四, 04 七月 2024 17:46:41 +0800 Subject: [PATCH] 大屏 --- 代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" index 39848cc..6f72987 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" @@ -171,7 +171,7 @@ var data3 = db2.Find(_ => true).Where(x => x.stationCode.Contains("A") || x.stationCode.Contains("B") || x.stationCode.Contains("C") || x.stationCode.Contains("D01")).ToList(); //搴撳尯鍥惧彿鏁伴噺,澶栧姞绌烘墭鏁伴噺 - var Number_wheels = data3.Where(_ => true) + var Number_wheels1 = data3.Where(_ => true) .GroupBy(s => new { stationType = string.IsNullOrEmpty(s.stationType) ? s.tray_type : s.stationType, @@ -183,6 +183,7 @@ tray_type = g.Key.tray_type }).ToList(); + var Number_wheels = Number_wheels1.Where(x => x.stationType != "LargeTray" && x.stationType != "SmallTray").ToList(); #endregion @@ -262,9 +263,23 @@ x.Key.stationType, combined_heatNumber = string.Join(", ", x.Select(y => y.heatNumber).Distinct()) }) - .Where(x => !string.IsNullOrEmpty(x.stationType) && !string.IsNullOrEmpty(x.combined_heatNumber)) .OrderBy(x => x.Area) .ThenBy(x => x.line) + .GroupBy(x => x.line) // 浣跨敤 GroupBy 鎸� Line 瀛楁鍒嗙粍 + .Select(group => + { + // 鎵惧埌姣忎釜鍒嗙粍涓涓�涓� stationType 涓嶄负绌虹殑鍏冪礌 + var firstWithStationType = group.FirstOrDefault(x => !string.IsNullOrEmpty(x.stationType)); + if (firstWithStationType != null) + { + return firstWithStationType; + } + else + { + // 濡傛灉鍒嗙粍涓兘鏄� stationType 涓虹┖锛屽垯杩斿洖绗竴涓厓绱狅紙姝ゆ椂鍗充负 stationType 涓虹┖鐨勶級 + return group.First(); + } + }) .ToList(); dataList = dataList.Concat(data).ToList(); @@ -325,7 +340,7 @@ Idt_agvtaskRepository db = new dt_agvtaskRepository(volContext); var dataList = db.Find(_ => true).OrderByDescending(x => x.agv_createtime).ToList(); - var data = dataList.Where(x => x.agv_tasktype != "Queue").Take(15).ToList(); + var data = dataList.Where(x => x.agv_taskstate != "闃熷垪" && x.agv_taskstate != "Queue" && x.agv_taskstate != "鏆傚仠" && x.agv_taskstate != "Pause").ToList(); if (data.Count <= 15) { data = dataList.Take(15).ToList(); -- Gitblit v1.9.3