管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-08-02 bff584de802c085aeb6d18fc08557c4b68bbbecb
JavaCode/FrmSys.cs
@@ -38,7 +38,7 @@
        private void btnReadTab_Click(object sender, EventArgs e)
        {
            string txtTab = this.txtTabPre.Text.Trim();
            string sql = "select c.relname \"tab\", cast(obj_description(c.oid) as varchar) \"desc\", a.attnum \"num\", a.attname \"col\", t.typname \"type\", d.description \"bak\" from pg_attribute a left join pg_description d on d.objoid = a.attrelid and d.objsubid = a.attnum left join pg_class c on a.attrelid = c.oid left join pg_type t on a.atttypid = t.oid where a.attnum >= 0 and c.relname like '" + txtTab + "%' and obj_description(c.oid) is not null and relnamespace=" + this.txtNS.Text.Trim() + " order by c.relname desc, a.attnum asc";
            string sql = "select c.relname \"tab\", cast(obj_description(c.oid) as varchar) \"desc\", a.attnum \"num\", a.attname \"col\", t.typname \"type\", d.description \"bak\" from pg_attribute a left join pg_description d on d.objoid = a.attrelid and d.objsubid = a.attnum left join pg_class c on a.attrelid = c.oid left join pg_type t on a.atttypid = t.oid where a.attnum >= 0 and c.relname like '" + txtTab + "%' and attname not like '%pg.dropped%' and obj_description(c.oid) is not null and relnamespace=" + this.txtNS.Text.Trim() + " order by c.relname desc, a.attnum asc";
            DataTable dt = _dbHelper.GetDataTable(sql, null);
@@ -111,7 +111,8 @@
            string colType = GetJavaType(selectTabInfo);
            string colName = NameConvert(selectTabInfo.col, false);
            string testExpr = colName + " != null";
            string testWhere = selectTabInfo.col + (colType == "String" ? " like " : " = ") + "#{" + colName + "}";
            //string testWhere = selectTabInfo.col + (colType == "String" ? " like " : " = ") + "#{" + colName + "}";
            string testWhere = (colType == "String" ? "upper(" + selectTabInfo.col + ") like " : selectTabInfo.col + " = ") + "#{" + colName + "}";
            string insertCols = GetInsertCols(tabs);
            string insertVal = GetInsertVal(tabs);
@@ -549,7 +550,7 @@
            //string where = isString ? "\r\n        " + colName + " = \"%\" + (StringHelper.isNull(" + colName + ") ? \"\" : " + colName + ".trim()) + \"%\";\r\n" : "";
            //string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.isNull(" + colName + ") ? null : \"%\" + " + colName + ".trim() + \"%\";\r\n" : "";
            string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.getLikeStr(" + colName + ");\r\n" : "";
            string where = colType == "String" ? "\r\n        " + colName + " = StringHelper.getLikeUpperStr(" + colName + ");\r\n" : "";
            string xml = File.ReadAllText(Path.Combine(baseDir, "SysTemplate\\Service.java"));
            xml = xml