Bläddra i källkod

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 8 år sedan
förälder
incheckning
932e23dbe9

+ 0 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -172,7 +172,6 @@ namespace UAS_MES.Make
                 string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
                 string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
                 PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
-                ms_salecode.Text = dt.Rows[0]["pa_salecode"].ToString();
                 if (PR_CHECKCARTONW != "0")
                     checkweightlabel.Text = "需要检测重量";
                 else

+ 55 - 1
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.Designer.cs

@@ -45,6 +45,10 @@
             this.ms_stepcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_nextstepcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Count_label = new System.Windows.Forms.Label();
+            this.Count = new System.Windows.Forms.Label();
+            this.ma_qty_label = new System.Windows.Forms.Label();
+            this.ma_qty = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.SnInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -190,7 +194,7 @@
             this.SnInf.Margin = new System.Windows.Forms.Padding(4);
             this.SnInf.Name = "SnInf";
             this.SnInf.RowTemplate.Height = 23;
-            this.SnInf.Size = new System.Drawing.Size(1261, 624);
+            this.SnInf.Size = new System.Drawing.Size(1261, 590);
             this.SnInf.TabIndex = 203;
             // 
             // ms_sncode
@@ -233,11 +237,57 @@
             this.Column5.Name = "Column5";
             this.Column5.ReadOnly = true;
             // 
+            // Count_label
+            // 
+            this.Count_label.AutoSize = true;
+            this.Count_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Count_label.Location = new System.Drawing.Point(275, 664);
+            this.Count_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Count_label.Name = "Count_label";
+            this.Count_label.Size = new System.Drawing.Size(132, 27);
+            this.Count_label.TabIndex = 212;
+            this.Count_label.Text = "当前状态总计";
+            // 
+            // Count
+            // 
+            this.Count.AutoSize = true;
+            this.Count.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Count.Location = new System.Drawing.Point(415, 664);
+            this.Count.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Count.Name = "Count";
+            this.Count.Size = new System.Drawing.Size(0, 27);
+            this.Count.TabIndex = 213;
+            // 
+            // ma_qty_label
+            // 
+            this.ma_qty_label.AutoSize = true;
+            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty_label.Location = new System.Drawing.Point(4, 664);
+            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty_label.Name = "ma_qty_label";
+            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_qty_label.TabIndex = 214;
+            this.ma_qty_label.Text = "工单数量";
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(104, 664);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 27);
+            this.ma_qty.TabIndex = 215;
+            // 
             // Query_OnlineTraceBack
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1261, 694);
+            this.Controls.Add(this.ma_qty);
+            this.Controls.Add(this.ma_qty_label);
+            this.Controls.Add(this.Count);
+            this.Controls.Add(this.Count_label);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ms_nextstepcode);
             this.Controls.Add(this.ms_nextstepcode_label);
@@ -278,5 +328,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_nextstepcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
         private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private System.Windows.Forms.Label Count_label;
+        private System.Windows.Forms.Label Count;
+        private System.Windows.Forms.Label ma_qty_label;
+        private System.Windows.Forms.Label ma_qty;
     }
 }

+ 3 - 0
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

@@ -105,6 +105,8 @@ namespace UAS_MES.Query
                 sql.Append(" order by ms_sncode ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(SnInf, dt);
+                Count.Text = SnInf.Rows.Count.ToString();
+                ma_qty.Text = dh.getFieldDataByCondition("make", "ma_qty", "ma_code='" + ma_code.Text + "'").ToString();
             }
             else
             {
@@ -112,6 +114,7 @@ namespace UAS_MES.Query
                 BaseUtil.CleanDataGridView(SnInf);
                 ma_code.Text = "";
             }
+
         }
 
         private void ms_status_SelectedIndexChanged(object sender, EventArgs e)

+ 3 - 3
UAS-MES/PublicMethod/LogicHandler.cs

@@ -939,10 +939,10 @@ namespace UAS_MES.PublicMethod
             }
             sql.Clear();
             sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
-            sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_status,mb_badremark,mb_bgname,mb_badname)");
+            sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status,mb_badremark,mb_bgname,mb_badname)");
             sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserCode + "',sysdate,'" + StepCode + "','" + iSourceCode + "',:bc_code,:bg_code,'',");
-            sql.Append("sp_soncode,'0',:bc_remark,:bg_name,:bc_name from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
-            sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode and sp_craftcode=ms_craftcode where ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
+            sql.Append("'0',:bc_remark,:bg_name,:bc_name from make left join makeSerial on ms_makecode=ma_code  ");
+            sql.Append(" where ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
             dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bg_code", "bc_remark", "bg_name", "bc_name" }, iBadCode, iBadGroupCode, iBadRemark, iBadGroupName, iBadName);
             //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
             //如果存在送检批号则进行删除