From 6545b0cb0817378cff3b20d962d4c4f0d51f2207 Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Thu, 11 Apr 2024 09:39:28 +0800
Subject: [PATCH] 完善图斑线上配置

---
 src/main/java/com/dji/sample/patches/xml/utils/CreateWaylineFileUtils.java |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/dji/sample/patches/xml/utils/CreateWaylineFileUtils.java b/src/main/java/com/dji/sample/patches/xml/utils/CreateWaylineFileUtils.java
index 0bd0cb8..a7f1cfc 100644
--- a/src/main/java/com/dji/sample/patches/xml/utils/CreateWaylineFileUtils.java
+++ b/src/main/java/com/dji/sample/patches/xml/utils/CreateWaylineFileUtils.java
@@ -3,6 +3,7 @@
 import com.dji.sample.patches.xml.mode.XMLTemplateModel;
 import freemarker.template.Configuration;
 import freemarker.template.Template;
+import org.springframework.beans.factory.annotation.Value;
 import lombok.extern.slf4j.Slf4j;
 
 import java.io.*;
@@ -17,13 +18,27 @@
 @Slf4j
 public class CreateWaylineFileUtils {
 
+    @Value("${xml.temple.template}")
+    static String templeFilePath;
+    @Value("${xml.temple.waylines}")
+    static String waylineFilePath;
+
+    @Value("${xml.target.template}")
+    static String targetTempleFilePath;
+    @Value("${xml.target.waylines}")
+    static String targetWaylineFilePath;
     /**
      * 生成航线文件
      * @param xmlModel
      */
     public static void createWaylineFile(XMLTemplateModel xmlModel) {
-        xml2XmlDoc(xmlModel, "home\\drone\\server\\template\\template.xml", "home\\drone\\server\\template\\wpmz\\template.kml");
-        xml2XmlDoc(xmlModel, "home\\drone\\server\\template\\waylines.xml", "home\\drone\\server\\template\\wpmz\\waylines.wpml");
+
+
+//        xml2XmlDoc(xmlModel, "home\\drone\\server\\template\\template.xml", "home\\drone\\server\\template\\wpmz\\template.kml");
+//        xml2XmlDoc(xmlModel, "home\\drone\\server\\template\\waylines.xml", "home\\drone\\server\\template\\wpmz\\waylines.wpml");
+
+        xml2XmlDoc(xmlModel, templeFilePath, targetTempleFilePath);
+        xml2XmlDoc(xmlModel, waylineFilePath, targetWaylineFilePath);
     }
 
     /**

--
Gitblit v1.9.3