From 27ca0760e84ba57f5900e5751e61f0f76e641bc2 Mon Sep 17 00:00:00 2001 From: liuwf Date: Mon, 1 Apr 2024 16:12:23 +0800 Subject: [PATCH] . --- .../Business/offLineBusiness.cs | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs b/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs index ab410a25..e2bd6bdb 100644 --- a/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs +++ b/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs @@ -329,7 +329,9 @@ namespace Aucma.Core.ProductOffLine.Business { try { - OffLineInfo info11 = MapperTwo(TempOffLineInfo); + + + OffLineInfo info11 = MapperTwo(TempOffLineInfo); // log.Info("条码绑定表查到记录:"+JsonHelper.ObjectToJson(bindingRecord1)); @@ -418,6 +420,7 @@ namespace Aucma.Core.ProductOffLine.Business #endregion } + return true; @@ -567,7 +570,7 @@ namespace Aucma.Core.ProductOffLine.Business // } log.Info(TempOffLineInfo.ProductSNCode + ", 多码验证通过!"); //2.上传条码系统 - bool resultUp = uploadSnSysytem(TempOffLineInfo); + bool resultUp = uploadSnSysytem(TempOffLineInfo,out int orderType); return resultUp; } @@ -626,11 +629,11 @@ namespace Aucma.Core.ProductOffLine.Business /// /// /// - public bool uploadSnSysytem(TempInfo TempOffLineInfo) + public bool uploadSnSysytem(TempInfo TempOffLineInfo,out int orderType) { try { - int orderType = 1; // ZP03为在库返工订单,传参数3,默认正常订单1 + orderType = 1; // ZP03为在库返工订单,传参数3,默认正常订单1 // 先查订单 if (!string.IsNullOrEmpty(TempOffLineInfo.ProductOrderNo)) { @@ -681,7 +684,7 @@ namespace Aucma.Core.ProductOffLine.Business if (strSave.Contains("条码重复")) { - return CodeRepeatProcess(TempOffLineInfo); + return CodeRepeatProcess(TempOffLineInfo, orderType); } AddExceptionRecord(TempOffLineInfo.ProductSNCode, TempOffLineInfo.MsgInfo,2); @@ -716,6 +719,7 @@ namespace Aucma.Core.ProductOffLine.Business catch (Exception ex) { log.Error(ex.Message.ToString()); + orderType = 1; return false; } } @@ -730,8 +734,9 @@ namespace Aucma.Core.ProductOffLine.Business /// 20240315与郑总确认,不需要超时5分钟判断,条码重复判断数据库plc下发应答字,如果是1可以再次放行,如果是2说明plc已经应答箱体未走,不可放行 /// 经武经理输入密码以后手动放行 /// + /// orderType:1正常订单,3返工单,放行过plc为2也可以放行 /// - public bool CodeRepeatProcess(TempInfo TempOffLineInfo) + public bool CodeRepeatProcess(TempInfo TempOffLineInfo,int orderType) { try { @@ -750,6 +755,14 @@ namespace Aucma.Core.ProductOffLine.Business } else { + if (orderType == 3) + { + log.Info(TempOffLineInfo.ProductSNCode + "返工单条码重复上传,可以再次放行"); + TempOffLineInfo.MsgInfo = TempOffLineInfo.ProductSNCode + "返工单条码重复上传,可以再次放行"; + RefreshScanMateriaCodeEvent?.Invoke(TempOffLineInfo); + return true; + + } log.Info(TempOffLineInfo.ProductSNCode + "条码重复上传,plc应答字为2,已经下传过不允许再次放行"); TempOffLineInfo.MsgAlarmFlag = true;