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
@ -952,12 +954,14 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// 刷新小时产量统计 /// 刷新小时产量统计
/// </summary> /// </summary>
private void RefreshHourAmount() private void RefreshHourAmount()
{
App.Current.Dispatcher.Invoke((Action)(() =>
{ {
//获取小时产量 //获取小时产量
string stationCode = Appsettings.app("StationInfo", "StationCode"); string stationCode = Appsettings.app("StationInfo", "StationCode");
var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result; var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result;
App.Current.Dispatcher.Invoke((Action)(() =>
{
if (hourAmount != null) if (hourAmount != null)
{ {
if (Achievement.Count != 0) Achievement.Clear(); if (Achievement.Count != 0) Achievement.Clear();
@ -1009,12 +1013,13 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// 更新小时产量统计 /// 更新小时产量统计
/// </summary> /// </summary>
private void RefreshHourAmountChart() private void RefreshHourAmountChart()
{
App.Current.Dispatcher.Invoke((Action)(() =>
{ {
//获取小时产量 //获取小时产量
string stationCode = Appsettings.app("StationInfo", "StationCode"); string stationCode = Appsettings.app("StationInfo", "StationCode");
var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result; var hourAmount = _sysUserInfoServices.GetSheetMetaHourData(stationCode).Result;
App.Current.Dispatcher.Invoke((Action)(() =>
{
if (hourAmount != null) if (hourAmount != null)
{ {
int hour = 0; int hour = 0;
@ -1038,12 +1043,13 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// 刷新物料型号统计 /// 刷新物料型号统计
/// </summary> /// </summary>
private void RefreshMaterialStats() private void RefreshMaterialStats()
{
App.Current.Dispatcher.Invoke((Action)(() =>
{ {
//获取物料型号统计 //获取物料型号统计
string stationCode = Appsettings.app("StationInfo", "StationCode"); string stationCode = Appsettings.app("StationInfo", "StationCode");
var sheetMetalTypeList = _sysUserInfoServices.GetSheetMetalTypeData(stationCode).Result; var sheetMetalTypeList = _sysUserInfoServices.GetSheetMetalTypeData(stationCode).Result;
App.Current.Dispatcher.Invoke((Action)(() =>
{
if (sheetMetalTypeList != null) if (sheetMetalTypeList != null)
{ {
#region 按类型统计 #region 按类型统计

Loading…
Cancel
Save