change-优化图表统计

main
liuwf 10 months ago
parent 785e17e24a
commit ce02c0e4b3

@ -107,8 +107,10 @@ namespace Aucma.Core.SheetMetal.ViewModels
#region 更新前端数据 #region 更新前端数据
public Task RefreshChat() public Task RefreshChat()
{ {
RefreshHourAmountChart();//小时产量 RefreshHourAmount();//小时产量
RefreshMaterialChart();//型号产量 RefreshMaterialStats();//型号产量
// RefreshHourAmountChart();//小时产量
// RefreshMaterialChart();//型号产量
return Task.CompletedTask; return Task.CompletedTask;
} }
#endregion #endregion
@ -953,11 +955,13 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// </summary> /// </summary>
private void RefreshHourAmount() private void RefreshHourAmount()
{ {
//获取小时产量
string stationCode = Appsettings.app("StationInfo", "StationCode");
var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result;
App.Current.Dispatcher.Invoke((Action)(() => App.Current.Dispatcher.Invoke((Action)(() =>
{ {
//获取小时产量
string stationCode = Appsettings.app("StationInfo", "StationCode");
var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result;
if (hourAmount != null) if (hourAmount != null)
{ {
if (Achievement.Count != 0) Achievement.Clear(); if (Achievement.Count != 0) Achievement.Clear();
@ -1010,11 +1014,12 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// </summary> /// </summary>
private void RefreshHourAmountChart() private void RefreshHourAmountChart()
{ {
//获取小时产量
string stationCode = Appsettings.app("StationInfo", "StationCode");
var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result;
App.Current.Dispatcher.Invoke((Action)(() => App.Current.Dispatcher.Invoke((Action)(() =>
{ {
//获取小时产量
string stationCode = Appsettings.app("StationInfo", "StationCode");
var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result;
if (hourAmount != null) if (hourAmount != null)
{ {
int hour = 0; int hour = 0;
@ -1039,11 +1044,12 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// </summary> /// </summary>
private void RefreshMaterialStats() private void RefreshMaterialStats()
{ {
//获取物料型号统计
string stationCode = Appsettings.app("StationInfo", "StationCode");
var sheetMetalTypeList = _sysUserInfoServices.GetSheetMetalTypeData(stationCode).Result;
App.Current.Dispatcher.Invoke((Action)(() => App.Current.Dispatcher.Invoke((Action)(() =>
{ {
//获取物料型号统计
string stationCode = Appsettings.app("StationInfo", "StationCode");
var sheetMetalTypeList = _sysUserInfoServices.GetSheetMetalTypeData(stationCode).Result;
if (sheetMetalTypeList != null) if (sheetMetalTypeList != null)
{ {
#region 按类型统计 #region 按类型统计

Loading…
Cancel
Save