| | |
| | | using ExportMap.Models; |
| | | using ExportMap.db; |
| | | using ExportMap.Models; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | |
| | | /// </summary> |
| | | private static int InsertToDB(List<SysMeta> metas, XYZArgs args) |
| | | { |
| | | |
| | | if (PubDBHelper.IsPublish(args.dircode, "DEM")) return 0; |
| | | |
| | | return 0; |
| | | } |
| | |
| | | /// <summary> |
| | | /// 是/否发布过 |
| | | /// </summary> |
| | | public static bool IsPublish(string dirid) |
| | | public static bool IsPublish(string dirid, string type = "DOM") |
| | | { |
| | | string sql = "select count(*) from lf.sys_meta_pub a inner join lf.sys_publish b on a.pubid = b.id where b.type = 'DOM' and b.dirid = @dirid"; |
| | | string sql = string.Format("select count(*) from lf.sys_meta_pub a inner join lf.sys_publish b on a.pubid = b.id where b.type = '{0}' and b.dirid = @dirid", type); |
| | | DbParameter dp = new NpgsqlParameter("@dirid", dirid); |
| | | |
| | | object obj = Tools.DBHelper.GetScalar(sql, dp); |