From b07eb132b5886122d4d154cd163485af611ebc6a Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周三, 11 12月 2024 17:58:11 +0800 Subject: [PATCH] 222 --- CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/1、DataProcess_BZ12.cs | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" index 61b35ac..83f0e11 100644 --- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" @@ -1,4 +1,5 @@ 锘縰sing Admin.NET.Application; +using iWareCC.Common.Helper; using iWareCC.StationService; using iWareCommon.Common.Globle; using iWareCommon.Utils; @@ -16,7 +17,7 @@ { public class DataProcess_BZ12 { - public static void Hander() + public static async void Hander() { var alertMsg = ""; LogType logType = LogType.DataProcess_BZ12; @@ -85,6 +86,9 @@ var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault(); if (upiObj == null) { + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_1); + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 "; continue; } @@ -94,6 +98,9 @@ //placeZ = (short)upiObj.MachineZCenter; if (upiObj.UpiStatus == (int)UpiStatusEnum.宸茬爜鍨� || upiObj.UpiStatus == (int)UpiStatusEnum.鐮佸灈涓�) { + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_3); + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}鐘舵�佸凡鏄�'宸茬爜鍨�'鎴�'鐮佸灈涓�' "; continue; } @@ -110,6 +117,9 @@ { if (upiObj.PackageCode != wms_rbline_runmode.PalletizingUPI) { + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_4); + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鐮佸寘閮ㄤ欢娣锋壒 "; continue; } @@ -120,7 +130,7 @@ place = wms_rbline_runmode.PalletizingStation.ToString(); } else - { + {//琛ㄧず杩欐槸 鍖呯殑绗竴鍧楁澘 lastnum = 1; wms_rbline_runmode.PalletizingUPI = upiObj.PackageCode; if (obj.R_PalletizingStation1 == 1) @@ -134,9 +144,13 @@ } else { + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_6); + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鏃犲彲鐢ㄧ爜鍨涚洰鏍囦綅 "; continue; } + wms_rbline_runmode.PalletizingStation = int.Parse(place); } //濡傛灉娆″簭绛変簬褰撻挶鍖呮�绘暟閲忥紝鏄惁鏈澘缃负true @@ -148,10 +162,18 @@ } } + else + { + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},琛╳ms_rbline_runmode鏃犳暟鎹� "; + continue; + } //鏌ヨ鏈夋病鏈夋搴忓皬浜庡綋鍓嶆搴忓苟涓旀病鏈夌爜鍨涚殑 var oldupi = upiList.Where(x => x.Shelf < upiObj.Shelf && (x.UpiStatus != (int)UpiStatusEnum.宸茬爜鍨� && x.UpiStatus != (int)UpiStatusEnum.鐮佸灈涓�)).FirstOrDefault(); if (oldupi != null) { + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_5); + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鐮佸寘椤哄簭閿欒 "; continue; } @@ -167,7 +189,7 @@ Length = upiObj.Length, Width = upiObj.Width, Thk = upiObj.Thk, - IssueTime = DateTime.Now, + PlanNo = upiObj.PlanNo, OrderId = upiObj.OrderId, PackageCode = upiObj.PackageCode, @@ -198,6 +220,10 @@ wmsDB.SaveChanges(); } } + else + { + SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-娌℃湁瑕佸鐞嗙殑鏁版嵁"; + } } } catch (Exception ex) -- Gitblit v1.9.3