From a5acf83d77d56723125d8bdbe06e03db16a7c38d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 03 12月 2024 18:52:04 +0800
Subject: [PATCH] 将很快

---
 CC/iWareCC_ASRS/ThreadService/00_269工位/DataProcess_269.cs |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs" "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
index bc41628..ea01d62 100644
--- "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
@@ -30,17 +30,23 @@
             LogType logType = LogType.DataProcess_269;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_alert_DataProcess_269 = string.Empty;
                 try
                 {
-                    if (SystemValue.isAllowRuning_DataProcess_269 && SystemValue.isStartedModel)
+                    //if (SystemValue.isAllowRuning_DataProcess_269 && SystemValue.isStartedModel)
+                    if (SystemValue.isStartedModel)
                     {
                         var rgvLocation = StationLocationEnum.棣栨鎵爜宸ヤ綅.ToString();
                         /*
                          * 1銆佷粠鏁版嵁搴撲腑鍒ゆ柇鏄惁榻愬
                          * 2銆佹牴鎹綈濂楃粨鏋滐紝鎺ㄩ�佺粰PLC
                          */
+                        if (FormCC.stationView == null)
+                        {
+                            SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()}-鑾峰彇PLC瀵硅薄涓簄ull";
+                            continue;
+                        }
                         var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
                         if (obj.R_ReqParseData)
                         {
@@ -58,11 +64,30 @@
                                 {
                                     SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 ";
                                     continue;
+                                    //*/
+                                }
+
+                                //鎺ㄩ�乸lc瑙f瀽瀹屾垚
+                                using (StationServiceClient client = new StationServiceClient())
+                                {
+                                    var res = await client.WriteQiTaoInfoAsync((int)EDevice.Station, rgvLocation, true);
+                                    if (!res.result)
+                                    {
+                                        SystemWarningMsg._lbl_alert_DataProcess_BZ01 = $"{rgvLocation.ToString()}- 鎺ㄩ�乸lc瑙f瀽瀹屾垚 澶辫触,WriteQiTaoInfoAsync杩斿洖:{res.resMsg}";
+                                        continue;
+                                    }
+                                    else
+                                    {
+                                        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�乸lc瑙f瀽瀹屾垚 鎴愬姛,WriteQiTaoInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+                                    }
                                 }
 
                                 upiObj.AreaCode = (int)AreaCodeEnum.寰呯紦瀛樺垎鎷e尯;
 
+                                WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "269", "棣栨鎵爜");
+
                                 wmsDB.SaveChanges();
+                                //*/
                             }
                         }
                     }
@@ -75,6 +100,6 @@
             }
         }
 
-    
+
     }
 }

--
Gitblit v1.9.3