From 7cc26b2202675a4ef2189a60c275bc9345bc9856 Mon Sep 17 00:00:00 2001
From: cjs <2216046164@qq.com>
Date: 星期二, 08 七月 2025 17:04:24 +0800
Subject: [PATCH] 111

---
 HH.WCS.Mobox3.NongFuLinZhi/process/DeviceProcess.cs |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/HH.WCS.Mobox3.NongFuLinZhi/process/DeviceProcess.cs b/HH.WCS.Mobox3.NongFuLinZhi/process/DeviceProcess.cs
index 18f2d22..4826fa9 100644
--- a/HH.WCS.Mobox3.NongFuLinZhi/process/DeviceProcess.cs
+++ b/HH.WCS.Mobox3.NongFuLinZhi/process/DeviceProcess.cs
@@ -520,7 +520,7 @@
                 {
                     LogHelper.Info("鍗充骇鍗崇敤宸ュ崟");
                     //鍗充骇鍗崇敤鍦ㄨ捣鐐逛负绾胯竟
-                    var bcpInfo = Settings.areaInfos.Where(a => a.areaName == "鐡惰儦鍗充骇婊℃" && a.enable == 1).FirstOrDefault();
+                    var bcpInfo = Settings.areaInfos.Where(a => a.areaName == "鐡跺澂鍗充骇婊℃" && a.enable == 1).FirstOrDefault();
                     if (bcpInfo != null)
                     {
                         startArea = bcpInfo.areaCode;
@@ -532,7 +532,7 @@
                 {
                     LogHelper.Info("闈炲嵆浜у嵆鐢ㄥ伐鍗�);
                     //闈炲嵆浜у嵆鐢ㄨ捣鐐逛负搴撳尯
-                    string areaName = plc.deviceName.Split('-')[1].Substring(0, 1) + "鍙风摱鑳氱炕鏂楁満闈炲嵆浜ф弧妗�;
+                    string areaName = plc.deviceName.Split('-')[1].Substring(0, 1) + "鍙风摱鍧炕鏂楁満闈炲嵆浜ф弧妗�;
                     var bcpInfo = Settings.areaInfos.Where(a => a.areaName == areaName && a.enable == 1).FirstOrDefault();
                     if (bcpInfo != null)
                     {
@@ -544,7 +544,7 @@
 
                 if (data.Length == 6)
                 {
-                    if (data.Substring(0, 2) == "11")
+                    if (data.Substring(2, 2) == "22")
                     {
                         if (LocationHelper.CheckLocFree(plc.TN_Location[0]))
                         {
@@ -574,12 +574,12 @@
                                     //鍒濆鐘舵�锛屾棤鎵樼洏锛岀洿鎺ヤ笂婊℃墭(闈炲嵆浜у嵆鐢ㄩ渶瑕佹牎楠�濂楄瀹屾垚锛屽嵆浜у嵆鐢ㄧ洿鎺ヤ娇鐢�
                                     if (workInfo.S_UsingNow == "Y")
                                     {
-                                        LogHelper.Info($"鐡惰儦鍗充骇婊℃ 鏌ユ壘");
+                                        LogHelper.Info($"鐡跺澂鍗充骇婊℃ 鏌ユ壘");
                                         startLoca = getFDSXArea(db, workInfo, startArea);
                                     }
                                     else
                                     {
-                                        LogHelper.Info($"鐡惰儦缈绘枟鏈洪潪鍗充骇婊℃ 鏌ユ壘");
+                                        LogHelper.Info($"鐡跺澂缈绘枟鏈洪潪鍗充骇婊℃ 鏌ユ壘");
                                         startLoca = getFDSXArea(db, workInfo, startArea);
                                     }
 
@@ -652,7 +652,7 @@
 
                 if (data.Length == 6)
                 {
-                    if (data.Substring(0, 2) == "11")
+                    if (data.Substring(2, 2) == "22")
                     {
                         if (LocationHelper.CheckLocFree(plc.TN_Location[0]))
                         {
@@ -785,11 +785,11 @@
                     taskType = "娉ㄥ搴撳瓨婊℃墭涓嬬嚎锛堢摱鍧級";
                 }
                 //endArea = Settings.GetLinJiangBCPAreaList().Where(a => a.AreaName == "鐡跺澂婊℃墭" && a.Enable == "1").FirstOrDefault().AreaNo;
-                if (data.Length == 4)
+                if (data.Length == 8)
                 {
-                    if (data == "1122") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[0], "鐡跺澂鏈�);
+                    if (data.Substring(0,2) == "12") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[0], "鐡跺澂鏈�);
 
-                    if (data == "1221") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[1], "鐡跺澂鏈�);
+                    if (data.Substring(2,2) == "22") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[1], "鐡跺澂鏈�);
                 }
             }
             else LogHelper.Info($"鐡跺澂鏈猴細{plc.deviceName} 鏈紑鍚伐鍗曪紝涓嶅彲瑙﹀彂婊℃墭涓嬬嚎", "鐡跺澂鏈�);
@@ -929,7 +929,7 @@
                 if (mst.S_TYPE.Contains("缈绘枟鏈�))
                 {
                     LogHelper.Info($"鏌ヨ缈绘枟鏈哄厑璁稿彇绌轰俊鍙�鍏佽鍙栫┖淇″彿={LineState[mst.S_START_LOC.Trim()].status} 鏃堕棿闂撮殧={DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds}", "瀹夊叏浜や簰");
-                    if ((LineState[mst.S_START_LOC.Trim()].status == "112100" || LineState[mst.S_START_LOC.Trim()].status == "112200") && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
+                    if (LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "00" && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
                     {
                         //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1101, 18);
                         NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1101");
@@ -941,7 +941,7 @@
                     LogHelper.Info($"鏌ヨ杈撻�绾垮厑璁稿彇婊′俊鍙�鍏佽鍙栨弧淇″彿={LineState[mst.S_START_LOC.Trim()].status} 鏃堕棿闂撮殧={DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds}", "瀹夊叏浜や簰");
                     if (mst.S_TYPE.Contains("婊℃墭涓嬬嚎"))
                     {
-                        if ((LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "01" || LineState[mst.S_START_LOC.Trim()].status.Substring(6,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
+                        if ((LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "00" || LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
                         {
                             //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1101, 18);
                             NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1101");
@@ -956,7 +956,6 @@
                             TaskProcess.sendSing(mst, 1101);
                         }
                     }
-                    
                 }
             }
             else LogHelper.Info($"瀛楀吀涓湭鎵惧埌璇ey鐨勬暟鎹紝key锛歿mst.S_START_LOC}");
@@ -973,7 +972,7 @@
                     if (mst.S_TYPE.Contains("缈绘枟鏈�))
                     {
                         LogHelper.Info($"鏌ヨ缈绘枟鏈哄厑璁镐笂婊′俊鍙�鍏佽涓婃弧淇″彿={LineState[mst.S_END_LOC.Trim()].status} 鏃堕棿闂撮殧={DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds}", "瀹夊叏浜や簰");
-                        if ((LineState[mst.S_END_LOC.Trim()].status == "112100" || LineState[mst.S_END_LOC.Trim()].status == "112200") && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
+                        if (LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "00" && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
                         {
                             //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1103, 18);
                             NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1103");
@@ -985,7 +984,7 @@
                         LogHelper.Info($"鏌ヨ杈撻�绾垮厑璁歌ˉ绌轰俊鍙�鍏佽琛ョ┖淇″彿={LineState[mst.S_END_LOC.Trim()].status} 鏃堕棿闂撮殧={DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds}", "瀹夊叏浜や簰");
                         if (mst.S_TYPE.Contains("绌烘墭涓婄嚎"))
                         {
-                            if ((LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "01" || LineState[mst.S_END_LOC.Trim()].status.Substring(6,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
+                            if ((LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "00" || LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
                             {
                                 //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1103, 18);
                                 NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1103");

--
Gitblit v1.9.1