liuwf 1 year ago
parent 9c02890a55
commit b8b8c09b15

@ -104,7 +104,7 @@ namespace Aucma.Core.BoxFoam.Business
public void init()
{
allSpaces = _baseSpaceInfoServices.Query(x => x.StoreCode == storeCode);
foreach (var space in allSpaces)
{

@ -302,21 +302,25 @@ namespace Aucma.Core.ProductOffLine.ViewModels
}
tempInfo.MsgAlarmFlag = false;
});
}
}
#endregion
private async void InitEveryDayMethod()
{
LoadData();
List<WorkTime> listTime = await _baseBomInfoServices.getWorkTime();
if (listTime == null) return;
List<Admin.Core.Model.ViewModels.ChartsByTime> 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<Admin.Core.Model.ViewModels.ChartsByTime> list = await _offLineInfoServices.QueryCharts(listTime[0].startTime, listTime[11].startTime);
if (list == null) return;
List<string> xList =new List<string>();
List<string> xList = new List<string>();
ChartValues<double> achievement2 = new ChartValues<double>();
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<WorkTime> listTime = await _baseBomInfoServices.getWorkTime();
// if (listTime == null) return;
// List<Admin.Core.Model.ViewModels.ChartsByTime> list = await _offLineInfoServices.QueryCharts(listTime[0].startTime, listTime[11].startTime);
// if (list == null) return;
// List<string> xList =new List<string>();
// ChartValues<double> achievement2 = new ChartValues<double>();
// 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<double> achievement = new ChartValues<double>();
// 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<string>()
// {
// "SC-230,11W/H成品",
// "SC-439箱体",
// "SC-439U壳",
// "SC-439背板",
// "SC-439VAM,元气森林,C",
// };
//}
public async void LoadData()
{
List<OffLineInfo> list = await _offLineInfoServices.QueryAsync(x => x.ProductScanTime >= System.DateTime.Now.AddDays(-1), "PRODUCT_SCANTIME desc");

Loading…
Cancel
Save