Browse Source

添加报废节点

章政 8 years ago
parent
commit
419bb359ae

+ 33 - 4
UAS-MES/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -46,11 +46,14 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.pictureBox4 = new System.Windows.Forms.PictureBox();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
             this.SuspendLayout();
             // 
             // sn_code_label
@@ -150,6 +153,8 @@
             this.groupBoxWithBorder1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Maroon;
+            this.groupBoxWithBorder1.Controls.Add(this.label1);
+            this.groupBoxWithBorder1.Controls.Add(this.pictureBox4);
             this.groupBoxWithBorder1.Controls.Add(this.pictureBox2);
             this.groupBoxWithBorder1.Controls.Add(this.label4);
             this.groupBoxWithBorder1.Controls.Add(this.pictureBox1);
@@ -181,7 +186,7 @@
             // 
             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(867, 15);
+            this.label4.Location = new System.Drawing.Point(868, 15);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(92, 27);
@@ -200,7 +205,7 @@
             // 
             // pictureBox3
             // 
-            this.pictureBox3.BackColor = System.Drawing.Color.White;
+            this.pictureBox3.BackColor = System.Drawing.Color.Black;
             this.pictureBox3.Location = new System.Drawing.Point(775, 15);
             this.pictureBox3.Margin = new System.Windows.Forms.Padding(4);
             this.pictureBox3.Name = "pictureBox3";
@@ -212,7 +217,7 @@
             // 
             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(224, 15);
+            this.label2.Location = new System.Drawing.Point(225, 15);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(152, 27);
@@ -223,7 +228,7 @@
             // 
             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(543, 15);
+            this.label3.Location = new System.Drawing.Point(544, 15);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(172, 27);
@@ -247,6 +252,27 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(1127, 15);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.TabIndex = 193;
+            this.label1.Text = "尚未执行";
+            // 
+            // pictureBox4
+            // 
+            this.pictureBox4.BackColor = System.Drawing.Color.White;
+            this.pictureBox4.Location = new System.Drawing.Point(1034, 15);
+            this.pictureBox4.Margin = new System.Windows.Forms.Padding(4);
+            this.pictureBox4.Name = "pictureBox4";
+            this.pictureBox4.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox4.TabIndex = 192;
+            this.pictureBox4.TabStop = false;
+            // 
             // Query_ExeProgress
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -270,6 +296,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
             this.ResumeLayout(true);
             this.PerformLayout();
 
@@ -294,5 +321,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_indate;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_craftcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_linecode;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.PictureBox pictureBox4;
     }
 }

+ 15 - 3
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -66,10 +66,15 @@ namespace UAS_MES.Query
                     PastStep = dt.Rows[0]["ms_paststep"].ToString();
                     //如果为不良的时候
                     string BadStep = "";
+                    string RejectStep = "";
                     if (dt.Rows[0]["ms_status"].ToString() == "3")
                     {
                         BadStep = dt.Rows[0]["ms_stepcode"].ToString();
                     }
+                    else if (dt.Rows[0]["ms_status"].ToString() == "4")
+                    {
+                        RejectStep = dt.Rows[0]["ms_stepcode"].ToString();
+                    }
                     //查询执行过的步骤
                     sql.Clear();
                     sql.Append("select CD_DETNO,CD_STEPCODE from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
@@ -90,19 +95,26 @@ namespace UAS_MES.Query
                     //添加中间节点
                     for (int i = 0; i < dt.Rows.Count; i++)
                     {
+                        //包含说明是线内工序
                         if (PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString()))
                         {
-                            if (BadStep != dt.Rows[i]["CD_STEPCODE"].ToString())
+                            if (BadStep == dt.Rows[i]["CD_STEPCODE"].ToString())
                             {
-                                PaintColor.Add(Brushes.Green);
+                                PaintColor.Add(Brushes.Red);
                             }
                             else
                             {
-                                PaintColor.Add(Brushes.Red);
+                                if (!PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString() + "," + RejectStep) || RejectStep == "")
+                                    PaintColor.Add(Brushes.Green);
+                                else
+                                    PaintColor.Add(Brushes.Black);
                             }
                         }
+                        //不包含说明是线外工序
                         else
+                        {
                             PaintColor.Add(Brushes.White);
+                        }
                     }
                     //完工添加绿色,未完工添加红色
                     if (dh.CheckExist("Makeserial", "ms_sncode='" + sn_code.Text + "' and ms_status=2"))

+ 21 - 0
UAS-MES/FunctionCode/Query/Query_ExeProgress.resx

@@ -138,4 +138,25 @@
   <metadata name="ma_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="mp_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mp_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ma_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mp_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mp_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <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">
+    <value>True</value>
+  </metadata>
 </root>