Browse Source

优化spi过站

yhluo 4 months ago
parent
commit
1973c72a5d
1 changed files with 11 additions and 0 deletions
  1. 11 0
      UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

+ 11 - 0
UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

@@ -993,6 +993,17 @@ namespace UAS_MES_NEW.Make
                         ishave_sn = dt.Rows[0]["pr_tm_user"].ToString().Trim();
                     }
 
+                    if (string.IsNullOrEmpty(ishave_sn))
+                    {
+                        sql.Clear();
+                        sql.Append($"SELECT b.pr_tm_user FROM make a, product b WHERE a.ma_code = '{item.Work_order}' AND a.ma_prodcode = b.pr_code");
+                        dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            ishave_sn = dt.Rows[0]["pr_tm_user"].ToString().Trim();
+                        }
+                    }
+
                     if (ishave_sn == "是")
                     {
                         if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, item.SN, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))