From a12c2baf8246d0af0e15756b7e008ded544e9b1c Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 02 八月 2023 10:17:04 +0800 Subject: [PATCH] 1 --- ExportMap/cs/XYZUtils.cs | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ExportMap/cs/XYZUtils.cs b/ExportMap/cs/XYZUtils.cs index 96d9f47..76c4d64 100644 --- a/ExportMap/cs/XYZUtils.cs +++ b/ExportMap/cs/XYZUtils.cs @@ -162,7 +162,20 @@ /// </summary> private static int InsertToDB(List<SysMeta> metas, XYZArgs args, string path) { - if (PubDBHelper.IsPublish(args.dircode)) return 1; + //if (PubDBHelper.IsPublish(args.dircode, "DOM")) return 1; + int pubid = PubDBHelper.GetPushlishId(args.dircode, "DOM"); + if (pubid > 0) // 鏇存柊鍙戝竷 + { + List<int> ids = PubDBHelper.GetPublishMetaId(pubid); + foreach (SysMeta m in metas) + { + if (!ids.Contains(m.id)) PubDBHelper.InsertMetaPub(m.id, pubid, args.userId); + } + string geom = GetPointZ(args); + PubDBHelper.UpdatePublish(pubid, args.name, args.userId, geom); + + return pubid; + } SysMeta meta = metas[0]; meta.type = "DOM"; @@ -171,7 +184,7 @@ SysPublish sys = Tools.NewPublish(meta, args, GetReleaseUrl(args.dircode), path); sys.geom = GetPointZ(args); - int pubid = PubDBHelper.InsertPublish(sys); + pubid = PubDBHelper.InsertPublish(sys); if (pubid > 0) { sys.id = pubid; -- Gitblit v1.9.3