Browse Source

中盒和外箱附加参数

章政 7 years ago
parent
commit
44ce72ad27
1 changed files with 33 additions and 0 deletions
  1. 33 0
      UAS-出货标签管理/UAS_出货标签管理.cs

+ 33 - 0
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1765,6 +1765,17 @@ namespace UAS_LabelMachine
                                         MidDoc.Variables.FreeVariables.Item(j + 1).Value = dr[0][MidDoc.Variables.FreeVariables.Item(j + 1).Name].ToString();
                                     }
                                 }
+                                if (MidDoc.Variables.FreeVariables.Item(j + 1).Value == "")
+                                {
+                                    try
+                                    {
+                                        MidDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
+                                    }
+                                    catch (Exception ex)
+                                    {
+                                        LogManager.DoLog(ex.StackTrace);
+                                    }
+                                }
                                 LogManager.DoLog("打印参数【" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + MidDoc.Variables.FreeVariables.Item(j + 1).Value);
                             }
                         }
@@ -1840,6 +1851,17 @@ namespace UAS_LabelMachine
                                     }
                                     MidDoc.Variables.FreeVariables.Item(j + 1).Value = dh.GetLabelParam(sql).ToString();
                                 }
+                                if (MidDoc.Variables.FreeVariables.Item(j + 1).Value == "")
+                                {
+                                    try
+                                    {
+                                        MidDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
+                                    }
+                                    catch (Exception ex)
+                                    {
+                                        LogManager.DoLog(ex.StackTrace);
+                                    }
+                                }
                                 LogManager.DoLog("打印参数【" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + MidDoc.Variables.FreeVariables.Item(j + 1).Value);
                             }
                         }
@@ -1913,6 +1935,17 @@ namespace UAS_LabelMachine
                                         ExeSQL = ExeSQL.Replace("{pib_outboxcode2}", "'" + pib_outboxcode2 + "'");
                                         OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value = dh.GetLabelParam(ExeSQL).ToString();
                                     }
+                                    if (OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value == "")
+                                    {
+                                        try
+                                        {
+                                            OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
+                                        }
+                                        catch (Exception ex)
+                                        {
+                                            LogManager.DoLog(ex.StackTrace);
+                                        }
+                                    }
                                     LogManager.DoLog("打印参数【" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + ExeSQL + ",取到值" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value);
                                 }
                                 catch (Exception)