diff --git a/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs b/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs index 0a494958..6a645347 100644 --- a/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs +++ b/Aucma.Core.BoxFoam/Business/InStoreBusiness.cs @@ -104,7 +104,7 @@ namespace Aucma.Core.BoxFoam.Business public void init() { - + allSpaces = _baseSpaceInfoServices.Query(x => x.StoreCode == storeCode); foreach (var space in allSpaces) { diff --git a/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs b/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs index 583cdff6..932d86d3 100644 --- a/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs +++ b/Aucma.Core.ProductOffLine/ViewModels/IndexPageViewModel.cs @@ -302,21 +302,25 @@ namespace Aucma.Core.ProductOffLine.ViewModels } tempInfo.MsgAlarmFlag = false; }); - } + } #endregion + private async void InitEveryDayMethod() { LoadData(); List listTime = await _baseBomInfoServices.getWorkTime(); if (listTime == null) return; - List list = await _offLineInfoServices.QueryCharts(listTime[0].startTime, listTime[11].startTime); + // var aa =_offLineInfoServices.Query(x=>x.ProductScanTime>= listTime[0].startTime && x.ProductScanTime<= listTime[11].startTime); + + + List list = await _offLineInfoServices.QueryCharts(listTime[0].startTime, listTime[11].startTime); if (list == null) return; - List xList =new List(); + List xList = new List(); ChartValues achievement2 = new ChartValues(); for (int i = 0; i < 12; i++) { - xList.Add(list[i].time.Substring(11, 2)+":00"); + xList.Add(list[i].time.Substring(11, 2) + ":00"); achievement2.Add(list[i].Amount); } var column2 = new ColumnSeries(); @@ -351,6 +355,54 @@ namespace Aucma.Core.ProductOffLine.ViewModels "SC-439VAM,元气森林,C", }; } + + + //private async void InitEveryDayMethod() + //{ + // LoadData(); + // List listTime = await _baseBomInfoServices.getWorkTime(); + // if (listTime == null) return; + // List list = await _offLineInfoServices.QueryCharts(listTime[0].startTime, listTime[11].startTime); + // if (list == null) return; + // List xList =new List(); + // ChartValues achievement2 = new ChartValues(); + // 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 = "产量"; + // column2.Values = achievement2; + // column2.Foreground = Brushes.White; + // Achievement.Add(column2); + // ProductionHourList = xList; + + + // ChartValues achievement = new ChartValues(); + // Random random = new Random(); + // for (int i = 0; i < 5; i++) + // { + // achievement.Add(random.Next(60, 100)); + // } + + // var column = new ColumnSeries(); + // column.DataLabels = true; + // column.Title = "型号"; + // column.Values = achievement; + // column.Foreground = Brushes.White; + + // ModelStatistics.Add(column); + // MaterialNameList = new List() + // { + // "SC-230,11W/H成品", + // "SC-439,箱体", + // "SC-439,U壳", + // "SC-439,背板", + // "SC-439VAM,元气森林,C", + // }; + //} public async void LoadData() { List list = await _offLineInfoServices.QueryAsync(x => x.ProductScanTime >= System.DateTime.Now.AddDays(-1), "PRODUCT_SCANTIME desc");