|
|
|
@ -41,23 +41,29 @@ namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
|
|
|
|
|
public void InitData()
|
|
|
|
|
{
|
|
|
|
|
MaterialCode.Clear();
|
|
|
|
|
MaterialName.Clear();
|
|
|
|
|
PlanAmount.Clear();
|
|
|
|
|
ComplateAmount.Clear();
|
|
|
|
|
DifferenceAmount.Clear();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
MaterialCode.Clear();
|
|
|
|
|
MaterialName.Clear();
|
|
|
|
|
PlanAmount.Clear();
|
|
|
|
|
ComplateAmount.Clear();
|
|
|
|
|
DifferenceAmount.Clear();
|
|
|
|
|
|
|
|
|
|
var task = _boxFoamPlanServices.QueryAsync(x=>x.ProductLineCode == "CX_02" && x.StationCode == "1005" && x.ShiftType == 1).Result;
|
|
|
|
|
if (task == null) return;
|
|
|
|
|
task.OrderBy(d=>d.ObjId);
|
|
|
|
|
foreach (var item in task)
|
|
|
|
|
var task = _boxFoamPlanServices.QueryAsync(x => x.ProductLineCode == "CX_02" && x.StationCode == "1005" && x.ShiftType == 1).Result;
|
|
|
|
|
if (task == null) return;
|
|
|
|
|
task.OrderBy(d => d.ObjId);
|
|
|
|
|
foreach (var item in task)
|
|
|
|
|
{
|
|
|
|
|
Id.Add(item.ObjId);
|
|
|
|
|
MaterialCode.Add(item.MaterialCode);
|
|
|
|
|
MaterialName.Add(item.MaterialName);
|
|
|
|
|
PlanAmount.Add(item.PlanAmount);
|
|
|
|
|
ComplateAmount.Add(item.CompleteAmount);
|
|
|
|
|
DifferenceAmount.Add(item.PlanAmount - item.CompleteAmount);
|
|
|
|
|
}
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Id.Add(item.ObjId);
|
|
|
|
|
MaterialCode.Add(item.MaterialCode);
|
|
|
|
|
MaterialName.Add(item.MaterialName);
|
|
|
|
|
PlanAmount.Add(item.PlanAmount);
|
|
|
|
|
ComplateAmount.Add(item.CompleteAmount);
|
|
|
|
|
DifferenceAmount.Add(item.PlanAmount - item.CompleteAmount);
|
|
|
|
|
Console.WriteLine($"刷新计划列表异常:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|