Переглянути джерело

返工栈板拆解,修改栈板内存在多工单序列号情况下,序列号对应箱号未能更新的的BUG

Hcsy 7 роки тому
батько
коміт
5fc21cee39

+ 3 - 1
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.Designer.cs

@@ -270,7 +270,7 @@
             // 
             this.StepCount.LineCode = null;
             this.StepCount.Location = new System.Drawing.Point(290, 45);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(88, 22);
             this.StepCount.Source = null;
@@ -474,6 +474,8 @@
             // CollectRemark
             // 
             this.CollectRemark.AutoSize = true;
+            this.CollectRemark.Checked = true;
+            this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectRemark.Location = new System.Drawing.Point(565, 426);
             this.CollectRemark.Name = "CollectRemark";

+ 3 - 1
UAS-MES/FunctionCode/Make/Make_SeqTransform.Designer.cs

@@ -298,6 +298,8 @@
             // CollectRemark
             // 
             this.CollectRemark.AutoSize = true;
+            this.CollectRemark.Checked = true;
+            this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectRemark.Location = new System.Drawing.Point(563, 439);
             this.CollectRemark.Name = "CollectRemark";
@@ -347,7 +349,7 @@
             // 
             this.StepCount.LineCode = null;
             this.StepCount.Location = new System.Drawing.Point(687, 115);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(88, 22);
             this.StepCount.Source = null;

+ 4 - 3
UAS-MES/FunctionCode/Special/Special_BoxSplit.cs

@@ -32,11 +32,13 @@ namespace UAS_MES.Special
         {
             if (dh.CheckExist("package", "pa_outboxcode='" + Pallate.Text + "' and pa_type=3"))
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select v_barcode from mes_package_view where v_outboxcode='" + Pallate.Text + "'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select v_makecode,v_barcode from mes_package_view where v_outboxcode='" + Pallate.Text + "'", "select");
                 List<string> ms_sncode = new List<string>();
+                List<string> v_makecode = new List<string>();
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
                     ms_sncode.Add(dt.Rows[i]["v_barcode"].ToString());
+                    v_makecode.Add(dt.Rows[i]["v_makecode"].ToString());
                 }
                 sql.Clear();
                 sql.Append("select distinct ms_outboxcode,ms_makecode from makeserial left join mes_package_view on v_makecode=ms_makecode and  ");
@@ -45,7 +47,6 @@ namespace UAS_MES.Special
                 DataTable dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt1.Rows.Count > 0)
                 {
-                    string ms_makecode = dt1.Rows[0]["ms_makecode"].ToString();
                     //获取卡通箱的外层箱号
                     sql.Clear();
                     sql.Append("select distinct pa_mothercode from package where pa_outboxcode in(select distinct ms_outboxcode ");
@@ -95,7 +96,7 @@ namespace UAS_MES.Special
                     dh.BatchInsert("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode=:outboxcode", new string[] { "outboxcode" }, outboxcode.ToArray());
                     dh.BatchInsert("delete from packagedetail where pd_outboxcode=:outboxcode", new string[] { "outboxcode" }, outboxcode.ToArray());
                     dh.BatchInsert("delete from package where pa_outboxcode=:outboxcode", new string[] { "outboxcode" }, outboxcode.ToArray());
-                    dh.BatchInsert("update makeserial set ms_outboxcode='' where ms_sncode=:ms_sncode and ms_makecode='" + ms_makecode + "' ", new string[] { "ms_sncode" }, ms_sncode.ToArray());
+                    dh.BatchInsert("update makeserial set ms_outboxcode='' where ms_sncode=:ms_sncode and ms_makecode=:ms_makecode", new string[] { "ms_sncode","ms_makecode" }, ms_sncode.ToArray(),v_makecode.ToArray());
                 }
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "返工栈板解除", "解除成功", Pallate.Text, "");
                 OperatResult.AppendText(">>栈板" + Pallate.Text + "拆解成功\n", Color.Green, Pallate);