分支自 SuZhouGuanHong/TaiYuanTaiZhong

huanghongfeng
2024-07-04 08dd2afd7a9614dad029e94918516b068d413cac
´úÂë¹ÜÀí/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();