|
|
|
@ -236,12 +236,25 @@ namespace Aucma.Core.DoorFoam.ViewModels
|
|
|
|
|
if (string.IsNullOrEmpty(code)) return;
|
|
|
|
|
var plan = _productPlanInfoServices.QueryAsync(d => d.ProductLineCode == stationCode && d.PlanAmount > d.CompleteAmount).Result;
|
|
|
|
|
//var plan = _baseOrderInfoServices.QueryAsync().Result;
|
|
|
|
|
if (plan == null) return;
|
|
|
|
|
if (plan == null)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("未查询到计划信息");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var obj = _printBarCodeServices.FirstAsync(d => d.MaterialBarcode == code).Result;
|
|
|
|
|
if (obj == null) return;
|
|
|
|
|
if (obj == null)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("未查询到条码打印信息");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//string materialCode = "11239723";
|
|
|
|
|
ProductPlanInfo stationPlan = plan.FirstOrDefault(d =>d.OrderCode == obj.OrderCode);
|
|
|
|
|
if (stationPlan == null) return;
|
|
|
|
|
if (stationPlan == null)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"未查询到该条码订单信息;条码【{code}】");
|
|
|
|
|
log.Error($"未查询到该条码订单信息;条码【{code}】");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DoorMateHistory model = new DoorMateHistory();
|
|
|
|
|
if (planInfoDataGrid.Count() == 0) model.ObjId = 1;
|
|
|
|
@ -253,13 +266,13 @@ namespace Aucma.Core.DoorFoam.ViewModels
|
|
|
|
|
model.MaterialName = stationPlan.MaterialName;
|
|
|
|
|
model.ScanTime = DateTime.Now;
|
|
|
|
|
SaveMateHistory(code,obj, productLineCode, plan, model);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine($"箱门匹配信息记录成功!");
|
|
|
|
|
model.MaterialName = this.FormatMaterialType(stationPlan.MaterialName);
|
|
|
|
|
model.ObjId = i+1;
|
|
|
|
|
planInfoDataGrid.Insert(0, model);
|
|
|
|
|
|
|
|
|
|
InitEveryDayMethodAsync();//刷新型号统计图表
|
|
|
|
|
|
|
|
|
|
Console.WriteLine($"箱门匹配信息记录成功!刷新型号统计图表");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 记录历史
|
|
|
|
|