| src/main/java/com/dji/sample/patches/xml/utils/CreateWaylineFileUtils.java | ●●●●● patch | view | raw | blame | history | |
| src/main/resources/application-dev.yml | ●●●●● patch | view | raw | blame | history | |
| src/main/resources/application-prod.yml | ●●●●● patch | view | raw | blame | history |
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); } /** src/main/resources/application-dev.yml
@@ -90,7 +90,15 @@ Patches: url: path: unzip: D:/tmp/ unzip: D:\\tmp\\ kmz: destKMZFile: src/main/resources/template/kmz/ sourceDir: src/main/resources/template/wpmz/ destKMZFile: src\\main\\resources\\template\\kmz\\ sourceDir: src\\main\\resources\\template\\wpmz\\ xml: temple: template: src\\main\\resources\\template\\template.xml waylines: src\\main\\resources\\template\\waylines.xml target: template: src\\main\\resources\\template\\wpmz\\template.kml waylines: src\\main\\resources\\template\\wpmz\\waylines.wpml src/main/resources/application-prod.yml
@@ -93,7 +93,15 @@ Patches: url: path: unzip: /home/drone/server/temp unzip: /home/drone/server/temp/ kmz: destKMZFile: /home/drone/server/template/kmz/ sourceDir: /home/drone/server/template/wpmz/ #解析图斑航线模板的地址 xml: temple: template: home/drone/server/template/template.xml waylines: home/drone/server/template/waylines.xml target: template: home/drone/server/template/wpmz/template.kml waylines: home/drone/server/template/wpmz/waylines.wpml