Hcsy 8 years ago
parent
commit
d7d0cf39e6
1 changed files with 3 additions and 2 deletions
  1. 3 2
      UAS-MES/FunctionCode/Make/Make_Decompose.cs

+ 3 - 2
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -259,7 +259,7 @@ namespace UAS_MES.Make
                             }
                             dtbar = new DataTable();
                             sql.Clear();
-                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,sp_fsoncode,max(sp_barcoderule)");
+                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,sp_fsoncode,max(sp_barcoderule)");
                             sql.Append("sp_barcoderule,sp_tracekind,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
                             sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
                             sql.Append("sp_regex,max(pr_detail)pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");
@@ -276,11 +276,12 @@ namespace UAS_MES.Make
                                 string sp_prefix = dtbar.Rows[0]["sp_prefix"].ToString();
                                 string sp_fsoncode = dtbar.Rows[0]["sp_fsoncode"].ToString();
                                 string length = dtbar.Rows[0]["sp_length"].ToString();
+                                string sp_ifrepeat = dtbar.Rows[0]["sp_ifrepeat"].ToString();
                                 string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
                                 if (sp_tracekind == "1")
                                 {
                                     //上料校验规则判断
-                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
+                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, out ErrorMessage))
                                     {
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                         LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));