change-发泡更改前提交

main
liuwf 3 weeks ago
parent cff3ff2dad
commit 992a19b15b

@ -230,7 +230,7 @@ namespace Aucma.Core.Palletiz.Business
//刷新页面
AddDataEvent?.Invoke(recordInstore);
}
AddCompleteData(recordInstore.BarCodeCode, prodInfo.ProductLineCode);
_ = _recordInstoreServices.AddAsync(recordInstore).Result;
@ -247,31 +247,37 @@ namespace Aucma.Core.Palletiz.Business
/// 添加过点数据,暂不添加
/// </summary>
/// <returns></returns>
public async Task AddCompleteData(string ProductSnCode)
public void 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)
{
}
}

@ -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}");
}
}

@ -55,6 +55,7 @@ namespace Aucma.Core.ProductOffLine.Business
#endregion
// public OffLineBusiness(){}
#region 变量定义
private static string globalOrderNo = "";
private static List<ScannerModel> allScanners = Appsettings.app<ScannerModel>("ScannerServer").ToList();
// 内胆扫码器ip
@ -669,6 +670,8 @@ namespace Aucma.Core.ProductOffLine.Business
TempOffLineInfo.MsgInfo = "获取信息成功" + BarCode + " 返回值:" + FArrayList[0].ToUpper(); // 提示信息*7
TempOffLineInfo.ProductFactoryCode = FArrayList[1];
TempOffLineInfo.ProductSNCode = FArrayList[2];
//记录原始订单号,后续上传接口使用
globalOrderNo = FArrayList[3];
TempOffLineInfo.ProductOrderNo = DBToString(FArrayList[3]).Replace("0000", ""); // 订单编号*4
TempOffLineInfo.ProductSaleNo = DBToString(FArrayList[4]);
TempOffLineInfo.ProductSaleLineNo = DBToString(FArrayList[5]);
@ -826,7 +829,7 @@ namespace Aucma.Core.ProductOffLine.Business
}
// 条码系统保存接口
string strSave = _productOffLineServices.SaveBarcodeInfo(TempOffLineInfo.ProductSNCode, appConfig.BarCodeAccount, TempOffLineInfo.ProductOrderNo, orderType);
string strSave = _productOffLineServices.SaveBarcodeInfo(TempOffLineInfo.ProductSNCode, appConfig.BarCodeAccount, globalOrderNo, orderType);
// string strSave = "Y";
if (!string.IsNullOrEmpty(strSave))
{
@ -932,6 +935,7 @@ namespace Aucma.Core.ProductOffLine.Business
}
log.Info(TempOffLineInfo.ProductSNCode + "条码重复上传plc应答字为2已经下传过不允许再次放行");
TempOffLineInfo.MsgInfo = TempOffLineInfo.ProductSNCode + "条码重复上传plc应答字为2已经下传过不允许再次放行";
TempOffLineInfo.MsgAlarmFlag = true;
TempOffLineInfo.MsgInfo = "条码重复,plc应答字2,禁止重复放行,上传时间:" + offLineInfo.ProductScanTime;

@ -68,6 +68,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
_offLineInfoServices = App.ServiceProvider.GetService<IOffLineInfoServices>();
_baseBomInfoServices = App.ServiceProvider.GetService<IBaseBomInfoServices>();
InitializeAsync();
RefreshChartsOff();
}
private async void InitializeAsync()

Loading…
Cancel
Save