Browse Source

修改管控类型

章政 8 years ago
parent
commit
c52adcd3be
1 changed files with 5 additions and 5 deletions
  1. 5 5
      UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

+ 5 - 5
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -217,7 +217,7 @@ namespace UAS_MES.Make
                         string length = dt1.Rows[RemainIndex]["sp_length"].ToString();
                         string sp_id = dt1.Rows[RemainIndex]["sp_id"].ToString();
                         string sp_ifforsn = dt1.Rows[RemainIndex]["sp_ifforsn"].ToString();
-                        string pr_tracekind = dt1.Rows[RemainIndex]["pr_tracekind"].ToString();
+                        string sp_tracekind = dt1.Rows[RemainIndex]["sp_tracekind"].ToString();
                         int sp_length = int.Parse(length != "" ? length : "0");
                         if (dt1.Rows[RemainIndex]["sp_type"].ToString() == "物料")
                         {
@@ -235,7 +235,7 @@ namespace UAS_MES.Make
                                 else OperateResult.AppendText(">>序列号不存在\n", Color.Red);
                             }
                             //单件管控物料
-                            else if (pr_tracekind == "1")
+                            else if (sp_tracekind == "1")
                             {
                                 dt = (DataTable)dh.ExecuteSql("select bar_prodcode,bar_code from barcode where bar_code='" + code.Text + "'", "select");
                                 if (dt.Rows.Count > 0)
@@ -254,7 +254,7 @@ namespace UAS_MES.Make
                                 else OperateResult.AppendText(">>条码不存在\n", Color.Red, code);
                             }
                             //不管控
-                            else if (pr_tracekind == "0")
+                            else if (sp_tracekind == "0")
                             {
                                 //进行前缀匹配
                                 if (code.Text.Substring(0, sp_prefix.Length) == sp_prefix || sp_prefix == "")
@@ -370,11 +370,11 @@ namespace UAS_MES.Make
                         //单独用一个DataTable存储一个
                         dt1 = new DataTable();
                         sql.Clear();
-                        sql.Append("select sp_id,sp_prefix,sp_ifuseregex,sp_ifforsn,sp_length,sp_description,sp_soncode,pr_tracekind,pr_detail,pr_spec,sp_repcode,pr_id,");
+                        sql.Append("select sp_id,sp_tracekind,sp_prefix,sp_ifuseregex,sp_ifforsn,sp_length,sp_description,sp_soncode,pr_detail,pr_spec,sp_repcode,pr_id,");
                         sql.Append("sp_type,case when (sp_type='物料' and sp_soncode=pr_code) then '已采集' else '未采集' end sp_ifpick ,sp_prefix,");
                         sql.Append("sp_length,sp_regex,sp_ifforsn from stepproduct left join product on pr_code=sp_soncode where sp_bomversion='" + ma_bomversion + "' and ");
                         sql.Append("sp_craftcode='" + ms_craftcode + "' and sp_stepcode='" + User.CurrentStepCode + "' And sp_mothercode ='" + make_prodcode + "' ");
-                        sql.Append("and((sp_type = '物料' and( pr_tracekind <> 2 or pr_tracekind is null))or sp_type <> '物料') order by SP_DETNO asc");
+                        sql.Append("and((sp_type = '物料' and( sp_tracekind <> 2 or sp_tracekind is null))or sp_type <> '物料') order by SP_DETNO asc");
                         dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         sn_code.Text = code.Text;
                         code.Clear();