From 07a8639a614379f78d2d98b87e9104d75df2010e Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期六, 06 五月 2023 17:17:47 +0800
Subject: [PATCH] 1

---
 ExportMap/cs/TerraUtils.cs  |    5 +++--
 ExportMap/db/PubDBHelper.cs |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ExportMap/cs/TerraUtils.cs b/ExportMap/cs/TerraUtils.cs
index 528594d..a2b853f 100644
--- a/ExportMap/cs/TerraUtils.cs
+++ b/ExportMap/cs/TerraUtils.cs
@@ -1,4 +1,5 @@
-锘縰sing ExportMap.Models;
+锘縰sing ExportMap.db;
+using ExportMap.Models;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -200,7 +201,7 @@
         /// </summary>
         private static int InsertToDB(List<SysMeta> metas, XYZArgs args)
         {
-
+            if (PubDBHelper.IsPublish(args.dircode, "DEM")) return 0;
 
             return 0;
         }
diff --git a/ExportMap/db/PubDBHelper.cs b/ExportMap/db/PubDBHelper.cs
index 3baa47c..f0ac2af 100644
--- a/ExportMap/db/PubDBHelper.cs
+++ b/ExportMap/db/PubDBHelper.cs
@@ -43,9 +43,9 @@
         /// <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);

--
Gitblit v1.9.3