change-发泡更改前提交

main
liuwf 3 weeks ago
parent cff3ff2dad
commit 992a19b15b

@ -230,7 +230,7 @@ namespace Aucma.Core.Palletiz.Business
//刷新页面 //刷新页面
AddDataEvent?.Invoke(recordInstore); AddDataEvent?.Invoke(recordInstore);
} }
AddCompleteData(recordInstore.BarCodeCode, prodInfo.ProductLineCode);
_ = _recordInstoreServices.AddAsync(recordInstore).Result; _ = _recordInstoreServices.AddAsync(recordInstore).Result;
@ -247,31 +247,37 @@ namespace Aucma.Core.Palletiz.Business
/// 添加过点数据,暂不添加 /// 添加过点数据,暂不添加
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public async Task AddCompleteData(string ProductSnCode) public void AddCompleteData(string ProductSnCode, string productLine)
{ {
CodeBindingRecord bindingRecord1 = _codeBindingServices.FirstAsync(x => x.ProductCode == ProductSnCode).Result; try
#region 更新过点数据
if (bindingRecord1 != null && bindingRecord1.BoxCode != "")
{ {
PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode).Result; CodeBindingRecord bindingRecord1 = _codeBindingServices.FirstAsync(x => x.ProductCode == ProductSnCode).Result;
if (print != null) #region 更新过点数据
if (bindingRecord1 != null && bindingRecord1.BoxCode != "")
{ {
MaterialCompletion completion = new MaterialCompletion(); PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode).Result;
completion.OrderCode = print.OrderCode; if (print != null)
completion.MaterialBarcode = bindingRecord1.BoxCode; {
completion.MaterialCode = print.MaterialCode; MaterialCompletion completion = new MaterialCompletion();
completion.MaterialName = print.MaterialName; completion.OrderCode = print.OrderCode;
// completion.StationName = "1009"; completion.MaterialBarcode = bindingRecord1.BoxCode;
completion.CompleteDate = DateTime.Now; completion.MaterialCode = print.MaterialCode;
completion.ProductLineCode = "CX_02"; completion.MaterialName = print.MaterialName;
completion.isDownLine = 1; completion.StationName = productLine == "CX_01"?"1110":"1010";
completion.ProductionCode = ProductSnCode; completion.CompleteDate = DateTime.Now;
_ = _iMaterialCompletionServices.AddAsync(completion).Result; 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); AddDataEvent?.Invoke(recordInstore);
} }
_= AddCompleteData(recordInstore.BarCodeCode, prodInfo.ProductLineCode);
_ = _recordInstoreServices.AddAsync(recordInstore).Result; _ = _recordInstoreServices.AddAsync(recordInstore).Result;
RefreshAreaMsgEvent?.Invoke(spaceArea, ""); RefreshAreaMsgEvent?.Invoke(spaceArea, "");
@ -292,31 +292,37 @@ namespace Aucma.Core.PalletizCX1.Business
/// 添加过点数据,暂不添加 /// 添加过点数据,暂不添加
/// </summary> /// </summary>
/// <returns></returns> /// <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; try
#region 更新过点数据
if (bindingRecord1 != null && bindingRecord1.BoxCode != "")
{ {
PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode).Result; CodeBindingRecord bindingRecord1 = _codeBindingServices.FirstAsync(x => x.ProductCode == ProductSnCode).Result;
if (print != null) #region 更新过点数据
if (bindingRecord1 != null && bindingRecord1.BoxCode != "")
{ {
MaterialCompletion completion = new MaterialCompletion(); PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode).Result;
completion.OrderCode = print.OrderCode; if (print != null)
completion.MaterialBarcode = bindingRecord1.BoxCode; {
completion.MaterialCode = print.MaterialCode; MaterialCompletion completion = new MaterialCompletion();
completion.MaterialName = print.MaterialName; completion.OrderCode = print.OrderCode;
// completion.StationName = "1009"; completion.MaterialBarcode = bindingRecord1.BoxCode;
completion.CompleteDate = DateTime.Now; completion.MaterialCode = print.MaterialCode;
completion.ProductLineCode = "CX_02"; completion.MaterialName = print.MaterialName;
completion.isDownLine = 1; completion.StationName = productLine == "CX_01" ? "1110" : "1010";
completion.ProductionCode = ProductSnCode; completion.CompleteDate = DateTime.Now;
_ = _iMaterialCompletionServices.AddAsync(completion).Result; 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 #endregion
// public OffLineBusiness(){} // public OffLineBusiness(){}
#region 变量定义 #region 变量定义
private static string globalOrderNo = "";
private static List<ScannerModel> allScanners = Appsettings.app<ScannerModel>("ScannerServer").ToList(); private static List<ScannerModel> allScanners = Appsettings.app<ScannerModel>("ScannerServer").ToList();
// 内胆扫码器ip // 内胆扫码器ip
@ -669,6 +670,8 @@ namespace Aucma.Core.ProductOffLine.Business
TempOffLineInfo.MsgInfo = "获取信息成功" + BarCode + " 返回值:" + FArrayList[0].ToUpper(); // 提示信息*7 TempOffLineInfo.MsgInfo = "获取信息成功" + BarCode + " 返回值:" + FArrayList[0].ToUpper(); // 提示信息*7
TempOffLineInfo.ProductFactoryCode = FArrayList[1]; TempOffLineInfo.ProductFactoryCode = FArrayList[1];
TempOffLineInfo.ProductSNCode = FArrayList[2]; TempOffLineInfo.ProductSNCode = FArrayList[2];
//记录原始订单号,后续上传接口使用
globalOrderNo = FArrayList[3];
TempOffLineInfo.ProductOrderNo = DBToString(FArrayList[3]).Replace("0000", ""); // 订单编号*4 TempOffLineInfo.ProductOrderNo = DBToString(FArrayList[3]).Replace("0000", ""); // 订单编号*4
TempOffLineInfo.ProductSaleNo = DBToString(FArrayList[4]); TempOffLineInfo.ProductSaleNo = DBToString(FArrayList[4]);
TempOffLineInfo.ProductSaleLineNo = DBToString(FArrayList[5]); 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"; // string strSave = "Y";
if (!string.IsNullOrEmpty(strSave)) if (!string.IsNullOrEmpty(strSave))
{ {
@ -932,6 +935,7 @@ namespace Aucma.Core.ProductOffLine.Business
} }
log.Info(TempOffLineInfo.ProductSNCode + "条码重复上传plc应答字为2已经下传过不允许再次放行"); log.Info(TempOffLineInfo.ProductSNCode + "条码重复上传plc应答字为2已经下传过不允许再次放行");
TempOffLineInfo.MsgInfo = TempOffLineInfo.ProductSNCode + "条码重复上传plc应答字为2已经下传过不允许再次放行";
TempOffLineInfo.MsgAlarmFlag = true; TempOffLineInfo.MsgAlarmFlag = true;
TempOffLineInfo.MsgInfo = "条码重复,plc应答字2,禁止重复放行,上传时间:" + offLineInfo.ProductScanTime; TempOffLineInfo.MsgInfo = "条码重复,plc应答字2,禁止重复放行,上传时间:" + offLineInfo.ProductScanTime;

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

Loading…
Cancel
Save