Browse Source

抽检批次拆解更新箱号

章政 8 years ago
parent
commit
58721fe454

+ 30 - 30
UAS-MES/FunctionCode/OQC/OQC_CheckNoSplit.Designer.cs

@@ -55,11 +55,11 @@
             this.new_checkno = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.new_checkno_lable = new System.Windows.Forms.Label();
             this.groupBoxWithBorder2 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.ob_makecode = new System.Windows.Forms.Label();
+            this.ob_makecode_label = new System.Windows.Forms.Label();
             this.pr_detail = new System.Windows.Forms.Label();
             this.SplitCheckNo = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ChooseAll = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.ob_makecode = new System.Windows.Forms.Label();
-            this.ob_makecode_label = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.OutBoxDGV)).BeginInit();
             this.groupBoxWithBorder2.SuspendLayout();
             this.SuspendLayout();
@@ -86,7 +86,7 @@
             // 
             this.ob_checkno_label.AutoSize = true;
             this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno_label.Location = new System.Drawing.Point(45, 28);
+            this.ob_checkno_label.Location = new System.Drawing.Point(45, 38);
             this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno_label.Name = "ob_checkno_label";
             this.ob_checkno_label.Size = new System.Drawing.Size(72, 27);
@@ -115,7 +115,7 @@
             // 
             this.obd_outboxcode_label.AutoSize = true;
             this.obd_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_outboxcode_label.Location = new System.Drawing.Point(45, 76);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(45, 86);
             this.obd_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_outboxcode_label.Name = "obd_outboxcode_label";
             this.obd_outboxcode_label.Size = new System.Drawing.Size(52, 27);
@@ -144,7 +144,7 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(45, 120);
+            this.ms_sncode_label.Location = new System.Drawing.Point(45, 130);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
@@ -155,7 +155,7 @@
             // 
             this.ob_prodcode_label.AutoSize = true;
             this.ob_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_prodcode_label.Location = new System.Drawing.Point(383, 171);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(383, 170);
             this.ob_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_prodcode_label.Name = "ob_prodcode_label";
             this.ob_prodcode_label.Size = new System.Drawing.Size(92, 27);
@@ -166,7 +166,7 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(708, 171);
+            this.pr_detail_label.Location = new System.Drawing.Point(708, 170);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
@@ -177,7 +177,7 @@
             // 
             this.ob_prodcode.AutoSize = true;
             this.ob_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_prodcode.Location = new System.Drawing.Point(491, 171);
+            this.ob_prodcode.Location = new System.Drawing.Point(491, 170);
             this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Size = new System.Drawing.Size(0, 27);
@@ -395,11 +395,32 @@
             this.groupBoxWithBorder2.Text = "抽检信息";
             this.groupBoxWithBorder2.TextColor = System.Drawing.Color.Black;
             // 
+            // ob_makecode
+            // 
+            this.ob_makecode.AutoSize = true;
+            this.ob_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_makecode.Location = new System.Drawing.Point(148, 170);
+            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_makecode.Name = "ob_makecode";
+            this.ob_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ob_makecode.TabIndex = 230;
+            // 
+            // ob_makecode_label
+            // 
+            this.ob_makecode_label.AutoSize = true;
+            this.ob_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_makecode_label.Location = new System.Drawing.Point(45, 170);
+            this.ob_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_makecode_label.Name = "ob_makecode_label";
+            this.ob_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.ob_makecode_label.TabIndex = 229;
+            this.ob_makecode_label.Text = "工单号";
+            // 
             // pr_detail
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(818, 171);
+            this.pr_detail.Location = new System.Drawing.Point(818, 170);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 27);
@@ -445,27 +466,6 @@
             this.ChooseAll.UseVisualStyleBackColor = true;
             this.ChooseAll.Click += new System.EventHandler(this.ChooseAll_Click);
             // 
-            // ob_makecode
-            // 
-            this.ob_makecode.AutoSize = true;
-            this.ob_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_makecode.Location = new System.Drawing.Point(148, 171);
-            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_makecode.Name = "ob_makecode";
-            this.ob_makecode.Size = new System.Drawing.Size(0, 27);
-            this.ob_makecode.TabIndex = 230;
-            // 
-            // ob_makecode_label
-            // 
-            this.ob_makecode_label.AutoSize = true;
-            this.ob_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_makecode_label.Location = new System.Drawing.Point(45, 171);
-            this.ob_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_makecode_label.Name = "ob_makecode_label";
-            this.ob_makecode_label.Size = new System.Drawing.Size(72, 27);
-            this.ob_makecode_label.TabIndex = 229;
-            this.ob_makecode_label.Text = "工单号";
-            // 
             // OQC_CheckNoSplit
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);

+ 2 - 0
UAS-MES/FunctionCode/OQC/OQC_CheckNoSplit.cs

@@ -109,6 +109,8 @@ namespace UAS_MES.OQC
                         sql.Append(",OBD_BUILDDATE,obd_prodcode) SELECT oqcbatchdetail_seq.nextval,'" + ob_id + "','" + new_checkno.Text + "',OBD_SNCODE,obd_outboxcode");
                         sql.Append(",OBD_MAKECODE,sysdate,obd_prodcode from oqcbatchdetail where obd_checkno='" + ob_checkno.Text + "' and obd_sncode=:obd_sncode ");
                         dh.BatchInsert(sql.GetString(), new string[] { "obd_sncode" }, DeleteSn.ToArray());
+                        dh.BatchInsert("delete from oqcbatchdetail where obd_checkno='" + ob_checkno.Text + "' and obd_sncode =:obd_sncode ", new string[] { "obd_sncode" }, DeleteSn.ToArray());
+                        dh.BatchInsert("update package set pa_checkno='" + new_checkno.Text + "' where pa_outboxcode in (select distinct obd_outboxcode from oqcbatchdetail where obd_sncode=:obd_sncode)", new string[] { "obd_sncode" }, DeleteSn.ToArray());
                         //删除之前的明细
                         dh.BatchInsert("delete from oqcbatchdetail where obd_checkno='" + ob_checkno.Text + "' and obd_sncode =:obd_sncode ", new string[] { "obd_sncode" }, DeleteSn.ToArray());
                         //插入新批次的从表,更新两个批次