From 75ca84b7570d7a6a805c27164c3f17c1f2158423 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 13 12月 2024 08:34:26 +0800
Subject: [PATCH] 111

---
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs |   37 +++++++++++++++----------------------
 1 files changed, 15 insertions(+), 22 deletions(-)

diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs"
index 4e75984..b0bb047 100644
--- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs"
@@ -9,6 +9,7 @@
 using iWareSql.WmsDBModel;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics.Eventing.Reader;
 using System.Linq;
 using System.ServiceModel.Configuration;
 using System.Text;
@@ -65,13 +66,16 @@
                                 var isValidate = TaskHandler.ValidateIssueTaskForNoFinishTaskByUpi(wmsDB, upiCode);
                                 if (!isValidate)
                                 {
-                                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-鏈夆�樻湭缁撴潫鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
+                                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}- upi:{upiCode}鏈夆�樻湭缁撴潫鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
                                     continue;
                                 }
                                 //
                                 var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
                                 if (upiObj == null)
                                 {
+                                    //鍐欏叆鎶ヨ淇℃伅
+                                    await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ39_2);
+
                                     SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 ";
                                     continue;
                                 }
@@ -79,6 +83,9 @@
                                 var stock = wmsDB.wms_stock_quan.Where(x => x.Upi == upiObj.UPI).FirstOrDefault();
                                 if (stock != null)
                                 {
+                                    //鍐欏叆鎶ヨ淇℃伅
+                                    await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ39_1);
+
                                     SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()},UPI:{upiCode}宸茬粡鍦ㄧ紦瀛樺簱涓簡 ";
                                     continue;
                                 }
@@ -87,6 +94,9 @@
                                 var place = StationHandlerV2.FindBestEmptyPlace(wmsDB, upiObj);
                                 if (place == null)
                                 {
+                                    //鍐欏叆鎶ヨ淇℃伅
+                                    await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ39_3);
+
                                     SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌缂撳瓨鍖哄矝鐨勭┖搴撲綅 ";
                                     continue;
                                 }
@@ -121,27 +131,6 @@
 
                                 wmsDB.wms_rbline_task.Add(task);
 
-                                //涓存椂
-                                /*
-                                using (StationServiceClient client = new StationServiceClient())
-                                {
-
-                                    var res = await client.WriteInStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, place.PlaceCode,
-                                       (short)upiObj.Length,
-                                       (short)upiObj.Width, (short)upiObj.Thk, Convert.ToInt32(task.TaskNo));
-                                    if (!res.result)
-                                    {
-                                        SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,WriteInStoreTaskInfoAsync 杩斿洖:{res.resMsg}";
-                                        continue;
-                                    }
-                                    else
-                                    {
-                                        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,WriteInStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
-                                    }
-                                }
-                                //*/
-
-
 
                                 place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
 
@@ -150,6 +139,10 @@
                                 wmsDB.SaveChanges();
                             }
                         }
+                        else
+                        {
+                            SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-娌℃湁瑕佸鐞嗙殑鏁版嵁";
+                        }
                     }
                 }
                 catch (Exception ex)

--
Gitblit v1.9.3