Ver Fonte

优化界面值输入

callm há 17 horas atrás
pai
commit
8efb39533c

+ 50 - 0
UAS_MES_YDCY/.workbuddy/memory/2026-09-23.md

@@ -0,0 +1,50 @@
+# 2026-09-23
+
+## 三个 Special 界面新增备注文本域(参考 Special_Reset)
+
+需求:`Special_CancelCollection`、`Special_ResetKeyFreeze`、`Special_ResetKeyRelease` 三个界面各加一个备注文本域,值拼接到 commandlog 记录里。
+
+### 参考实现真相(修正此前笔记的错误)
+`Special_Reset` 的备注控件**不是** `EnterTextBox`,而是:
+- `Remark_label`:`System.Windows.Forms.Label`,微软雅黑 12F,`AutoSize=true`,`Size(82,41)`
+- `Remark`:`CustomControl.RichText.RichTextAutoBottom`(**多行富文本**),微软雅黑 12F,`Size(448,241)`
+- 坐标 `Remark_label (947,290)` / `Remark (1038,290)`,`TabIndex` 249 / 251
+- `Controls.Add` 顺序:`Remark` → `pallet` → `Remark_label` → `ImportExcel` …
+
+`Special_Reset.cs` 拼接口径:
+```csharp
+/// <summary>备注框有值时拼接到 commandlog 的结果字段</summary>
+private string ResultWithRemark(string result)
+{
+    string remark = Remark.Text.Trim();
+    return remark == "" ? result : result + "," + remark;
+}
+```
+3 处 `DoCommandLog` 的 result 参数包成 `ResultWithRemark("站点重置至" + stname)`。
+
+### 本次改动
+
+**Special_ResetKeyFreeze**(与 Reset 同构,坐标可直接复用)
+- Designer:字段声明 `Remark_label` + `Remark`(RichTextAutoBottom),控件块放 `label1` 之后、窗体声明之前,`Controls.Add` 放最前,TabIndex 251/252
+- .cs:加 `ResultWithRemark`(放在 `Cd_stepcode_DbChange` 之后、`ReSN` 之前),包裹 3 处 `DoCommandLog`(现位于 125/173/203 行):
+  - `ResultWithRemark("Key" + mil_netcode + "解冻,站点重置至" + stname)`
+  - 两处 `ResultWithRemark("站点重置至" + stname)`
+
+**Special_ResetKeyRelease**(同上,与 Freeze 几乎完全一致)
+- 3 处 `DoCommandLog`(现 125/173/203 行):
+  - `ResultWithRemark("KEY" + mil_netcode + "释放,站点重置至" + stname)`
+  - 两处 `ResultWithRemark("站点重置至" + stname)`
+
+**Special_CancelCollection**(布局完全不同,需另择坐标)
+- 原布局:`ms_makecode(226,185)` / `sn_code(226,262)` 左列,`Confirm(660,258) 120×50`,`OperateResult(832,26) 460×614` 右侧日志,`Clean(1002,659)`,`ClientSize 1566×802`
+- 备注放 SN 输入框下方空白区:`Remark_label (68,362)` + `Remark (226,358) 554×280`,正文用微软雅黑 10.5F(与 `OperateResult` 一致)
+- 只有 1 处 `DoCommandLog`(现 131 行):`ResultWithRemark("取消采集成功")`
+
+> 注意:选 10.5F 是因为该界面其余控件的字号基准比 Reset 系列小一档;`Remark_label` 仍用 12F 保持标签风格统一。
+
+### 教训
+- **删除空行时要把相邻行一起纳入 old_string**。给 `Special_CancelCollection.cs` 插入方法时,old_string 结尾带了换行 → 结果 `{            //获取序列号的途程` 注释被挤到花括号同一行。已修正。
+- 六个文件改完用 Python(剥字符串字面量后)校验 `{}`/`()` 平衡,全部 OK。仍需 VS 手动编译。
+
+### 待办
+- 用户尚未要求在 VS 编译验证后 push。

+ 15 - 0
UAS_MES_YDCY/.workbuddy/memory/MEMORY.md

@@ -49,6 +49,21 @@
 - `TextBox` 单行高度锁死,`Dock` 会覆盖 `Top`。
 - 大日志面板 `RichTextAutoBottom` 字体设为 12F 后,`AutoSizeFormClass` 放大窗体时它会跟着长高 → 需留够余量,否则会压住右下角控件。
 
+## 备注输入域范式(commandlog 附加备注)
+特殊界面(Special_*)加备注的固定写法,参考 `Special_Reset`:
+- Designer:`Remark_label`(`Label`,微软雅黑 12F,`AutoSize=true`,Size(82,41))+ `Remark`(**`CustomControl.RichText.RichTextAutoBottom`,多行,不是 EnterTextBox**)。Reset 系列坐标 `(947,290)` / `(1038,290)` Size(448,241),位于按钮行(y216~260)正下方。
+- `Controls.Add` 要放最前面;字段声明放最后。
+- .cs 内加:
+  ```csharp
+  private string ResultWithRemark(string result)
+  {
+      string remark = Remark.Text.Trim();
+      return remark == "" ? result : result + "," + remark;
+  }
+  ```
+  再把每个 `DoCommandLog` 的 result 参数包成 `ResultWithRemark(...)`。注意原有 result 里已含逗号时(如 `"Key"+xx+"解冻,站点重置至"+stname`)拼接后会出现两个逗号,属预期。
+- 已套用:`Special_Reset`、`Special_ResetKeyFreeze`、`Special_ResetKeyRelease`、`Special_CancelCollection`(后者布局不同,备注放 `(68,362)`/`(226,358)` 554×280,正文 10.5F)。
+
 ## 数据访问
 - `dh.ExecuteSql(sql, "select")` 返回 `DataTable`;`dh.getFieldDataByCondition(表, 字段, 条件)` 返回单值。
 - 表命名:工序表 `step`(`st_code`/`st_name`),工序类型表 `steptype`(`STP_CODE`/`STP_NAME`,注意是 STP_ 前缀)。

+ 27 - 0
UAS_MES_YDCY/FunctionCode/Special/Special_CancelCollection.Designer.cs

@@ -36,6 +36,8 @@
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ms_makecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.label1 = new System.Windows.Forms.Label();
+            this.Remark_label = new System.Windows.Forms.Label();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.SuspendLayout();
             // 
             // sn_code_label
@@ -138,11 +140,34 @@
             this.label1.TabIndex = 144;
             this.label1.Text = "工单号";
             // 
+            // Remark_label
+            // 
+            this.Remark_label.AutoSize = true;
+            this.Remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark_label.Location = new System.Drawing.Point(68, 362);
+            this.Remark_label.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
+            this.Remark_label.Name = "Remark_label";
+            this.Remark_label.Size = new System.Drawing.Size(82, 41);
+            this.Remark_label.TabIndex = 146;
+            this.Remark_label.Text = "备注";
+            // 
+            // Remark
+            // 
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark.Location = new System.Drawing.Point(226, 358);
+            this.Remark.Margin = new System.Windows.Forms.Padding(8);
+            this.Remark.Name = "Remark";
+            this.Remark.Size = new System.Drawing.Size(554, 280);
+            this.Remark.TabIndex = 147;
+            this.Remark.Text = "";
+            // 
             // Special_CancelCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1566, 802);
+            this.Controls.Add(this.Remark);
+            this.Controls.Add(this.Remark_label);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.Clean);
@@ -169,5 +194,7 @@
         private CustomControl.ButtonUtil.NormalButton Clean;
         private CustomControl.TextBoxWithIcon.EnterTextBox ms_makecode;
         private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label Remark_label;
+        private CustomControl.RichText.RichTextAutoBottom Remark;
     }
 }

+ 10 - 1
UAS_MES_YDCY/FunctionCode/Special/Special_CancelCollection.cs

@@ -21,6 +21,15 @@ namespace UAS_MES_NEW.Special
             InitializeComponent();
         }
 
+        /// <summary>
+        /// 备注框有值时拼接到 commandlog 的结果字段
+        /// </summary>
+        private string ResultWithRemark(string result)
+        {
+            string remark = Remark.Text.Trim();
+            return remark == "" ? result : result + "," + remark;
+        }
+
         private void Confirm_Click(object sender, EventArgs e)
         {
             //获取序列号的途程
@@ -119,7 +128,7 @@ namespace UAS_MES_NEW.Special
                 sqls.Add("delete from makeserial where ms_id='" + ms_id + "'");
                 dh.ExecuteSQLTran(sqls.ToArray());
                 dh.ExecuteSql("update make set ma_inqty=(select count(1) from makeserial where ms_makecode='"+ms_makecode+"') where ma_code='" + ms_makecode + "'", "update");
-                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "取消采集", "取消采集成功", sn_code.Text, "");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "取消采集", ResultWithRemark("取消采集成功"), sn_code.Text, "");
                 OperateResult.AppendText(">>序列号" + sn_code.Text + "成功解除绑定\n", Color.Green, sn_code);
                 //}
                 //else OperateResult.AppendText(">>序列号" + sn_code.Text + "不处于第一道工序,不允许取消采集\n", Color.Red, sn_code);

+ 14 - 20
UAS_MES_YDCY/FunctionCode/Special/Special_Reset.Designer.cs

@@ -53,7 +53,7 @@
             this.ImportExcel1 = new System.Windows.Forms.OpenFileDialog();
             this.pallet = new System.Windows.Forms.RadioButton();
             this.Remark_label = new System.Windows.Forms.Label();
-            this.Remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.SuspendLayout();
             // 
             // Pallet_label
@@ -361,9 +361,9 @@
             this.pallet.Text = "栈板";
             this.pallet.UseVisualStyleBackColor = true;
             this.pallet.Click += new System.EventHandler(this.bigboxBtn_Click);
-            //
+            // 
             // Remark_label
-            //
+            // 
             this.Remark_label.AutoSize = true;
             this.Remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Remark_label.Location = new System.Drawing.Point(947, 290);
@@ -372,31 +372,25 @@
             this.Remark_label.Size = new System.Drawing.Size(82, 41);
             this.Remark_label.TabIndex = 249;
             this.Remark_label.Text = "备注";
-            //
+            // 
             // Remark
-            //
-            this.Remark.AllPower = null;
-            this.Remark.BackColor = System.Drawing.Color.White;
-            this.Remark.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.Remark.ID = null;
-            this.Remark.Location = new System.Drawing.Point(1049, 290);
-            this.Remark.Margin = new System.Windows.Forms.Padding(5);
+            // 
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark.Location = new System.Drawing.Point(1038, 290);
+            this.Remark.Margin = new System.Windows.Forms.Padding(4);
             this.Remark.Name = "Remark";
-            this.Remark.Power = null;
-            this.Remark.Size = new System.Drawing.Size(460, 44);
-            this.Remark.Str = null;
-            this.Remark.Str1 = null;
-            this.Remark.Str2 = null;
-            this.Remark.TabIndex = 250;
+            this.Remark.Size = new System.Drawing.Size(448, 241);
+            this.Remark.TabIndex = 251;
+            this.Remark.Text = "";
             // 
             // Special_Reset
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1611, 1131);
+            this.Controls.Add(this.Remark);
             this.Controls.Add(this.pallet);
             this.Controls.Add(this.Remark_label);
-            this.Controls.Add(this.Remark);
             this.Controls.Add(this.ImportExcel);
             this.Controls.Add(this.Export);
             this.Controls.Add(this.数据清空);
@@ -423,7 +417,7 @@
             this.Text = "重置站点";
             this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
             this.SizeChanged += new System.EventHandler(this.Special_Reset_SizeChanged);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -454,6 +448,6 @@
         private System.Windows.Forms.OpenFileDialog ImportExcel1;
         private System.Windows.Forms.RadioButton pallet;
         private System.Windows.Forms.Label Remark_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox Remark;
+        private CustomControl.RichText.RichTextAutoBottom Remark;
     }
 }

+ 27 - 0
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyFreeze.Designer.cs

@@ -54,6 +54,8 @@
             this.bigboxBtn = new System.Windows.Forms.RadioButton();
             this.cu_code = new System.Windows.Forms.ComboBox();
             this.label1 = new System.Windows.Forms.Label();
+            this.Remark_label = new System.Windows.Forms.Label();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.SuspendLayout();
             // 
             // Pallet_label
@@ -385,11 +387,34 @@
             this.label1.TabIndex = 250;
             this.label1.Text = "客户";
             // 
+            // Remark_label
+            // 
+            this.Remark_label.AutoSize = true;
+            this.Remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark_label.Location = new System.Drawing.Point(947, 290);
+            this.Remark_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.Remark_label.Name = "Remark_label";
+            this.Remark_label.Size = new System.Drawing.Size(82, 41);
+            this.Remark_label.TabIndex = 251;
+            this.Remark_label.Text = "备注";
+            // 
+            // Remark
+            // 
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark.Location = new System.Drawing.Point(1038, 290);
+            this.Remark.Margin = new System.Windows.Forms.Padding(4);
+            this.Remark.Name = "Remark";
+            this.Remark.Size = new System.Drawing.Size(448, 241);
+            this.Remark.TabIndex = 252;
+            this.Remark.Text = "";
+            // 
             // Special_ResetKeyRelease
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1611, 1131);
+            this.Controls.Add(this.Remark);
+            this.Controls.Add(this.Remark_label);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.cu_code);
             this.Controls.Add(this.pallet);
@@ -451,5 +476,7 @@
         private System.Windows.Forms.RadioButton bigboxBtn;
         private System.Windows.Forms.ComboBox cu_code;
         private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label Remark_label;
+        private CustomControl.RichText.RichTextAutoBottom Remark;
     }
 }

+ 12 - 3
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyFreeze.cs

@@ -56,6 +56,15 @@ namespace UAS_MES_NEW.Special
             BaseUtil.SetFormValue(this.Controls, Dbfind);
         }
 
+        /// <summary>
+        /// 备注框有值时拼接到 commandlog 的结果字段
+        /// </summary>
+        private string ResultWithRemark(string result)
+        {
+            string remark = Remark.Text.Trim();
+            return remark == "" ? result : result + "," + remark;
+        }
+
         private bool ReSN(string sncode, string stepcode)
         {
             DataTable dt = (DataTable)dh.ExecuteSql("select ms_id,nvl(MS_ISACTIVE,0)MS_ISACTIVE,ms_paststep,nvl(ms_qccheck,0)ms_qccheck,nvl(ms_ifqccheck,0)ms_ifqccheck,ms_makecode,nvl(ms_outstatus,0)ms_outstatus,nvl(pr_ifrepaircheck,0)pr_ifrepaircheck from makeserial left join product on pr_code=ms_prodcode where ms_sncode ='" + sncode + "' order by ms_id desc", "select");
@@ -113,7 +122,7 @@ namespace UAS_MES_NEW.Special
             sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
             sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_makecode='" + makecode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
             dh.ExecuteSql(sql.GetString(), "update");
-            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "Key" + mil_netcode + "解冻,站点重置至" + stname, sncode, "");
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", ResultWithRemark("Key" + mil_netcode + "解冻,站点重置至" + stname), sncode, "");
             return true;
         }
 
@@ -161,7 +170,7 @@ namespace UAS_MES_NEW.Special
                             dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
                             //删除箱的明细
                             dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", ResultWithRemark("站点重置至" + stname), sb[i].ToString(), "");
                             OperatResult.AppendText("卡通箱:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
                         }
                         else
@@ -191,7 +200,7 @@ namespace UAS_MES_NEW.Special
                             dh.ExecuteSql("delete from package where pa_mothercode = '" + sb[i].ToString() + "'", "delete");
                             //删除箱的明细
                             dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", ResultWithRemark("站点重置至" + stname), sb[i].ToString(), "");
                             OperatResult.AppendText("栈板:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
                         }
                         else

+ 27 - 0
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyRelease.Designer.cs

@@ -54,6 +54,8 @@
             this.bigboxBtn = new System.Windows.Forms.RadioButton();
             this.cu_code = new System.Windows.Forms.ComboBox();
             this.label1 = new System.Windows.Forms.Label();
+            this.Remark_label = new System.Windows.Forms.Label();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.SuspendLayout();
             // 
             // Pallet_label
@@ -385,11 +387,34 @@
             this.label1.TabIndex = 250;
             this.label1.Text = "客户";
             // 
+            // Remark_label
+            // 
+            this.Remark_label.AutoSize = true;
+            this.Remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark_label.Location = new System.Drawing.Point(947, 290);
+            this.Remark_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.Remark_label.Name = "Remark_label";
+            this.Remark_label.Size = new System.Drawing.Size(82, 41);
+            this.Remark_label.TabIndex = 251;
+            this.Remark_label.Text = "备注";
+            // 
+            // Remark
+            // 
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark.Location = new System.Drawing.Point(1038, 290);
+            this.Remark.Margin = new System.Windows.Forms.Padding(4);
+            this.Remark.Name = "Remark";
+            this.Remark.Size = new System.Drawing.Size(448, 241);
+            this.Remark.TabIndex = 252;
+            this.Remark.Text = "";
+            // 
             // Special_ResetKeyRelease
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1611, 1131);
+            this.Controls.Add(this.Remark);
+            this.Controls.Add(this.Remark_label);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.cu_code);
             this.Controls.Add(this.pallet);
@@ -451,5 +476,7 @@
         private System.Windows.Forms.RadioButton bigboxBtn;
         private System.Windows.Forms.ComboBox cu_code;
         private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label Remark_label;
+        private CustomControl.RichText.RichTextAutoBottom Remark;
     }
 }

+ 12 - 3
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyRelease.cs

@@ -56,6 +56,15 @@ namespace UAS_MES_NEW.Special
             BaseUtil.SetFormValue(this.Controls, Dbfind);
         }
 
+        /// <summary>
+        /// 备注框有值时拼接到 commandlog 的结果字段
+        /// </summary>
+        private string ResultWithRemark(string result)
+        {
+            string remark = Remark.Text.Trim();
+            return remark == "" ? result : result + "," + remark;
+        }
+
         private bool ReSN(string sncode, string stepcode)
         {
             DataTable dt = (DataTable)dh.ExecuteSql("select ms_id,nvl(MS_ISACTIVE,0)MS_ISACTIVE,ms_paststep,nvl(ms_qccheck,0)ms_qccheck,nvl(ms_ifqccheck,0)ms_ifqccheck,ms_makecode,nvl(ms_outstatus,0)ms_outstatus,nvl(pr_ifrepaircheck,0)pr_ifrepaircheck from makeserial left join product on pr_code=ms_prodcode where ms_sncode ='" + sncode + "' order by ms_id desc", "select");
@@ -113,7 +122,7 @@ namespace UAS_MES_NEW.Special
             sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
             sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_makecode='" + makecode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
             dh.ExecuteSql(sql.GetString(), "update");
-            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "KEY"+ mil_netcode + "释放,站点重置至" + stname, sncode, "");
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", ResultWithRemark("KEY" + mil_netcode + "释放,站点重置至" + stname), sncode, "");
             return true;
         }
 
@@ -161,7 +170,7 @@ namespace UAS_MES_NEW.Special
                             dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
                             //删除箱的明细
                             dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", ResultWithRemark("站点重置至" + stname), sb[i].ToString(), "");
                             OperatResult.AppendText("卡通箱:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
                         }
                         else
@@ -191,7 +200,7 @@ namespace UAS_MES_NEW.Special
                             dh.ExecuteSql("delete from package where pa_mothercode = '" + sb[i].ToString() + "'", "delete");
                             //删除箱的明细
                             dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", ResultWithRemark("站点重置至" + stname), sb[i].ToString(), "");
                             OperatResult.AppendText("栈板:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
                         }
                         else