/// <summary>
        /// 转换函数的参数
        /// </summary>
        /// <param name="bcpTable"></param>
        /// <param name="lstBcpNodes"></param>
        /// <param name="xmldoc"></param>
        /// <param name="tn"></param>
        /// <param name="col"></param>
        /// <param name="tmpTable"></param>
        /// <param name="dr"></param>
        /// <param name="paramJson"></param>
        /// <returns></returns>
        private static object[] GetConverterParams(BcpTable bcpTable, List <BcpNode> lstBcpNodes, XmlDocument xmldoc, XmlNode tn, BcpColumn col, DataTable tmpTable, DataRow dr, string paramJson)
        {
            BcpConverterParam[] param = BcpConverterParam.ToConverterParams(paramJson);
            if (param.IsValid())
            {
                object[] result = new object[param.Length];
                int      index  = 0;
                foreach (BcpConverterParam p in param)
                {
                    object pk = null;
                    if (p.FK == BcpForeignKey.None && tmpTable.Columns.Contains(p.FKProperty)) //当前表中的列
                    {
                        pk = dr[p.FKProperty];
                    }
                    else
                    {
                        XmlNode fn = ToXmlNode(tn, p.FKNode);  //外键关联节点
                        if (fn != null)
                        {
                            var fkNode = lstBcpNodes.FirstOrDefault(bn => bn.XmlNode == fn);
                            if (fkNode != null)
                            {
                                if (p.FK == BcpForeignKey.Merge)
                                {
                                    pk = fkNode.DataTable != null ? fkNode.DataTable.Rows[0][p.FKProperty].ToSafeString() : null;
                                }
                                else if (p.FK == BcpForeignKey.NodeText) //该列的数据为TreeNode节点显示的文本
                                {
                                    pk = fkNode.TreeNode.Text;
                                }
                                else if (p.FK == BcpForeignKey.Constant) //该列的数据为常量数据
                                {
                                    pk = GetConstant(bcpTable, lstBcpNodes, col, p.FKProperty);
                                }
                                else if (p.FK == BcpForeignKey.Row) //该行的属性
                                {
                                    if (p.FKProperty == "rowid")
                                    {
                                        pk = (dr.Table.Rows.IndexOf(dr) + 1).ToString("D32");
                                    }
                                    else
                                    {
                                        if (tmpTable.Columns.Contains(p.FKProperty))
                                        {
                                            pk = dr[p.FKProperty];
                                        }
                                    }
                                }
                            }
                        }
                    }

                    result[index++] = pk;
                }

                return(result);
            }
            else
            {
                return(null);
            }
        }
 private static string GetConstant(BcpTable bcpTable, List <BcpNode> lstBcpNodes, BcpColumn col, string key)
 {
     switch (key)
     {
     case "AppName":         //获取应用信息,如"QQ"
         return(bcpTable.AppName);
     }
     return(key);
 }