From 8f93e0f36fdf1a14e4a2342188fe40ab0bb05a76 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 13 六月 2023 13:55:11 +0800
Subject: [PATCH] cpt发布名称不完整

---
 ExportMap/Controllers/ConvertController.cs |    9 +++++++++
 ExportMap/db/PubDBHelper.cs                |    3 ++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ExportMap/Controllers/ConvertController.cs b/ExportMap/Controllers/ConvertController.cs
index 303acd2..80b2037 100644
--- a/ExportMap/Controllers/ConvertController.cs
+++ b/ExportMap/Controllers/ConvertController.cs
@@ -11,6 +11,15 @@
 {
     public class ConvertController : ApiController
     {
+        [HttpGet]
+        public string Test()
+        {
+            string name = "8-鐟炰附绔�0.05m.cpt";
+            string cnName = name.Substring(0, name.LastIndexOf("."));
+
+            return cnName;
+        }
+
         /// <summary>
         /// 杞崲涓篢ileset
         /// </summary>
diff --git a/ExportMap/db/PubDBHelper.cs b/ExportMap/db/PubDBHelper.cs
index 0ba4f9e..a710025 100644
--- a/ExportMap/db/PubDBHelper.cs
+++ b/ExportMap/db/PubDBHelper.cs
@@ -83,7 +83,8 @@
         public static int InsertLayer(SysPublish sys, SysMeta meta, double elev = 0)
         {
             int pid = SelectLayerPid(sys, meta);
-            string cnName = meta.name.Split(new char[] { '.' })[0];
+            //string cnName = meta.name.Split(new char[] { '.' })[0];
+            string cnName = meta.name.Substring(0, meta.name.LastIndexOf("."));
             string data = getData(meta);
             string serve = getServe(meta);
 

--
Gitblit v1.9.3