From 987a66bb7838c7576b7cbfe37b2af8a35be83d5f Mon Sep 17 00:00:00 2001 From: liuwf Date: Sat, 30 Mar 2024 14:42:41 +0800 Subject: [PATCH] =?UTF-8?q?change-=E8=BF=87=E7=82=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9A=82=E4=B8=8D=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Business/InstoreBusiness.cs | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/Aucma.Core.Palletiz/Business/InstoreBusiness.cs b/Aucma.Core.Palletiz/Business/InstoreBusiness.cs index d9663bde..21bb48c6 100644 --- a/Aucma.Core.Palletiz/Business/InstoreBusiness.cs +++ b/Aucma.Core.Palletiz/Business/InstoreBusiness.cs @@ -37,8 +37,11 @@ namespace Aucma.Core.Palletiz.Business private AppConfig appConfig = new AppConfig(); public string storeCode = Appsettings.app("StoreInfo", "PalletizStoreCodeA"); + // 过点数据表,物料完成记录MaterialCompletion + private readonly IMaterialCompletionServices? _iMaterialCompletionServices = App.ServiceProvider.GetService(); - + private readonly IPrintBarCodeServices? _printBarCodeServices = App.ServiceProvider.GetService(); + private readonly ICodeBindingRecordServices? _codeBindingServices = App.ServiceProvider.GetService(); private readonly IRecordInStoreServices? _recordInstoreServices = App.ServiceProvider.GetService(); #region 委托事件 @@ -217,10 +220,39 @@ namespace Aucma.Core.Palletiz.Business RefreshMsgEvent?.Invoke(msg); } + } + /// + /// 添加过点数据,暂不添加 + /// + /// + 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 + } - - /// /// 通过物料型号获取货道信息 ///