From 60a4de55deb1aeeb5621028a8f8c732c38027f81 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 03 12月 2024 14:19:35 +0800 Subject: [PATCH] 222 --- CC/iWareCC_ASRS/FormCC.cs | 69 ++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 32 deletions(-) diff --git a/CC/iWareCC_ASRS/FormCC.cs b/CC/iWareCC_ASRS/FormCC.cs index 99387b2..4d87e0e 100644 --- a/CC/iWareCC_ASRS/FormCC.cs +++ b/CC/iWareCC_ASRS/FormCC.cs @@ -29,6 +29,7 @@ using XiGang.Core.Model; using XiGang.Core.Model.ViewModels; + namespace iWareCC { public partial class FormCC : Form @@ -201,13 +202,14 @@ //鍫嗗灈鏈篣I璧嬪�� SetSrmUI(); + tskSetSrmLable = new Thread(SrmRead_Label); + tskSetSrmLable.Start(); + #endregion #region 璁剧疆鏄剧ずUI - tskSetSrmLable = new Thread(SrmRead_Label); - tskSetSrmLable.Start(); - tskSetRgvLable = new Thread(SetRgvLable); - tskSetRgvLable.Start(); + + #endregion #region 鏈嶅姟绾跨▼鍚姩 @@ -240,14 +242,21 @@ new Thread(DataProcess_BZ39.Handler).Start(); + new Thread(DataProcess_BZ39_IssueInboundTask.Handler).Start(); new Thread(DataProcess_BZ12.Hander).Start(); + new Thread(DataProcess_BZ12_IssueTask.Handler).Start(); + + new Thread(DataProcess_BZ12_FinishTask.Handler).Start(); new Thread(DataProcess_BZ21.Hander).Start(); + new Thread(DataProcess_BZ21_IssueTask.Handler).Start(); + new Thread(DataProcess_BZ21_FinishTask.Handler).Start(); new Thread(DeleteData).Start(); - //new Thread(PrintHandler.Handler).Start(); + new Thread(PushPackageCodeToMes.Handler).Start(); + new Thread(PushPaperCutToMes.Handler).Start(); @@ -325,10 +334,6 @@ //btn_Start_Click(null, null); } - - - #region 鍫嗗灈鏈虹嚎绋嬪拰UI澶勭悊 - /// <summary> /// 璁剧疆1/2鍙峰爢鍨涙満鐨勫墠绔樉绀� /// </summary> @@ -342,7 +347,7 @@ var showNowTime = "(" + DateTimeHelper.ConvertToStringForOnlyShowTime(DateTime.Now) + ")"; //璁剧疆鍫嗗灈鏈轰换鍔′笅鍙戝拰浠诲姟纭绾跨▼娑堟伅 - this.lbl_Alter_Srm1Release.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm1Release; + this.lbl_Alert_DataProcess_BZ39_IssueInboundTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_BZ39_IssueInboundTask; this.lbl_Alert_Srm2Release.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm2Release; this.lbl_Alert_Srm3Release.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm3Release; this.lbl_Alert_Srm4Release.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm4Release; @@ -352,17 +357,17 @@ this.lbl_Alert_Srm3ReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm3ReleaseFinish; this.lbl_Alert_Srm4ReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm4ReleaseFinish; - this.lbl_Alert_RgvRelease.Text = showNowTime + SystemWarningMsg._lbl_Alert_RgvRelease; - this.lbl_Alert_RgvReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange; - this.lbl_Alert_RgvReleaseFinish_BuChang.Text = showNowTime + SystemWarningMsg._lbl_Alert_RgvReleaseFinish_BuChang; + + this.lbl_Alert_PushPaperCutToMes.Text = showNowTime + SystemWarningMsg._lbl_Alert_PushPaperCutToMes; + this.lbl_Alert_PushPackageCodeToMes.Text = showNowTime + SystemWarningMsg._lbl_Alert_PushPackageCodeToMes; - this.lbl_Alert_HandlerIssuingTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_HandlerIssuingTask; + this.lbl_Alert_DataProcess_BZ12_IssueTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_BZ12_IssueTask; this.lbl_Alert_DataProcess_RobotBuffer_FinishTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask; - this.lbl_MainTaskDecompose.Text = showNowTime + SystemWarningMsg._lbl_Alert_MainTaskDecompose; + this.lbl_DataProcess_BZ21_IssueTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask; - this.lbl_DataProcess_RobotBuffer_ModeChange.Text = showNowTime + SystemWarningMsg._lbl_Alert_MainTaskDecompose_ZPRK; + this.lbl_DataProcess_RobotBuffer_ModeChange.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange; this.lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound; @@ -379,19 +384,19 @@ this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask; - this.lbl_Alter_OutTaskRetryToMes.Text = showNowTime + SystemWarningMsg._lbl_Alert_OutTaskRetryToMes; - - //this.lblSrmPosX1.Text="111"; } catch (Exception ex) { - Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.SrmTheadService, "鏂规硶SrmRead_Label鍑虹幇寮傚父锛�" + ex.Message, ex); continue; } } } + + #region 鍫嗗灈鏈虹嚎绋嬪拰UI澶勭悊 + + /// <summary> /// 鑾峰彇鍫嗗灈鏈虹殑瀹炴椂淇℃伅 @@ -416,18 +421,18 @@ { for (int i = 0; i < waringList.Count; i++) { - DeviceWarningHandler.SaveWarning(device, iWareCommon.Utils.LogType.SrmTheadService, + DeviceWarningHandler.SaveWarning(device, iWareCommon.Utils.LogType.DataProcess_BZ39_IssueInboundTask, waringList[i].Code, waringList[i].Address, waringList[i].Context);//鏂板鎶ヨ warningAddressList.Add(waringList[i].Address); } } } - DeviceWarningHandler.AutoCloseWarning(device, iWareCommon.Utils.LogType.SrmTheadService, warningAddressList);//鑷姩鍏抽棴鎶ヨ + DeviceWarningHandler.AutoCloseWarning(device, iWareCommon.Utils.LogType.DataProcess_BZ39_IssueInboundTask, warningAddressList);//鑷姩鍏抽棴鎶ヨ } } catch (Exception ex) { - Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.SrmTheadService, "鑾峰彇" + device.ToString() + "鐨勫疄鏃朵俊鎭紓甯�:" + ex.Message, ex); + Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.DataProcess_BZ39_IssueInboundTask, "鑾峰彇" + device.ToString() + "鐨勫疄鏃朵俊鎭紓甯�:" + ex.Message, ex); continue; } }; @@ -468,7 +473,7 @@ }; realTimeList.Add(obj); - DeviceSrmRealTimeHandler.Update(realTimeList, iWareCommon.Utils.LogType.SrmTheadService); + DeviceSrmRealTimeHandler.Update(realTimeList, iWareCommon.Utils.LogType.DataProcess_BZ39_IssueInboundTask); } @@ -1180,7 +1185,7 @@ using (var opcClinet = new SrmService.SrmServiceClient()) { var result = opcClinet.SendEStop((int)_EDevice); - Log4NetHelper.WriteInfoLog(iWareCommon.Utils.LogType.SrmTheadService, "瀛楃涓诧細" + JsonConvert.SerializeObject(result)); + Log4NetHelper.WriteInfoLog(iWareCommon.Utils.LogType.DataProcess_BZ39_IssueInboundTask, "瀛楃涓诧細" + JsonConvert.SerializeObject(result)); if (result.result) { WZ.Useful.Commons.MessageUtil.ShowTips("鍙戦��" + _EDevice.ToString() + "鎬ュ仠鎸囦护鎴愬姛"); @@ -1483,8 +1488,8 @@ this.lbl_ModelText.Text = title + currentCheckModelText; SetAllCheckBoxChecked(true); //灏嗙壒娈婄殑鍙栨秷 - this.ckHandlerIssuingTask.Checked = false; - this.ckMainTaskDecompose.Checked = false; + this.ck_DataProcess_BZ12_IssueTask.Checked = false; + this.ck_DataProcess_BZ21_IssueTask.Checked = false; this.gBoxThread.Enabled = true; } @@ -1520,7 +1525,7 @@ private void CommonCheckedChanged(object sender, EventArgs e) { //鍫嗗灈鏈�1浠诲姟涓嬪彂 - DoCommonCheckedChanged(ref SystemValue.isAllowRuning_SrmTaskThreadService_1, ckBSrm1Release); + DoCommonCheckedChanged(ref SystemValue.isAllowRuning_SrmTaskThreadService_1, ckB_DataProcess_BZ39_IssueInboundTask); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_SrmTaskThreadService_1_Finish, ckBSrm1FinishedHandle); //鍫嗗灈鏈�2浠诲姟涓嬪彂 @@ -1538,14 +1543,14 @@ //RGV浠诲姟涓嬪彂 DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService, ckBRgvRelease); - DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish, ckBRgvFinishedHandle); - DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish_BuChang, ckBRgvFinishedHandle_BuChang); + DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish, ckB_PushPaperCutToMes); + DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish_BuChang, ck_PushPackageCodeToMes); - DoCommonCheckedChanged(ref SystemValue.isAllowRuning_HandlerIssuingTask, ckHandlerIssuingTask); + DoCommonCheckedChanged(ref SystemValue.isAllowRuning_HandlerIssuingTask, ck_DataProcess_BZ12_IssueTask); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_FinishTask, ck_DataProcess_RobotBuffer_FinishTask); - DoCommonCheckedChanged(ref SystemValue.isAllowRuning_MainTaskDecompose, ckMainTaskDecompose); + DoCommonCheckedChanged(ref SystemValue.isAllowRuning_MainTaskDecompose, ck_DataProcess_BZ21_IssueTask); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange, ck_DataProcess_RobotBuffer_ModeChange); -- Gitblit v1.9.3