change-过点数据暂不添加

main
liuwf 10 months ago
parent f600c4c894
commit 987a66bb78

@ -37,8 +37,11 @@ namespace Aucma.Core.Palletiz.Business
private AppConfig appConfig = new AppConfig(); private AppConfig appConfig = new AppConfig();
public string storeCode = Appsettings.app("StoreInfo", "PalletizStoreCodeA"); public string storeCode = Appsettings.app("StoreInfo", "PalletizStoreCodeA");
// 过点数据表物料完成记录MaterialCompletion
private readonly IMaterialCompletionServices? _iMaterialCompletionServices = App.ServiceProvider.GetService<IMaterialCompletionServices>();
private readonly IPrintBarCodeServices? _printBarCodeServices = App.ServiceProvider.GetService<IPrintBarCodeServices>();
private readonly ICodeBindingRecordServices? _codeBindingServices = App.ServiceProvider.GetService<ICodeBindingRecordServices>();
private readonly IRecordInStoreServices? _recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>(); private readonly IRecordInStoreServices? _recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
#region 委托事件 #region 委托事件
@ -218,8 +221,37 @@ namespace Aucma.Core.Palletiz.Business
} }
} }
/// <summary>
/// 添加过点数据,暂不添加
/// </summary>
/// <returns></returns>
public async Task AddCompleteData(string ProductSnCode)
{
CodeBindingRecord bindingRecord1 = _codeBindingServices.FirstAsync(x => x.ProductCode == ProductSnCode).Result;
#region 更新过点数据
if (bindingRecord1 != null && bindingRecord1.BoxCode != "")
{
PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode).Result;
if (print != null)
{
MaterialCompletion completion = new MaterialCompletion();
completion.OrderCode = print.OrderCode;
completion.MaterialBarcode = bindingRecord1.BoxCode;
completion.MaterialCode = print.MaterialCode;
completion.MaterialName = print.MaterialName;
// completion.StationName = "1009";
completion.CompleteDate = DateTime.Now;
completion.ProductLineCode = "CX_02";
completion.isDownLine = 1;
completion.ProductionCode = ProductSnCode;
_ = _iMaterialCompletionServices.AddAsync(completion).Result;
}
}
#endregion
}
/// <summary> /// <summary>
/// 通过物料型号获取货道信息 /// 通过物料型号获取货道信息

Loading…
Cancel
Save