|
|
|
@ -919,7 +919,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
App.Current.Dispatcher.BeginInvoke((Action)(async () =>
|
|
|
|
|
{
|
|
|
|
|
PlanInfoDataGrid.Clear();
|
|
|
|
|
await LoadData();
|
|
|
|
|
await LoadData();
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
@ -1070,50 +1070,51 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void RefreshMaterialChart()
|
|
|
|
|
{
|
|
|
|
|
App.Current.Dispatcher.Invoke((Action)(() =>
|
|
|
|
|
{
|
|
|
|
|
//获取物料型号统计
|
|
|
|
|
string stationCode = Appsettings.app("StationInfo", "StationCode");
|
|
|
|
|
var sheetMetalTypeList = _sysUserInfoServices.GetSheetMetalTypeData(stationCode).Result;
|
|
|
|
|
if (sheetMetalTypeList != null)
|
|
|
|
|
{
|
|
|
|
|
#region 按类型统计
|
|
|
|
|
ChartValues<double> achievement1 = new ChartValues<double>();
|
|
|
|
|
ChartValues<double> achievement2 = new ChartValues<double>();
|
|
|
|
|
for (int i = 0; i < sheetMetalTypeList.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
if (ModelStatistics.Count==0)
|
|
|
|
|
{
|
|
|
|
|
RefreshMaterialStats();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (sheetMetalTypeList.Count()>0)
|
|
|
|
|
{
|
|
|
|
|
//RefreshMaterialStats();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
double frontPlateAmount = Convert.ToDouble(sheetMetalTypeList[i].FrontPlateAmount);
|
|
|
|
|
ModelStatistics[0].Values[i] = frontPlateAmount;
|
|
|
|
|
double rearPanelAmount = Convert.ToDouble(sheetMetalTypeList[i].RearPanelAmount);
|
|
|
|
|
ModelStatistics[1].Values[i] = rearPanelAmount;
|
|
|
|
|
MaterialNameList[i] = sheetMetalTypeList[i].MaterialName;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
RefreshMaterialStats();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
RefreshMaterialStats();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
RefreshMaterialStats();
|
|
|
|
|
//App.Current.Dispatcher.Invoke((Action)(() =>
|
|
|
|
|
//{
|
|
|
|
|
//获取物料型号统计
|
|
|
|
|
//string stationCode = Appsettings.app("StationInfo", "StationCode");
|
|
|
|
|
//var sheetMetalTypeList = _sysUserInfoServices.GetSheetMetalTypeData(stationCode).Result;
|
|
|
|
|
//if (sheetMetalTypeList != null)
|
|
|
|
|
//{
|
|
|
|
|
#region 按类型统计
|
|
|
|
|
//ChartValues<double> achievement1 = new ChartValues<double>();
|
|
|
|
|
//ChartValues<double> achievement2 = new ChartValues<double>();
|
|
|
|
|
//for (int i = 0; i < sheetMetalTypeList.Count; i++)
|
|
|
|
|
//{
|
|
|
|
|
// if (ModelStatistics.Count==0)
|
|
|
|
|
// {
|
|
|
|
|
// RefreshMaterialStats();
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// if (sheetMetalTypeList.Count()>0)
|
|
|
|
|
// {
|
|
|
|
|
// //RefreshMaterialStats();
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// double frontPlateAmount = Convert.ToDouble(sheetMetalTypeList[i].FrontPlateAmount);
|
|
|
|
|
// ModelStatistics[0].Values[i] = frontPlateAmount;
|
|
|
|
|
// double rearPanelAmount = Convert.ToDouble(sheetMetalTypeList[i].RearPanelAmount);
|
|
|
|
|
// ModelStatistics[1].Values[i] = rearPanelAmount;
|
|
|
|
|
// MaterialNameList[i] = sheetMetalTypeList[i].MaterialName;
|
|
|
|
|
// }
|
|
|
|
|
// catch (Exception)
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
|
|
// RefreshMaterialStats();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// RefreshMaterialStats();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
#endregion
|
|
|
|
|
// }
|
|
|
|
|
// }));
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -1357,6 +1358,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 集合排序:将指定实体移动至第1位并将执行顺序整体后移
|
|
|
|
|
/// </summary>
|
|
|
|
|