diff --git a/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs b/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs index 4e53c4a5..582fb599 100644 --- a/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs +++ b/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs @@ -311,22 +311,26 @@ namespace Aucma.Core.ProductOffLine.ViewModels LoadData(); List listTime = await _baseBomInfoServices.getWorkTime(); if (listTime == null) return; - // var aa =_offLineInfoServices.Query(x=>x.ProductScanTime>= listTime[0].startTime && x.ProductScanTime<= listTime[11].startTime); + // var aa =_offLineInfoServices.Query(x=>x.ProductScanTime>= listTime[0].startTime && x.ProductScanTime<= listTime[11].startTime) + // List hourAmount = _offLineInfoServices.QueryCharts1("CX_01"); - // List hourAmount = _offLineInfoServices.QueryCharts1("CX_01"); List list = await _offLineInfoServices.QueryCharts(listTime[0].startTime, listTime[11].startTime); if (list == null) return; - var aaa= list.Where(x => int.Parse(x.hour) >= listTime[0].startTime.Hour && int.Parse(x.hour) <= listTime[11].startTime.Hour && x.productLineCode.Equals("CX_02")); - string aa =listTime.First().hourTime.Substring(0, 2); - + var hourList = list.Where(x => int.Parse(x.hour) >= listTime[0].startTime.Hour && int.Parse(x.hour) <= listTime[11].startTime.Hour && x.productLineCode.Equals("CX_02")); + List xList = new List(); ChartValues achievement2 = new ChartValues(); - - for (int i = 0; i < 12; i++) + foreach (var item in hourList) { - // xList.Add(list[i].time.Substring(11, 2) + ":00"); - achievement2.Add(list[i].Amount); + xList.Add(item.hour); + achievement2.Add(item.Amount); } + + //for (int i = 0; i < 12; i++) + //{ + // // xList.Add(list[i].time.Substring(11, 2) + ":00"); + // achievement2.Add(list[i].Amount); + //} var column2 = new ColumnSeries(); column2.DataLabels = true; column2.Title = "产量";