|
|
|
@ -311,22 +311,26 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
|
LoadData();
|
|
|
|
|
List<WorkTime> 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<dynamic> hourAmount = _offLineInfoServices.QueryCharts1("CX_01");
|
|
|
|
|
|
|
|
|
|
// List<dynamic> hourAmount = _offLineInfoServices.QueryCharts1("CX_01");
|
|
|
|
|
List<Admin.Core.Model.ViewModels.ChartsByTime> 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<string> xList = new List<string>();
|
|
|
|
|
ChartValues<double> achievement2 = new ChartValues<double>();
|
|
|
|
|
|
|
|
|
|
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 = "产量";
|
|
|
|
|