ソースを参照

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

Hcsy 8 年 前
コミット
618dbc2a28

+ 19 - 3
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -43,6 +43,7 @@
             this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.label4 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
@@ -85,6 +86,7 @@
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.SNCodeEnterTextBox();
             this.ma_softversion = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ma_softversion_label = new System.Windows.Forms.Label();
+            this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.panel2.SuspendLayout();
             this.panel1.SuspendLayout();
             this.SuspendLayout();
@@ -204,7 +206,8 @@
             this.columnHeader5,
             this.columnHeader4,
             this.columnHeader1,
-            this.columnHeader2});
+            this.columnHeader2,
+            this.columnHeader9});
             this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.WaitRejectList.Location = new System.Drawing.Point(5, 389);
             this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
@@ -234,7 +237,12 @@
             // columnHeader2
             // 
             this.columnHeader2.Text = "不良名称";
-            this.columnHeader2.Width = 161;
+            this.columnHeader2.Width = 122;
+            // 
+            // columnHeader9
+            // 
+            this.columnHeader9.Text = "备注";
+            this.columnHeader9.Width = 0;
             // 
             // label4
             // 
@@ -278,7 +286,8 @@
             this.columnHeader6,
             this.columnHeader3,
             this.columnHeader7,
-            this.columnHeader8});
+            this.columnHeader8,
+            this.columnHeader10});
             this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ChoosedRejectList.Location = new System.Drawing.Point(491, 389);
             this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
@@ -774,6 +783,11 @@
             this.ma_softversion_label.TabIndex = 72;
             this.ma_softversion_label.Text = "软件版本";
             // 
+            // columnHeader10
+            // 
+            this.columnHeader10.Text = "备注";
+            this.columnHeader10.Width = 0;
+            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -890,5 +904,7 @@
         private System.Windows.Forms.Label label7;
         private CustomControl.ValueLabel.ValueLabel ma_softversion;
         private System.Windows.Forms.Label ma_softversion_label;
+        private System.Windows.Forms.ColumnHeader columnHeader9;
+        private System.Windows.Forms.ColumnHeader columnHeader10;
     }
 }

+ 7 - 3
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -240,7 +240,7 @@ namespace UAS_MES.Make
         {
             object bg_code = bc_groupcode.SelectedValue;
             sql.Clear();
-            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_name from badgroupdetail ");
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from badgroupdetail ");
             sql.Append("left join badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode=bc_code where ");
             sql.Append("bg_code='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null order by bgd_detno");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -428,6 +428,7 @@ namespace UAS_MES.Make
                     }
                     else
                     {
+                        Console.WriteLine(ChoosedRejectList.Items[0].SubItems.Count);
                         for (int i = 0; i < RejectCount; i++)
                         {
                             //获取不良代码组
@@ -439,7 +440,7 @@ namespace UAS_MES.Make
                             //获取不良名称
                             bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
                             //获取所有的不良备注
-                            bcremark[i] = bc_remark.Text;
+                            bcremark[i] = ChoosedRejectList.Items[i].SubItems[4].Text;
                         }
                     }
                 }
@@ -484,7 +485,10 @@ namespace UAS_MES.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = dh.getFieldsDataByCondition("badcode", new string[] { "bc_groupcode", "bc_code", "bc_note" }, "bc_code='" + bc_code.Text + "'");
+                sql.Clear();
+                sql.Append("select  bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from  badgroupdetail left join ");
+                sql.Append("badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode = bc_code where bc_code='" + bc_code.Text + "'  and rownum=1 ");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {
                     for (int i = 0; i < ChoosedRejectList.Items.Count; i++)

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

@@ -280,9 +280,11 @@ namespace UAS_MES.OQC
 
         private void CheckTypeDGV_DataSourceChanged(object sender, EventArgs e)
         {
+            //更换抽检方案后保持抽选状态和检验数量
             for (int i = 0; i < CheckTypeDGV.Rows.Count; i++)
             {
                 CheckTypeDGV.Rows[i].Cells["Choose"].Value = true;
+                CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value = ob_sampleqty.Text;
             }
         }
     }

+ 2 - 60
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1136,9 +1136,9 @@ namespace UAS_LabelMachine
                 outboxcode1.Add(LabelInf.Rows[0].Cells["pib_outboxcode1"].Value.ToString(), true);
                 for (int i = 0; i < LabelInf.Rows.Count; i++)
                 {
+                    SingleID.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString());
                     if (LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True" && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() == "True" && LabelInf.Rows[i].Cells["pib_ifprint"].FormattedValue.ToString() != "True")
                     {
-                        SingleID.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString());
                         //如果不存在中盒号则进行添加
                         if (!MidIDAndOutboxcode.ContainsValue(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()))
                             MidIDAndOutboxcode.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString(), LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
@@ -1233,7 +1233,7 @@ namespace UAS_LabelMachine
                         }
                         catch (Exception ex) { LogManager.DoLog(ex.Message); }
                     }
-                    if (MidLabelAutoPrint.Checked && LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True" && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() == "True")
+                    if (MidLabelAutoPrint.Checked && LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True" && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue !=null&& LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() == "True")
                     {
                         //判断当前行的盒号和下一行不相等或者已经是最后一行了
                         if (i + 1 == LabelInf.RowCount || LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString() != LabelInf.Rows[i + 1 == LabelInf.RowCount ? i : i + 1].Cells["pib_outboxcode1"].Value.ToString())
@@ -1268,39 +1268,11 @@ namespace UAS_LabelMachine
         /// </summary>
         private void GetSingleBoxData()
         {
-            StringBuilder pib_id_string = new StringBuilder();
             //id数组
             string[] pib_id_arr = SingleID.ToArray();
-            //id个数
-            int pib_id_length = pib_id_arr.Length;
             //将所有的列存在在这里
             List<DataTable> AllSingleBoxCacheData = new List<DataTable>();
             //每五百条拼接一次条件
-            int fivehundred_count = pib_id_length / 500 + 1;
-            //当前打印的索引
-            int CurrentCount = 0;
-            for (int i = 0; i < fivehundred_count; i++)
-            {
-                //本次循环的数量
-                int count = 0;
-                pib_id_string.Append("(");
-                if (i + 1 == fivehundred_count)
-                    count = pib_id_length - i * 500;
-                else
-                    count = 500;
-                //当前执行的索引
-                int LastCount = CurrentCount;
-                for (int j = CurrentCount; j < LastCount + count - 1; j++)
-                {
-                    pib_id_string.Append(pib_id_arr[j] + ",");
-                    CurrentCount = CurrentCount + 1;
-                }
-                pib_id_string.Append(pib_id_arr[CurrentCount]);
-                CurrentCount = CurrentCount + 1;
-                pib_id_string.Append(")");
-                if (i + 1 != fivehundred_count)
-                    pib_id_string.Append(" or pib_id in ");
-            }
             //手动添加ID列
             DataColumn datacolumn = new DataColumn("pib_id");
             if (!SingleBoxCacheData.Columns.Contains("pib_id"))
@@ -1354,38 +1326,9 @@ namespace UAS_LabelMachine
             //记录一个ID用来取中盒的数量
             string pib_id = pib_id_arr[0];
             //id个数
-            int pib_id_length = pib_id_arr.Length;
             //将所有的列存在在这里
             List<DataTable> AllMidBoxCacheData = new List<DataTable>();
             //每五百条拼接一次条件
-            int fivehundred_count = pib_id_length / 900 + 1;
-            //当前打印的索引
-            int CurrentCount = 0;
-            for (int i = 0; i < fivehundred_count; i++)
-            {
-                //本次循环的数量
-                int count = 0;
-                pib_condition_string.Append("(");
-                pib_qtycondition_string.Append("(");
-                if (i + 1 == fivehundred_count)
-                    count = pib_id_length - i * 900;
-                else
-                    count = 900;
-                //当前执行的索引
-                int LastCount = CurrentCount;
-                for (int j = LastCount; j < LastCount + count - 1; j++)
-                {
-                    pib_condition_string.Append(pib_id_arr[j] + ",");
-                    pib_qtycondition_string.Append(pib_outbox_arr[j] + ",");
-                    CurrentCount = CurrentCount + 1;
-                }
-                pib_condition_string.Append(pib_id_arr[CurrentCount]);
-                pib_qtycondition_string.Append(pib_outbox_arr[CurrentCount]);
-                pib_condition_string.Append(")");
-                pib_qtycondition_string.Append(")");
-                if (i + 1 != fivehundred_count)
-                    pib_condition_string.Append(" or pib_id in ");
-            }
             //手动添加ID列
             DataColumn IDColumn = new DataColumn("pib_id");
             DataColumn OutBoxColumn = new DataColumn("pib_outboxcode1");
@@ -1418,7 +1361,6 @@ namespace UAS_LabelMachine
                             sql = sql.Substring(0, sql.LastIndexOf("="));
                             sql = sql + " in (select distinct pib_outboxcode1 from PRODIOBARCODE where pib_inoutno='" + pi_inoutno.Text + "')" + " and pib_inoutno='" + pi_inoutno.Text + "' order by to_number(pib_outboxcode1)";
                         }
-                        Console.WriteLine(sql);
                         DataTable temp = dh.getFieldsDatasByCondition(sql);
                         temp.Columns[0].ColumnName = MidDoc.Variables.FreeVariables.Item(j + 1).Name;
                         AllMidBoxCacheData.Add(temp);