Browse Source

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

Hcsy 8 years ago
parent
commit
ef5df610e8

+ 34 - 7
UAS-MES/FunctionCode/OQC/OQC_CheckNoSplit.Designer.cs

@@ -58,6 +58,8 @@
             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();
@@ -84,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, 29);
+            this.ob_checkno_label.Location = new System.Drawing.Point(45, 28);
             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);
@@ -113,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, 77);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(45, 76);
             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);
@@ -142,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, 121);
+            this.ms_sncode_label.Location = new System.Drawing.Point(45, 120);
             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);
@@ -153,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(45, 166);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(383, 171);
             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);
@@ -164,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(384, 166);
+            this.pr_detail_label.Location = new System.Drawing.Point(708, 171);
             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);
@@ -175,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(153, 166);
+            this.ob_prodcode.Location = new System.Drawing.Point(491, 171);
             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);
@@ -369,6 +371,8 @@
             // groupBoxWithBorder2
             // 
             this.groupBoxWithBorder2.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder2.Controls.Add(this.ob_makecode);
+            this.groupBoxWithBorder2.Controls.Add(this.ob_makecode_label);
             this.groupBoxWithBorder2.Controls.Add(this.pr_detail);
             this.groupBoxWithBorder2.Controls.Add(this.obd_outboxcode);
             this.groupBoxWithBorder2.Controls.Add(this.ob_checkno_label);
@@ -395,7 +399,7 @@
             // 
             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(484, 166);
+            this.pr_detail.Location = new System.Drawing.Point(818, 171);
             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);
@@ -441,6 +445,27 @@
             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);
@@ -505,5 +530,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn obd_builddate;
         private System.Windows.Forms.Label pr_detail;
         private CustomControl.ButtonUtil.NormalButton ChooseAll;
+        private System.Windows.Forms.Label ob_makecode;
+        private System.Windows.Forms.Label ob_makecode_label;
     }
 }

+ 13 - 3
UAS-MES/FunctionCode/OQC/OQC_CheckNoSplit.cs

@@ -79,8 +79,18 @@ namespace UAS_MES.OQC
                     {
                         List<string> sqls = new List<string>();
                         //插入新批次的主表
-                        string ob_id = dh.getFieldDataByCondition("oqcbatch", "ob_id", "ob_checkno='" + new_checkno.Text + "'").ToString();
-                        if (ob_id == "")
+                        dt = (DataTable)dh.ExecuteSql("select ob_id,ob_makecode from oqcbatch where ob_checkno='" + new_checkno.Text + "'", "select");
+                        string ob_id = "";
+                        if (dt.Rows.Count > 0)
+                        {
+                            ob_id = dt.Rows[0]["ob_id"].ToString();
+                            if (ob_makecode.Text != dt.Rows[0]["ob_makecode"].ToString())
+                            {
+                                OperateResult.AppendText(">>原批次工单" + ob_makecode.Text + ",新批次工单" + dt.Rows[0]["ob_makecode"].ToString() + ",不允许拆批\n", Color.Red);
+                                return;
+                            }
+                        }
+                        if (dt.Rows.Count == 0)
                         {
                             ob_id = dh.GetSEQ("oqcbatch_seq");
                             sql.Clear();
@@ -107,8 +117,8 @@ namespace UAS_MES.OQC
                         dh.ExecuteSQLTran(sqls.ToArray());
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "抽检批拆解", "拆解成功,原批次" + ob_checkno.Text + "新批次:" + new_checkno.Text, "", ob_checkno.Text);
                         DeleteSn.Clear();
+                        OperateResult.AppendText(">>批次" + ob_checkno.Text + ",成功拆解至批次" + new_checkno.Text + "\n ", Color.Green);
                         GetBatch.PerformClick();
-                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "拆解成功\n ", Color.Green);
                     }
                     else OperateResult.AppendText(">>批次状态必须是待检验\n", Color.Red);
                 }

+ 63 - 43
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -30,7 +30,7 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_SamplingDataCollection));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
             this.ob_checkno_label = new System.Windows.Forms.Label();
             this.obd_outboxcode_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
@@ -58,10 +58,6 @@
             this.ob_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChoosedDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
             this.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
-            this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
@@ -95,8 +91,14 @@
             this.Filter = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.BadInfoSource = new System.Windows.Forms.BindingSource(this.components);
             this.label2 = new System.Windows.Forms.Label();
+            this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.choose1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -452,6 +454,7 @@
             this.ChoosedDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.choose1,
             this.or_id,
+            this.bg_name1,
             this.bg_code1,
             this.bc_code1,
             this.bc_name1});
@@ -469,6 +472,7 @@
             this.WaitChooseDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.WaitChooseDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.ChooseAll,
+            this.bg_name,
             this.bg_code,
             this.bc_code,
             this.bc_name});
@@ -481,38 +485,6 @@
             this.WaitChooseDGV.TabIndex = 204;
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             // 
-            // ChooseAll
-            // 
-            this.ChooseAll.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.ChooseAll.DataPropertyName = "ChooseAll";
-            this.ChooseAll.HeaderText = "勾选";
-            this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.ChooseAll.Width = 60;
-            // 
-            // bg_code
-            // 
-            this.bg_code.DataPropertyName = "bg_code";
-            this.bg_code.HeaderText = "不良组别编号";
-            this.bg_code.Name = "bg_code";
-            this.bg_code.Visible = false;
-            // 
-            // bc_code
-            // 
-            this.bc_code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.bc_code.DataPropertyName = "bc_code";
-            this.bc_code.HeaderText = "不良代码";
-            this.bc_code.Name = "bc_code";
-            this.bc_code.ReadOnly = true;
-            this.bc_code.Width = 130;
-            // 
-            // bc_name
-            // 
-            this.bc_name.DataPropertyName = "bc_name";
-            this.bc_name.HeaderText = "不良名称";
-            this.bc_name.Name = "bc_name";
-            this.bc_name.ReadOnly = true;
-            // 
             // ob_remark
             // 
             this.ob_remark.AllPower = null;
@@ -590,8 +562,8 @@
             // 
             this.ci_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.ci_name.DataPropertyName = "ci_name";
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.ci_name.DefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.ci_name.DefaultCellStyle = dataGridViewCellStyle3;
             this.ci_name.HeaderText = "项目名称";
             this.ci_name.Name = "ci_name";
             this.ci_name.ReadOnly = true;
@@ -927,6 +899,45 @@
             this.label2.TabIndex = 221;
             this.label2.Text = "搜索";
             // 
+            // ChooseAll
+            // 
+            this.ChooseAll.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.ChooseAll.DataPropertyName = "ChooseAll";
+            this.ChooseAll.HeaderText = "勾选";
+            this.ChooseAll.Name = "ChooseAll";
+            this.ChooseAll.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.ChooseAll.Width = 60;
+            // 
+            // bg_name
+            // 
+            this.bg_name.DataPropertyName = "bg_name";
+            this.bg_name.HeaderText = "不良组别名称";
+            this.bg_name.Name = "bg_name";
+            this.bg_name.Visible = false;
+            // 
+            // bg_code
+            // 
+            this.bg_code.DataPropertyName = "bg_code";
+            this.bg_code.HeaderText = "不良组别编号";
+            this.bg_code.Name = "bg_code";
+            this.bg_code.Visible = false;
+            // 
+            // bc_code
+            // 
+            this.bc_code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.bc_code.DataPropertyName = "bc_code";
+            this.bc_code.HeaderText = "不良代码";
+            this.bc_code.Name = "bc_code";
+            this.bc_code.ReadOnly = true;
+            this.bc_code.Width = 130;
+            // 
+            // bc_name
+            // 
+            this.bc_name.DataPropertyName = "bc_name";
+            this.bc_name.HeaderText = "不良名称";
+            this.bc_name.Name = "bc_name";
+            this.bc_name.ReadOnly = true;
+            // 
             // choose1
             // 
             this.choose1.HeaderText = "勾选";
@@ -941,6 +952,13 @@
             this.or_id.Name = "or_id";
             this.or_id.Visible = false;
             // 
+            // bg_name1
+            // 
+            this.bg_name1.DataPropertyName = "bg_name";
+            this.bg_name1.HeaderText = "不良组别名称";
+            this.bg_name1.Name = "bg_name1";
+            this.bg_name1.Visible = false;
+            // 
             // bg_code1
             // 
             this.bg_code1.DataPropertyName = "bg_code";
@@ -1082,10 +1100,6 @@
         private System.Windows.Forms.Label ob_maxngacceptqty_label;
         private System.Windows.Forms.Label ob_projectcode_label;
         private CustomControl.ComBoxWithFocus.ComBoxWithFocus BadGroupCode;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn ChooseAll;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bc_code;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bc_name;
         private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_itemcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_name;
@@ -1098,8 +1112,14 @@
         private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
         private System.Windows.Forms.BindingSource BadInfoSource;
         private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn ChooseAll;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bg_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_code;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_name;
         private System.Windows.Forms.DataGridViewCheckBoxColumn choose1;
         private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bg_name1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;

+ 9 - 6
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -99,7 +99,7 @@ namespace UAS_MES.OQC
                 GetBatch.PerformClick();
                 if (CheckSnCode())
                 {
-                    dt = (DataTable)dh.ExecuteSql("select or_id,or_badcode bc_code,or_description bc_name,or_bgcode bg_code from OQCNGReason where or_checkno='" + ob_checkno.Text + "' and or_sncode='" + sncode.Text + "'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select or_id,or_badcode bc_code,or_description bc_name,or_bgcode bg_code,bg_name from OQCNGReason left join badgroup on or_bgcode=bg_code where or_checkno='" + ob_checkno.Text + "' and or_sncode='" + sncode.Text + "'", "select");
                     BaseUtil.FillDgvWithDataTable(ChoosedDGV, dt);
                     GetBatchTypeGridData();
                 }
@@ -287,11 +287,13 @@ namespace UAS_MES.OQC
                         List<string> bc_code = new List<string>();
                         List<string> bc_name = new List<string>();
                         List<string> bg_code = new List<string>();
+                        List<string> bg_name = new List<string>();
                         for (int i = 0; i < ChoosedDGV.RowCount; i++)
                         {
                             bc_code.Add(ChoosedDGV.Rows[i].Cells["bc_code1"].Value.ToString());
                             bc_name.Add(ChoosedDGV.Rows[i].Cells["bc_name1"].Value.ToString());
                             bg_code.Add(ChoosedDGV.Rows[i].Cells["bg_code1"].Value.ToString());
+                            bg_name.Add(ChoosedDGV.Rows[i].Cells["bg_name1"].Value.ToString());
                         }
                         dh.ExecuteSql("delete from OQCNGReason where or_sncode='" + sncode.Text + "' and or_checkno='" + ob_checkno.Text + "'", "delete");
                         if (bc_name.Count > 0)
@@ -304,11 +306,11 @@ namespace UAS_MES.OQC
                             //插入MakeBad表
                             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)");
+                            sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_badname,mb_status,mb_bgname)");
                             sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
-                            sql.Append("sp_soncode,'0' from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
+                            sql.Append("sp_soncode,:bc_name,'0',:bg_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 where ms_sncode='" + sncode.Text + "' and ms_makecode='" + ob_makecode.Text + "'");
-                            dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code" }, bc_code.ToArray(), bg_code.ToArray());
+                            dh.BatchInsert(sql.GetString(), new string[] { "bc_name", "bc_code", "bg_code", "bg_name" }, bc_name.ToArray(), bc_code.ToArray(), bg_code.ToArray(), bg_name.ToArray());
                         }
                         //更新项目编号中的抽检数、不合格数,根据采样项目记录
                         sql.Clear();
@@ -426,13 +428,14 @@ namespace UAS_MES.OQC
             if (wait.Rows.Count > 0)
             {
                 for (int i = 0; i < wait.Rows.Count; i++)
-                {                   
+                {
                     if (!Chooseed.Contains(wait.Rows[i]["bc_code"].ToString()))
                     {
                         DataRow dr1 = choose.NewRow();
                         dr1["bc_code"] = wait.Rows[i]["bc_code"];
                         dr1["bc_name"] = wait.Rows[i]["bc_name"];
                         dr1["bg_code"] = wait.Rows[i]["bg_code"];
+                        dr1["bg_name"] = wait.Rows[i]["bg_name"];
                         choose.Rows.Add(dr1);
                     }
                 }
@@ -507,7 +510,7 @@ namespace UAS_MES.OQC
         {
             string bg_code = BadGroupCode.SelectedValue.ToString();
             sql.Clear();
-            sql.Append("select 0 ChooseAll,bc_code,bc_name,bg_code from badgroupdetail left join badgroup on bg_id=bgd_bgid ");
+            sql.Append("select 0 ChooseAll,bc_code,bc_name,bg_name,bg_code from badgroupdetail left join badgroup on bg_id=bgd_bgid ");
             sql.Append("left join badcode on bgd_badcode=bc_code where bg_code='" + ((bg_code != "" && bg_code != "System.Data.DataRowView") ? bg_code.ToString() : "") + "' and bg_code is not null ");
             sql.Append(" order by bc_code");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");

+ 48 - 0
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.resx

@@ -255,6 +255,9 @@
   <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">
+    <value>True</value>
+  </metadata>
   <metadata name="bg_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -267,6 +270,9 @@
   <metadata name="ChooseAll.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="bg_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="bg_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -303,6 +309,33 @@
   <metadata name="ois_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_itemcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ci_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_checkqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_ng.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_leveldefect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ois_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ois_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
@@ -752,4 +785,19 @@
   <metadata name="BadInfoSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <metadata name="ChooseAll.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bg_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bg_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bc_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bc_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>