From ce701f953bd952bf8303ccb93520a8a3af33860e Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期四, 21 八月 2025 13:45:42 +0800
Subject: [PATCH] iqc称重

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs |   41 +++++++++++++++++++++++++++--------------
 1 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index 6917f0c..a28607c 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -26,10 +26,20 @@
         /// <summary>
         /// 瀹氭椂鍒锋柊
         /// </summary>
-        System.Timers.Timer timer = new System.Timers.Timer(1000);
+        System.Timers.Timer timer;
+
         public Frm_MesQaItemsDetect01()
         {
             InitializeComponent();
+
+            #region 璁剧疆鏃堕棿
+            int int32 = 3000;
+            string _vanishingSeconds = ConfigurationManager.AppSettings["IqcGetWeight"];
+            if (!string.IsNullOrEmpty(_vanishingSeconds))
+                int32 = int.Parse(_vanishingSeconds);
+            timer = new System.Timers.Timer(int32);
+            #endregion
+
             this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
             this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
             this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
@@ -62,6 +72,7 @@
             gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
             btnIpt.Click += BtnIpt_Click;
             btnYcReport.Click += BtnYcReport_Click;
+            #region 浜旀閲嶉噺
             //鍏抽棴鏃堕噴鏀総imer
             this.Disposed += (s, e) =>
             {
@@ -92,7 +103,7 @@
                 }
                 catch (Exception ex)
                 {
-
+                    LoggerHelper.WriteInfoLog("WorkWeight/GetIqcWeight:" + ex.Message);
                 }
             };
             timer.AutoReset = true; // 璁剧疆涓簍rue琛ㄧず閲嶅鎵ц锛宖alse琛ㄧず鎵ц涓�娆″悗鍋滄
@@ -149,6 +160,8 @@
                 _setWeigth(99, "");
 
             };
+            #endregion
+
         }
         /// <summary>
         /// 鎻愪氦绉伴噸
@@ -165,7 +178,7 @@
             };
             try
             {
-                var strReturn = UtilityHelper.HttpPost("", "WorkWeight/EditIqc", JsonConvert.SerializeObject(_obj), false);
+                var strReturn = UtilityHelper.HttpPost("", "WorkWeight/EditIqcWeight", JsonConvert.SerializeObject(_obj), false);
                 var dd = UtilityHelper.ReturnToDynamic(strReturn);
                 if (dd.rtnCode <= 0)
                 {
@@ -258,7 +271,7 @@
             string strGuid = lbGuid.Text.Trim();
             if (string.IsNullOrEmpty(strGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             var _obj = new
@@ -280,7 +293,7 @@
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
         /// <summary>
@@ -293,7 +306,7 @@
             int intHandle = this.gvMx1.FocusedRowHandle;
             if (intHandle < 0)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒");
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒");
                 return;
             }
             if (e.KeyCode == Keys.Enter)
@@ -342,7 +355,7 @@
                 }
                 catch (Exception ex)
                 {
-                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                    MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
                 }
             }
         }
@@ -505,7 +518,7 @@
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
             if (string.IsNullOrEmpty(rowGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -533,7 +546,7 @@
             toolBarMenu1.isSetBtn = false;
             if (txt_fcheckResu.Text.Trim() == _strTag && string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim()))
             {
-                Gs.DevApp.ToolBox.MsgHelper.Warning("褰撴楠岀粨鏋滀笉鍚堟牸鏃讹紝璇峰~鍐欏娉ㄨ鏄庯紒");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撴楠岀粨鏋滀笉鍚堟牸鏃讹紝璇峰~鍐欏娉ㄨ鏄庯紒");
                 txt_fngDesc.Focus();
                 return;
             }
@@ -605,7 +618,7 @@
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
 
         }
@@ -621,7 +634,7 @@
             if (toolBarMenu1.currentAction == "edit") isEdit = true;
             if (string.IsNullOrEmpty(strGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             var _obj = new
@@ -673,11 +686,11 @@
                     }
                 }
                 else
-                    ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
 
         }
@@ -733,7 +746,7 @@
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
         /// <summary>

--
Gitblit v1.9.3