change - 组装计划图表加载

collectionStore
wenjy 1 year ago
parent 07e715cd45
commit b056d9e8b4

Binary file not shown.

@ -304,7 +304,7 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
/// </summary>
private void RefreshPlanInfoDataGrid()
{
RefreshDataGrid();
RefreshExecutePlan();
App.Current.Dispatcher.Invoke((Action)(() =>
{
@ -320,7 +320,7 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
/// </summary>
public void Init()
{
RefreshDataGrid();
RefreshExecutePlan();
App.Current.Dispatcher.Invoke((Action)(() =>
{
@ -398,15 +398,14 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
}
/// <summary>
/// 刷新计划列表
/// 加载正在执行的计划
/// </summary>
private void RefreshDataGrid()
private void RefreshExecutePlan()
{
var planInfos = assemblyPlanBusiness.GetEexecutePlanInfosByProductLineCode();
if (planInfos != null)
{
RefreshStatisticsGauge(planInfos);
//加载正在执行的计划
planInfos = planInfos.Where(x => x.executeStatus == 2).ToList();
if (planInfos.Count > 0)
@ -430,7 +429,15 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
PlanAmount = stringChange.ParseToInt(planInfos.Sum(x => x.planAmount).ToString());
ComplateAmout = stringChange.ParseToInt(planInfos.Sum(x => x.completeAmount).ToString());
DiffAmount = planAmount - complateAmout;
CompleRoution = complateAmout / planAmount * 100 + "%";
double completionRate = (double)ComplateAmout / PlanAmount * 100; // 计算完成率
CompleRoution = completionRate.ToString("0.0");
}
else
{
PlanAmount = 0;
ComplateAmout = 0;
DiffAmount = 0;
CompleRoution = string.Empty;
}
}
}

Loading…
Cancel
Save