Browse Source

OQC抽样数据采集BUG修改,产品追溯完善

章政 8 years ago
parent
commit
13ac0cad03

+ 1 - 6
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -94,12 +94,7 @@ namespace UAS_MES.OQC
         {
             if (CheckBefore())
             {
-                sql.Clear();
-                sql.Append("select max(nvl(ad_maxngacceptqty,0)) maxngacceptqty from QUA_Aql,QUA_AqlDetail where al_id=ad_alid ");
-                sql.Append("and al_statuscode='AUDITED' and al_code ='" + ob_aqlcode.Text + "' and " + (ob_batchqty.Text != "" ? ob_batchqty.Text : "0") + " >= ad_minqty");
-                sql.Append(" and " + (ob_batchqty.Text != "" ? ob_batchqty.Text : "0") + "<=ad_maxqty ");
-                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                if (int.Parse(ob_ngqty.Text == "" ? "0" : ob_ngqty.Text) <= int.Parse(dt.Rows[0]["maxngacceptqty"].ToString() == "" ? ob_maxngacceptqty.Text : dt.Rows[0]["maxngacceptqty"].ToString()))
+                if (int.Parse(ob_ngqty.Text == "" ? "0" : ob_ngqty.Text) <= int.Parse(ob_maxngacceptqty.Text == "" ? ob_maxngacceptqty.Text : ob_maxngacceptqty.Text))
                 {
                     dh.ExecuteSql("update OQCBatch set ob_status='OK',ob_result='OK' where ob_checkno='" + ob_checkno.Text + "'", "select");
                     DoLog("批次通过", "批次通过成功", "通过");

+ 30 - 20
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -55,8 +55,6 @@
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChoosedDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
-            this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
             this.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -91,6 +89,9 @@
             this.obd_outboxcode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_makecode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.or_reasoncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_description = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -407,8 +408,9 @@
             this.ChoosedDGV.AllowUserToAddRows = false;
             this.ChoosedDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ChoosedDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.bg_code1,
-            this.bg_name1});
+            this.or_id,
+            this.or_reasoncode,
+            this.oi_description});
             this.ChoosedDGV.Location = new System.Drawing.Point(810, 204);
             this.ChoosedDGV.Name = "ChoosedDGV";
             this.ChoosedDGV.RowHeadersWidth = 20;
@@ -416,20 +418,6 @@
             this.ChoosedDGV.Size = new System.Drawing.Size(244, 257);
             this.ChoosedDGV.TabIndex = 205;
             // 
-            // bg_code1
-            // 
-            this.bg_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.bg_code1.DataPropertyName = "bg_code";
-            this.bg_code1.HeaderText = "不良代码";
-            this.bg_code1.Name = "bg_code1";
-            // 
-            // bg_name1
-            // 
-            this.bg_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.bg_name1.DataPropertyName = "bg_name";
-            this.bg_name1.HeaderText = "不良原因";
-            this.bg_name1.Name = "bg_name1";
-            // 
             // WaitChooseDGV
             // 
             this.WaitChooseDGV.AllowUserToAddRows = false;
@@ -855,6 +843,27 @@
             this.obd_id.Name = "obd_id";
             this.obd_id.Visible = false;
             // 
+            // or_id
+            // 
+            this.or_id.DataPropertyName = "or_id";
+            this.or_id.HeaderText = "or_id";
+            this.or_id.Name = "or_id";
+            this.or_id.Visible = false;
+            // 
+            // or_reasoncode
+            // 
+            this.or_reasoncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.or_reasoncode.DataPropertyName = "or_reasoncode";
+            this.or_reasoncode.HeaderText = "不良代码";
+            this.or_reasoncode.Name = "or_reasoncode";
+            // 
+            // oi_description
+            // 
+            this.oi_description.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.oi_description.DataPropertyName = "oi_description";
+            this.oi_description.HeaderText = "不良原因";
+            this.oi_description.Name = "oi_description";
+            // 
             // OQC_SamplingDataCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -968,8 +977,6 @@
         private System.Windows.Forms.Label ob_aqlcode_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         private System.Windows.Forms.Label ob_maxngacceptqty_label;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bg_code1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bg_name1;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_name;
@@ -981,5 +988,8 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_status;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_id;
         private System.Windows.Forms.Label ob_projectcode_label;
+        private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn or_reasoncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn oi_description;
     }
 }

+ 22 - 17
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -65,6 +65,8 @@ namespace UAS_MES.OQC
             {
                 if (CheckSnCode())
                 {
+                    dt = (DataTable)dh.ExecuteSql("select or_reasoncode, oi_description from OQCNGReason where or_checkno='" + ob_checkno.Text + "' and or_sncode='" + sncode.Text + "'", "select");
+                    BaseUtil.FillDgvWithDataTable(ChoosedDGV, dt);
                     GetBatchTypeGridData();
                 }
             }
@@ -101,7 +103,7 @@ namespace UAS_MES.OQC
                         }
                     }
                     else {
-                        OperateResult.AppendText(">>序列号"+sncode.Text+"不属于当前抽检批次\n", Color.Red);
+                        OperateResult.AppendText(">>序列号" + sncode.Text + "不属于当前抽检批次\n", Color.Red);
                         return false;
                     }
                 }
@@ -132,7 +134,7 @@ namespace UAS_MES.OQC
         {
             //只能操作检验中或者待检验的批次
             if (ob_status.Text == "待检验" || ob_status.Text == "检验中")
-            { 
+            {
                 if (!CheckSnCode())
                     return;
                 //判断检验项是否勾选,如勾选取出明细数据
@@ -143,7 +145,7 @@ namespace UAS_MES.OQC
                         TempForCheckType.Rows.RemoveAt(i);
                     }
                 }
-                if (TempForCheckType != null && TempForCheckType.Rows.Count>0)
+                if (TempForCheckType != null && TempForCheckType.Rows.Count > 0)
                 {
                     //用于存放更新的数据
                     List<string> ois_ifng_update = new List<string>();
@@ -177,11 +179,13 @@ namespace UAS_MES.OQC
                     bool AllPass = true;
                     for (int i = 0; i < ois_ifng_insert.Count; i++)
                     {
+                        Console.WriteLine("ois_ifng_insert" + ois_ifng_insert[i]);
                         if (ois_ifng_insert[i] == "-1")
                             AllPass = false;
                     }
                     for (int i = 0; i < ois_ifng_update.Count; i++)
                     {
+                        Console.WriteLine("ois_ifng_update" + ois_ifng_update[i]);
                         if (ois_ifng_update[i] == "-1")
                             AllPass = false;
                     }
@@ -202,11 +206,11 @@ namespace UAS_MES.OQC
                                 id[i] = dh.GetSEQ("OQCItemSamples_SEQ");
                             }
                             sql.Clear();
-                            sql.Append("insert when (not exists (select ois_id from OQCItemSamples where ois_checkno='"+ob_checkno.Text+"' and ois_sncode='"+sncode.Text+ "' and ois_itemcode =:ois_itemcode)) then ");
+                            sql.Append("insert when (not exists (select ois_id from OQCItemSamples where ois_checkno='" + ob_checkno.Text + "' and ois_sncode='" + sncode.Text + "' and ois_itemcode =:ois_itemcode)) then ");
                             sql.Append("into OQCItemSamples (ois_id,ois_checkno,ois_makecode, ois_sncode,ois_projectcode,ois_itemcode,");
                             sql.Append("ois_ifng,ois_defectlevel,ois_remark)select :id,'" + ob_checkno.Text + "',");
                             sql.Append("'" + ob_makecode.Text + "','" + sncode.Text + "','" + ob_projectcode.Text + "',:ois_itemcode,:ois_ifng,:ois_defectlevel,:ois_remark from dual");
-                            dh.BatchInsert(sql.GetString(), new string[] { "ois_itemcode","id", "ois_itemcode", "ois_ifng", "ois_defectlevel", "ois_remark" },
+                            dh.BatchInsert(sql.GetString(), new string[] { "ois_itemcode", "id", "ois_itemcode", "ois_ifng", "ois_defectlevel", "ois_remark" },
                                  oi_itemcode_insert.ToArray(), id, oi_itemcode_insert.ToArray(), ois_ifng_insert.ToArray(), ois_defectlevel_insert.ToArray(), ois_remark_insert.ToArray());
                         }
                         //采集不良信息
@@ -231,10 +235,10 @@ namespace UAS_MES.OQC
                         dh.ExecuteSql("update OQCBatch set ob_status='CHECKING' where ob_checkno='" + ob_checkno.Text + "' and ob_status='UNCHECK'", "update");
                         //更新批次中的合格数不合格数:用抽检批检验项目表获取最大的抽检数和不合格数
                         dh.ExecuteSql("update OQCBATCH set (ob_ngqty,ob_okqty)=(select nvl(max(oi_ngqty),0),max(oi_checkqty)-nvl(max(oi_ngqty),0) from OQCItems where oi_checkno ='" + ob_checkno.Text + "') where ob_checkno ='" + ob_checkno.Text + "'", "update");
-                        OperateResult.AppendText(">>操作成功\n", Color.Green);
+                        OperateResult.AppendText(">>序列号 " + sncode.Text + "操作成功\n", Color.Green);
                         GetBatch.PerformClick();
-                        CheckTypeDGV.DataSource = null;
                         ChoosedDGV.DataSource = null;
+                        BaseUtil.CleanDGVData(CheckTypeDGV);
                         sncode.Text = "";
                         TempForCheckType.Clear();
                     }
@@ -254,12 +258,7 @@ namespace UAS_MES.OQC
         {
             if (CheckBefore())
             {
-                sql.Clear();
-                sql.Append("select max(nvl(ad_maxngacceptqty,0)) maxngacceptqty from QUA_Aql,QUA_AqlDetail where al_id=ad_alid ");
-                sql.Append("and al_statuscode='AUDITED' and al_code ='" + ob_aqlcode.Text + "' and " + (ob_batchqty.Text != "" ? ob_batchqty.Text : "0") + " >= ad_minqty");
-                sql.Append(" and " + (ob_batchqty.Text != "" ? ob_batchqty.Text : "0") + "<=ad_maxqty ");
-                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                if (int.Parse(ob_ngqty.Text == "" ? "0" : ob_ngqty.Text) <= int.Parse(dt.Rows[0]["maxngacceptqty"].ToString() == "" ? ob_maxngacceptqty.Text : dt.Rows[0]["maxngacceptqty"].ToString()))
+                if (int.Parse(ob_ngqty.Text == "" ? "0" : ob_ngqty.Text) <= int.Parse(ob_maxngacceptqty.Text == "" ? ob_maxngacceptqty.Text : ob_maxngacceptqty.Text))
                 {
                     dh.ExecuteSql("update OQCBatch set ob_status='OK',ob_result='OK' where ob_checkno='" + ob_checkno.Text + "'", "select");
                     string ErrorMessage;
@@ -375,15 +374,16 @@ namespace UAS_MES.OQC
                 textcell.Value = "检验状态";
                 headerRow.Cells.Add(textcell);
                 headerRow.ReadOnly = true;
-                CollapseDataGridViewRow cl = new CollapseDataGridViewRow() ;
+                CollapseDataGridViewRow cl = new CollapseDataGridViewRow();
                 try
                 {
                     cl = (CollapseDataGridViewRow)(CheckTypeDGV.Rows[e.RowIndex]);
                 }
-                catch {
+                catch
+                {
 
                 }
-              
+
                 cl.Rows.Add(headerRow);
 
                 for (int i = 0; i < dt.Rows.Count; i++)
@@ -453,7 +453,12 @@ namespace UAS_MES.OQC
                 headerRow.Cells.Add(textcell);
 
                 headerRow.ReadOnly = true;
-                CollapseDataGridViewRow cl = (CollapseDataGridViewRow)(WaitChooseDGV.Rows[e.RowIndex]);
+                CollapseDataGridViewRow cl = new CollapseDataGridViewRow();
+                try
+                {
+                    cl = (CollapseDataGridViewRow)(WaitChooseDGV.Rows[e.RowIndex]);
+                }
+                catch (Exception) { }
                 cl.Rows.Add(headerRow);
 
                 for (int i = 0; i < dt.Rows.Count; i++)

+ 5 - 2
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.resx

@@ -249,10 +249,13 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="bg_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="or_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="bg_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="or_reasoncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_description.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

+ 105 - 81
UAS-MES/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -31,11 +31,6 @@
             this.sn_code_label = new System.Windows.Forms.Label();
             this.SerialPanel = new System.Windows.Forms.Panel();
             this.CraftInfDgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.ms_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ma_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.label4 = new System.Windows.Forms.Label();
@@ -44,6 +39,13 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -55,21 +57,21 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(14, 20);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(10, 11);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(72, 27);
+            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 183;
             this.sn_code_label.Text = "序列号";
             // 
             // SerialPanel
             // 
-            this.SerialPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.SerialPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.SerialPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.SerialPanel.Location = new System.Drawing.Point(19, 146);
-            this.SerialPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SerialPanel.Location = new System.Drawing.Point(14, 107);
+            this.SerialPanel.Margin = new System.Windows.Forms.Padding(2);
             this.SerialPanel.Name = "SerialPanel";
-            this.SerialPanel.Size = new System.Drawing.Size(1265, 316);
+            this.SerialPanel.Size = new System.Drawing.Size(950, 254);
             this.SerialPanel.TabIndex = 194;
             this.SerialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.SerialPanel_Paint);
             // 
@@ -79,48 +81,20 @@
             this.CraftInfDgv.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.CraftInfDgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.CraftInfDgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.ms_prodcode,
-            this.ms_sncode,
-            this.ms_makecode,
-            this.mc_code,
+            this.mp_sncode,
+            this.mp_makecode,
+            this.ma_prodcode,
+            this.mp_sourcecode,
+            this.mp_indate,
+            this.ma_craftcode,
             this.ma_linecode});
-            this.CraftInfDgv.Location = new System.Drawing.Point(0, 485);
-            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CraftInfDgv.Location = new System.Drawing.Point(0, 388);
+            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(2);
             this.CraftInfDgv.Name = "CraftInfDgv";
             this.CraftInfDgv.RowTemplate.Height = 27;
-            this.CraftInfDgv.Size = new System.Drawing.Size(1300, 238);
+            this.CraftInfDgv.Size = new System.Drawing.Size(975, 190);
             this.CraftInfDgv.TabIndex = 193;
             // 
-            // ms_prodcode
-            // 
-            this.ms_prodcode.DataPropertyName = "ms_prodcode";
-            this.ms_prodcode.HeaderText = "产品代码";
-            this.ms_prodcode.Name = "ms_prodcode";
-            // 
-            // ms_sncode
-            // 
-            this.ms_sncode.DataPropertyName = "ms_sncode";
-            this.ms_sncode.HeaderText = "序列号";
-            this.ms_sncode.Name = "ms_sncode";
-            // 
-            // ms_makecode
-            // 
-            this.ms_makecode.DataPropertyName = "ms_makecode";
-            this.ms_makecode.HeaderText = "工单代码";
-            this.ms_makecode.Name = "ms_makecode";
-            // 
-            // mc_code
-            // 
-            this.mc_code.DataPropertyName = "mc_code";
-            this.mc_code.HeaderText = "途程代码";
-            this.mc_code.Name = "mc_code";
-            // 
-            // ma_linecode
-            // 
-            this.ma_linecode.DataPropertyName = "ma_linecode";
-            this.ma_linecode.HeaderText = "产线";
-            this.ma_linecode.Name = "ma_linecode";
-            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
@@ -133,11 +107,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.label2);
             this.groupBoxWithBorder1.Controls.Add(this.label3);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(16, 65);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(12, 40);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1271, 50);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(953, 40);
             this.groupBoxWithBorder1.TabIndex = 192;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "颜色说明";
@@ -146,10 +118,9 @@
             // pictureBox2
             // 
             this.pictureBox2.BackColor = System.Drawing.Color.Green;
-            this.pictureBox2.Location = new System.Drawing.Point(132, 15);
-            this.pictureBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox2.Location = new System.Drawing.Point(99, 12);
             this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox2.Size = new System.Drawing.Size(60, 20);
             this.pictureBox2.TabIndex = 187;
             this.pictureBox2.TabStop = false;
             // 
@@ -157,30 +128,27 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(864, 12);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(648, 10);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(92, 27);
+            this.label4.Size = new System.Drawing.Size(74, 21);
             this.label4.TabIndex = 191;
             this.label4.Text = "尚未执行";
             // 
             // pictureBox1
             // 
             this.pictureBox1.BackColor = System.Drawing.Color.Red;
-            this.pictureBox1.Location = new System.Drawing.Point(451, 15);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox1.Location = new System.Drawing.Point(338, 12);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox1.Size = new System.Drawing.Size(60, 20);
             this.pictureBox1.TabIndex = 186;
             this.pictureBox1.TabStop = false;
             // 
             // pictureBox3
             // 
             this.pictureBox3.BackColor = System.Drawing.Color.White;
-            this.pictureBox3.Location = new System.Drawing.Point(775, 15);
-            this.pictureBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox3.Location = new System.Drawing.Point(581, 12);
             this.pictureBox3.Name = "pictureBox3";
-            this.pictureBox3.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox3.Size = new System.Drawing.Size(60, 20);
             this.pictureBox3.TabIndex = 190;
             this.pictureBox3.TabStop = false;
             // 
@@ -188,10 +156,9 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(221, 12);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(166, 10);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(152, 27);
+            this.label2.Size = new System.Drawing.Size(122, 21);
             this.label2.TabIndex = 188;
             this.label2.Text = "已执行且为良品";
             // 
@@ -199,10 +166,9 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(540, 12);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(405, 10);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(172, 27);
+            this.label3.Size = new System.Drawing.Size(138, 21);
             this.label3.TabIndex = 189;
             this.label3.Text = "已执行且为不良品";
             // 
@@ -211,11 +177,10 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(122, 22);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sn_code.Location = new System.Drawing.Point(92, 13);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(192, 25);
+            this.sn_code.Size = new System.Drawing.Size(145, 21);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -223,18 +188,75 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
+            // mp_sncode
+            // 
+            this.mp_sncode.DataPropertyName = "mp_sncode";
+            this.mp_sncode.Frozen = true;
+            this.mp_sncode.HeaderText = "序列号";
+            this.mp_sncode.Name = "mp_sncode";
+            this.mp_sncode.ReadOnly = true;
+            this.mp_sncode.Width = 120;
+            // 
+            // mp_makecode
+            // 
+            this.mp_makecode.DataPropertyName = "mp_makecode";
+            this.mp_makecode.Frozen = true;
+            this.mp_makecode.HeaderText = "工单代码";
+            this.mp_makecode.Name = "mp_makecode";
+            this.mp_makecode.ReadOnly = true;
+            this.mp_makecode.Width = 120;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.DataPropertyName = "ma_prodcode";
+            this.ma_prodcode.HeaderText = "产品代码";
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.ReadOnly = true;
+            this.ma_prodcode.Width = 120;
+            // 
+            // mp_sourcecode
+            // 
+            this.mp_sourcecode.DataPropertyName = "mp_sourcecode";
+            this.mp_sourcecode.HeaderText = "资源编号";
+            this.mp_sourcecode.Name = "mp_sourcecode";
+            this.mp_sourcecode.ReadOnly = true;
+            this.mp_sourcecode.Width = 120;
+            // 
+            // mp_indate
+            // 
+            this.mp_indate.DataPropertyName = "mp_indate";
+            this.mp_indate.HeaderText = "过站时间";
+            this.mp_indate.Name = "mp_indate";
+            this.mp_indate.ReadOnly = true;
+            this.mp_indate.Width = 120;
+            // 
+            // ma_craftcode
+            // 
+            this.ma_craftcode.DataPropertyName = "ma_craftcode";
+            this.ma_craftcode.HeaderText = "途程代码";
+            this.ma_craftcode.Name = "ma_craftcode";
+            this.ma_craftcode.ReadOnly = true;
+            this.ma_craftcode.Width = 120;
+            // 
+            // ma_linecode
+            // 
+            this.ma_linecode.DataPropertyName = "ma_linecode";
+            this.ma_linecode.HeaderText = "产线";
+            this.ma_linecode.Name = "ma_linecode";
+            this.ma_linecode.ReadOnly = true;
+            this.ma_linecode.Width = 120;
+            // 
             // Query_ExeProgress
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1300, 722);
+            this.ClientSize = new System.Drawing.Size(975, 578);
             this.Controls.Add(this.SerialPanel);
             this.Controls.Add(this.CraftInfDgv);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.sn_code);
             this.Controls.Add(this.sn_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Query_ExeProgress";
             this.Tag = "Query!ExeProgress";
             this.Text = "工单执行进度";
@@ -263,10 +285,12 @@
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum CraftInfDgv;
         private System.Windows.Forms.Panel SerialPanel;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_sncode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_makecode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mc_code;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mp_sncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mp_makecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ma_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mp_sourcecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mp_indate;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ma_craftcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_linecode;
     }
 }

+ 5 - 0
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -73,6 +73,11 @@ namespace UAS_MES.Query
                         Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
                 }
                 Refresh();
+                sql.Clear();
+                sql.Append("select mp_makecode,ma_prodcode,ma_linecode,ma_craftcode,mp_sourcecode,mp_sncode,mp_indate ");
+                sql.Append("from makeprocess left join make on mp_makecode=ma_code where mp_sncode='"+sn_code.Text+"'");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(),"select");
+                BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
             }
         }
 

+ 6 - 15
UAS-MES/FunctionCode/Query/Query_ExeProgress.resx

@@ -117,31 +117,22 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="ms_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="mp_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ms_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="mp_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ms_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="ma_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mc_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="mp_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ma_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="mp_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mc_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="ma_craftcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="ma_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

+ 1 - 1
UAS-MES/UAS-MES.csproj

@@ -41,7 +41,7 @@
     <MinimumRequiredVersion>1.0.0.201</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>252</ApplicationRevision>
+    <ApplicationRevision>253</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>