|
|
|
@ -275,7 +275,7 @@ namespace Aucma.Core.PalletizCX1.Business
|
|
|
|
|
//刷新页面
|
|
|
|
|
AddDataEvent?.Invoke(recordInstore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_= AddCompleteData(recordInstore.BarCodeCode, prodInfo.ProductLineCode);
|
|
|
|
|
_ = _recordInstoreServices.AddAsync(recordInstore).Result;
|
|
|
|
|
RefreshAreaMsgEvent?.Invoke(spaceArea, "");
|
|
|
|
|
|
|
|
|
@ -292,31 +292,37 @@ namespace Aucma.Core.PalletizCX1.Business
|
|
|
|
|
/// 添加过点数据,暂不添加
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task AddCompleteData(string ProductSnCode)
|
|
|
|
|
public async Task AddCompleteData(string ProductSnCode,string productLine)
|
|
|
|
|
{
|
|
|
|
|
CodeBindingRecord bindingRecord1 = _codeBindingServices.FirstAsync(x => x.ProductCode == ProductSnCode).Result;
|
|
|
|
|
#region 更新过点数据
|
|
|
|
|
if (bindingRecord1 != null && bindingRecord1.BoxCode != "")
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode).Result;
|
|
|
|
|
if (print != null)
|
|
|
|
|
CodeBindingRecord bindingRecord1 = _codeBindingServices.FirstAsync(x => x.ProductCode == ProductSnCode).Result;
|
|
|
|
|
#region 更新过点数据
|
|
|
|
|
if (bindingRecord1 != null && bindingRecord1.BoxCode != "")
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
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 = productLine == "CX_01" ? "1110" : "1010";
|
|
|
|
|
completion.CompleteDate = DateTime.Now;
|
|
|
|
|
completion.ProductLineCode = productLine;
|
|
|
|
|
completion.isDownLine = 1;
|
|
|
|
|
completion.ProductionCode = ProductSnCode;
|
|
|
|
|
_ = _iMaterialCompletionServices.AddAsync(completion).Result;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
#endregion
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
log.Error($"{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|