change - 添加过点数据

dev
liuwf 1 year ago
parent b8239eec3b
commit d8a4766eef

@ -45,6 +45,8 @@ namespace Aucma.Core.CodeBinding.ViewModels
private readonly IBaseBomInfoServices? _baseBomInfoServices; private readonly IBaseBomInfoServices? _baseBomInfoServices;
private readonly IProductPlanInfoServices? _productPlanInfoServices; private readonly IProductPlanInfoServices? _productPlanInfoServices;
private readonly IPrintBarCodeServices? _printBarCodeServices; private readonly IPrintBarCodeServices? _printBarCodeServices;
// 过点数据表物料完成记录MaterialCompletion
private readonly IMaterialCompletionServices? _iMaterialCompletionServices;
// 静态变量存code1 // 静态变量存code1
private static string code1Str = string.Empty; private static string code1Str = string.Empty;
// 定时检测数据库有没有pad绑定未放行的数据 // 定时检测数据库有没有pad绑定未放行的数据
@ -58,6 +60,7 @@ namespace Aucma.Core.CodeBinding.ViewModels
_baseMaterialInfoServices = App.ServiceProvider.GetService<IBaseMaterialInfoServices>(); _baseMaterialInfoServices = App.ServiceProvider.GetService<IBaseMaterialInfoServices>();
_productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>(); _productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>();
_printBarCodeServices = App.ServiceProvider.GetService<IPrintBarCodeServices>(); _printBarCodeServices = App.ServiceProvider.GetService<IPrintBarCodeServices>();
_iMaterialCompletionServices = App.ServiceProvider.GetService<IMaterialCompletionServices>();
MvCodeHelper.ReceiveCode1Event += receiveCode1; MvCodeHelper.ReceiveCode1Event += receiveCode1;
MvCodeHelper.ReceiveCode2Event += receiveCode2; MvCodeHelper.ReceiveCode2Event += receiveCode2;
// pda手持检测plc放行定时器 // pda手持检测plc放行定时器
@ -383,20 +386,19 @@ namespace Aucma.Core.CodeBinding.ViewModels
record.isPlcPass = 2; record.isPlcPass = 2;
} }
await _codeBindingRecordServices.UpdateAsync(record); await _codeBindingRecordServices.UpdateAsync(record);
// 更新过点数据 #region 更新过点数据,插入记录到MATERIAL_COMPLETION表
#region 插入记录到MATERIAL_COMPLETION表 PrintBarCode print = await _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == code1);
//PrintBarCode print = await _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == code1); if (print != null) return;
//if (print != null) return; ProductPlanInfo planInfo = await _productPlanInfoServices.FirstAsync(x => x.OrderCode == print.OrderCode);
//ProductPlanInfo planInfo = await _productPlanInfoServices.FirstAsync(x=>x.OrderCode==print.); MaterialCompletion completion = new MaterialCompletion();
//MaterialCompletion completion = new MaterialCompletion(); completion.OrderCode = planInfo.OrderCode;
//completion.OrderCode = planInfo.OrderCode; completion.MaterialBarcode = code1;
//completion.MaterialBarcode = code1; completion.MaterialCode = planInfo.MaterialCode;
//completion.MaterialCode = planInfo.MaterialCode; completion.MaterialName = planInfo.MaterialName;
//completion.MaterialName = planInfo.MaterialName; completion.StationName = "1007";
//completion.StationName = "1008"; completion.CompleteDate = DateTime.Now;
//completion.CompleteDate = DateTime.Now; completion.planCode = planInfo.PlanCode;
//completion.planCode = planInfo.PlanCode; await _iMaterialCompletionServices.AddAsync(completion);
//await _iMaterialCompletionServices.AddAsync(completion);
#endregion #endregion
// 2.刷新界面信息 // 2.刷新界面信息

Loading…
Cancel
Save