From 24178b588f371b84e2af0cd6b64dff292e262dc2 Mon Sep 17 00:00:00 2001 From: liuwf Date: Tue, 9 Jan 2024 15:32:20 +0800 Subject: [PATCH] . --- .../ViewModels/FoamMonitorPageViewModel.cs | 34 ++++++++++++++++--- .../Views/FoamMonitorPageView.xaml | 4 +-- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs index 3d84e3ad..16d03bd3 100644 --- a/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs +++ b/Aucma.Core.BoxFoam/ViewModels/FoamMonitorPageViewModel.cs @@ -88,6 +88,7 @@ namespace Aucma.Core.BoxFoam.ViewModels { ProductionHourList.Add(time.hourTime); } + // 货道列表 List list = _boxFoamDataServices.QueryAsync(x=>x.ProductLineCode.Equals("CX_02") && x.StationCode=="1005").Result; @@ -116,9 +117,22 @@ namespace Aucma.Core.BoxFoam.ViewModels column.Title = "当日小时产量统计"; column.Values = achievement; column.Foreground = Brushes.White; - Achievement.Add(column); + // Achievement.Add(column); + if (Achievement.Count > 0) + { + for(int i = 0; i < achievement.Count; i++) + { + Achievement.FirstOrDefault().Values[i] = achievement[i]; + } + } + else + { + Achievement.Add(column); + } #endregion + + #region 按类型统计 MaterialNameList = new List(); ChartValues achievement2 = new ChartValues(); @@ -134,14 +148,24 @@ namespace Aucma.Core.BoxFoam.ViewModels MaterialNameList.Add(item.Key); achievement2.Add(flattenedList.Sum()); } - ModelStatistics.Clear(); + // ModelStatistics.Clear(); var column2 = new ColumnSeries(); column2.DataLabels = true; column2.Title = "当日型号产量统计"; column2.Values = achievement2; column2.Foreground = Brushes.White; - ModelStatistics.Add(column2); - + // ModelStatistics.Add(column2); + if (ModelStatistics.Count > 0) + { + for(int i=0;i< achievement2.Count; i++) + { + ModelStatistics.FirstOrDefault().Values[i] = achievement2[i]; + } + } + else + { + ModelStatistics.Add(column2); + } #endregion } @@ -322,7 +346,7 @@ namespace Aucma.Core.BoxFoam.ViewModels foreach (var item in list) { if (item.Status == 1) StatusColor.Add("Green"); - if (item.Status == 0) StatusColor.Add("Red"); + if (item.Status == 2) StatusColor.Add("Red"); if (!string.IsNullOrEmpty(item.FixtureBoxType)) FixtureName.Add(item.FixtureBoxType); if (!string.IsNullOrEmpty(item.Yield.ToString())) Production.Add(item.Yield.ToString()); // if (!string.IsNullOrEmpty(item.InternalTemperature.ToString())) InternalTemperature.Add(item.InternalTemperature.ToString()); diff --git a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml index 9aa069f2..67291c47 100644 --- a/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml +++ b/Aucma.Core.BoxFoam/Views/FoamMonitorPageView.xaml @@ -401,7 +401,7 @@ - + @@ -426,7 +426,7 @@ - +