From 3eabfd8dfa2574efbe8ce8d4a64862c16ad04823 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周六, 14 12月 2024 14:34:02 +0800
Subject: [PATCH] 222

---
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/DataProcess_RobotBuffer_ModeChange.cs |  206 +++++++++++++++++++++++++-------------------------
 1 files changed, 103 insertions(+), 103 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/DataProcess_RobotBuffer_ModeChange.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/DataProcess_RobotBuffer_ModeChange.cs"
index e89e4a8..7341d69 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/DataProcess_RobotBuffer_ModeChange.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/DataProcess_RobotBuffer_ModeChange.cs"
@@ -1,109 +1,109 @@
-锘縰sing Admin.NET.Application;
-using iWareCC.Common.Helper;
-using iWareCC.StationService;
-using iWareCommon.Common.Globle;
-using iWareCommon.Utils;
-using iWareModel;
-using iWareSql.DataAccess;
-using iWareSql.DBModel;
-using iWareSql.WmsDBModel;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.ServiceModel.Configuration;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using WZ.Useful.Commons;
-using XiGang.Core.Model;
+锘�//using Admin.NET.Application;
+//using iWareCC.Common.Helper;
+//using iWareCC.StationService;
+//using iWareCommon.Common.Globle;
+//using iWareCommon.Utils;
+//using iWareModel;
+//using iWareSql.DataAccess;
+//using iWareSql.DBModel;
+//using iWareSql.WmsDBModel;
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using System.ServiceModel.Configuration;
+//using System.Text;
+//using System.Threading;
+//using System.Threading.Tasks;
+//using WZ.Useful.Commons;
+//using XiGang.Core.Model;
 
-namespace iWareCC.ThreadService
-{
-    /// <summary>
-    /// 鏈哄櫒浜虹紦瀛樺矝 妯″紡鍒囨崲 澶勭悊
-    /// </summary>
-    public static class DataProcess_RobotBuffer_ModeChange
-    {
-        public static async void Handler()
-        {
-            var alertMsg = "";
-            LogType logType = LogType.DataProcess_RobotBuffer_ModeChange;
-            while (true)
-            {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
-                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = string.Empty;
-                try
-                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange &&
-                    if ( SystemValue.isStartedModel)
-                    {
-                        var rgvLocation = StationLocationEnum.BZ39.ToString();
-                        if (FormCC.IsAllowRunOutMode)
-                        {
-                            using (WmsDBModel wmsDB = new WmsDBModel())
-                            {
-                                var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault();
+//namespace iWareCC.ThreadService
+//{
+//    /// <summary>
+//    /// 鏈哄櫒浜虹紦瀛樺矝 妯″紡鍒囨崲 澶勭悊
+//    /// </summary>
+//    public static class DataProcess_RobotBuffer_ModeChange
+//    {
+//        public static async void Handler()
+//        {
+//            var alertMsg = "";
+//            LogType logType = LogType.DataProcess_RobotBuffer_ModeChange;
+//            while (true)
+//            {
+//                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+//                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = string.Empty;
+//                try
+//                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange &&
+//                    if ( SystemValue.isStartedModel)
+//                    {
+//                        var rgvLocation = StationLocationEnum.BZ39.ToString();
+//                        if (FormCC.IsAllowRunOutMode)
+//                        {
+//                            using (WmsDBModel wmsDB = new WmsDBModel())
+//                            {
+//                                var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault();
 
-                                if (TaskHandler.ValidateNoFinishOutTaskForRobotBuffer(wmsDB))
-                                {//涓嶅瓨鍦�
-                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍏ュ簱妯″紡;
-                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍏ュ簱妯″紡.ToString();
-                                    rbRunMode.UpdateTime = DateTime.Now;
+//                                if (TaskHandler.ValidateNoFinishOutTaskForRobotBuffer(wmsDB))
+//                                {//涓嶅瓨鍦�
+//                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍏ュ簱妯″紡;
+//                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍏ュ簱妯″紡.ToString();
+//                                    rbRunMode.UpdateTime = DateTime.Now;
 
-                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
-                                    using (StationServiceClient client = new StationServiceClient())
-                                    {
-                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍏ュ簱妯″紡, rgvLocation);
-                                        if (!res.result)
-                                        {
-                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
-                                            continue;
-                                        }
-                                        else
-                                        {
-                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
-                                        }
-                                    }
-                                    FormCC.IsAllowRunOutMode = false;
-                                }
-                                else
-                                {//瀛樺湪
-                                    if (rbRunMode.LineRunMode == (int)RbRunModeEnum.鍑哄簱妯″紡)
-                                    {
-                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"宸茬粡鏄嚭搴撴ā寮忎簡,姝ゆ寰幆缁撴潫";
-                                        continue;
-                                    }
-                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍑哄簱妯″紡;
-                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍑哄簱妯″紡.ToString();
-                                    rbRunMode.UpdateTime = DateTime.Now;
+//                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
+//                                    using (StationServiceClient client = new StationServiceClient())
+//                                    {
+//                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍏ュ簱妯″紡, rgvLocation);
+//                                        if (!res.result)
+//                                        {
+//                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
+//                                            continue;
+//                                        }
+//                                        else
+//                                        {
+//                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+//                                        }
+//                                    }
+//                                    FormCC.IsAllowRunOutMode = false;
+//                                }
+//                                else
+//                                {//瀛樺湪
+//                                    if (rbRunMode.LineRunMode == (int)RbRunModeEnum.鍑哄簱妯″紡)
+//                                    {
+//                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"宸茬粡鏄嚭搴撴ā寮忎簡,姝ゆ寰幆缁撴潫";
+//                                        continue;
+//                                    }
+//                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍑哄簱妯″紡;
+//                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍑哄簱妯″紡.ToString();
+//                                    rbRunMode.UpdateTime = DateTime.Now;
 
-                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
-                                    using (StationServiceClient client = new StationServiceClient())
-                                    {
-                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍑哄簱妯″紡, rgvLocation);
-                                        if (!res.result)
-                                        {
-                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
-                                            continue;
-                                        }
-                                        else
-                                        {
-                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
-                                        }
-                                    }
-                                }
+//                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
+//                                    using (StationServiceClient client = new StationServiceClient())
+//                                    {
+//                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍑哄簱妯″紡, rgvLocation);
+//                                        if (!res.result)
+//                                        {
+//                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
+//                                            continue;
+//                                        }
+//                                        else
+//                                        {
+//                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+//                                        }
+//                                    }
+//                                }
 
-                                wmsDB.SaveChanges();
-                            }
-                        }
-                    }
-                }
-                catch (Exception ex)
-                {
-                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
-                    Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
-                }
-            }
-        }
+//                                wmsDB.SaveChanges();
+//                            }
+//                        }
+//                    }
+//                }
+//                catch (Exception ex)
+//                {
+//                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+//                    Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
+//                }
+//            }
+//        }
 
-    }
-}
+//    }
+//}

--
Gitblit v1.9.3