ard-admin/src/main/java/com/ard/web/controller/route/ArdRouteFileController.java
@@ -3,6 +3,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson2.JSON; import com.ard.common.annotation.Log; import com.ard.common.core.controller.BaseController; import com.ard.common.core.domain.AjaxResult; @@ -13,16 +14,10 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*; import com.ard.route.domain.route.ArdRouteFile; import com.ard.route.service.IArdRouteFileService; import org.springframework.web.multipart.MultipartFile; /** * 文件Controller @@ -79,10 +74,15 @@ @ApiOperation("新增文件") @PreAuthorize("@ss.hasPermi('route:file:add')") @Log(title = "文件", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdRouteFile ardRouteFile) { //@PostMapping("/addFile/{folderId}") @PostMapping("/addFile") public AjaxResult add(@RequestPart("file") MultipartFile file) //@PathVariable String folderId) { ArdRouteFile ardRouteFile = new ArdRouteFile(); ardRouteFile.setCreateBy(getUsername()); return toAjax(ardRouteFileService.insertArdRouteFile(ardRouteFile)); //ardRouteFile.setFolderId(folderId); return toAjax(ardRouteFileService.insertArdRouteFile(ardRouteFile, file)); } /** ard-admin/src/main/java/com/ard/web/controller/route/ArdRouteFolderController.java
@@ -43,10 +43,10 @@ * 查询文件夹列表 */ @ApiOperation("查询文件夹列表") @PreAuthorize("@ss.hasPermi('route:folder:list')") //@PreAuthorize("@ss.hasPermi('route:folder:list')") @GetMapping("/list") public TableDataInfo list(ArdRouteFolder ardRouteFolder) { startPage(); //startPage(); List<ArdRouteFolder> list = ardRouteFolderService.selectArdRouteFolderList(ardRouteFolder); return getDataTable(list); } @@ -55,7 +55,7 @@ * 导出文件夹列表 */ @ApiOperation("导出文件夹列表") @PreAuthorize("@ss.hasPermi('route:folder:export')") //@PreAuthorize("@ss.hasPermi('route:folder:export')") @Log(title = "文件夹", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdRouteFolder ardRouteFolder) { @@ -68,7 +68,7 @@ * 获取文件夹详细信息 */ @ApiOperation("获取文件夹详细信息") @PreAuthorize("@ss.hasPermi('route:folder:query')") //@PreAuthorize("@ss.hasPermi('route:folder:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardRouteFolderService.selectArdRouteFolderById(id)); @@ -78,7 +78,7 @@ * 新增文件夹 */ @ApiOperation("新增文件夹") @PreAuthorize("@ss.hasPermi('route:folder:add')") //@PreAuthorize("@ss.hasPermi('route:folder:add')") @Log(title = "文件夹", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdRouteFolder ardRouteFolder) { @@ -90,7 +90,7 @@ * 修改文件夹 */ @ApiOperation("修改文件夹") @PreAuthorize("@ss.hasPermi('route:folder:edit')") //@PreAuthorize("@ss.hasPermi('route:folder:edit')") @Log(title = "文件夹", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdRouteFolder ardRouteFolder) { @@ -102,7 +102,7 @@ * 删除文件夹 */ @ApiOperation("删除文件夹") @PreAuthorize("@ss.hasPermi('route:folder:remove')") //@PreAuthorize("@ss.hasPermi('route:folder:remove')") @Log(title = "文件夹", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { ard-admin/src/main/java/com/ard/web/controller/route/ArdRouteInformationController.java
@@ -19,6 +19,8 @@ import com.ard.common.core.page.TableDataInfo; import org.springframework.web.multipart.MultipartFile; import static com.ard.common.core.domain.AjaxResult.success; /** * 航线(kmz)Controller * @@ -37,7 +39,7 @@ * 查询航线(kmz)列表 */ @ApiOperation("查询航线(kmz)列表") @PreAuthorize("@ss.hasPermi('route:information:list')") //@PreAuthorize("@ss.hasPermi('route:information:list')") @GetMapping("/list") public TableDataInfo list(ArdRouteInformation ardRouteInformation) { startPage(); @@ -49,7 +51,7 @@ * 导出航线(kmz)列表 */ @ApiOperation("导出航线(kmz)列表") @PreAuthorize("@ss.hasPermi('route:information:export')") //@PreAuthorize("@ss.hasPermi('route:information:export')") @Log(title = "航线(kmz)", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdRouteInformation ardRouteInformation) { @@ -62,7 +64,7 @@ * 获取航线(kmz)详细信息 */ @ApiOperation("获取航线(kmz)详细信息") @PreAuthorize("@ss.hasPermi('route:information:query')") //@PreAuthorize("@ss.hasPermi('route:information:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardRouteInformationService.selectArdRouteInformationById(id)); @@ -72,19 +74,19 @@ * 新增航线(kmz) */ @ApiOperation("新增航线(kmz)") @PreAuthorize("@ss.hasPermi('route:information:add')") //@PreAuthorize("@ss.hasPermi('route:information:add')") @Log(title = "航线(kmz)", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdRouteInformation ardRouteInformation) { ardRouteInformation.setCreateBy(getUsername()); return toAjax(ardRouteInformationService.insertArdRouteInformation(ardRouteInformation)); return success(ardRouteInformationService.insertArdRouteInformation(ardRouteInformation)); } /** * 修改航线(kmz) */ @ApiOperation("修改航线(kmz)") @PreAuthorize("@ss.hasPermi('route:information:edit')") //@PreAuthorize("@ss.hasPermi('route:information:edit')") @Log(title = "航线(kmz)", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdRouteInformation ardRouteInformation) { @@ -96,7 +98,7 @@ * 删除航线(kmz) */ @ApiOperation("删除航线(kmz)") @PreAuthorize("@ss.hasPermi('route:information:remove')") //@PreAuthorize("@ss.hasPermi('route:information:remove')") @Log(title = "航线(kmz)", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { @@ -107,7 +109,7 @@ * 导入航线(kmz)文件 */ @ApiOperation("导入航线(kmz)文件") @PreAuthorize("@ss.hasPermi('route:information:upload')") //@PreAuthorize("@ss.hasPermi('route:information:upload')") @PostMapping("/upload") public AjaxResult upload(@RequestPart("file") MultipartFile file) { MinioUploadResult minioUploadResult = ardRouteInformationService.uploadArdRouteInformation(file); ard-admin/src/main/java/com/ard/web/controller/route/UavRouteController.java
@@ -50,7 +50,7 @@ @ApiOperation("解析kmz文件") @PreAuthorize("@ss.hasPermi('route:kmz:parseKmz')") @PostMapping("/parseKmz") public AjaxResult parseKmz(@RequestParam("fileUrl") String fileUrl) throws IOException { public AjaxResult parseKmz(@RequestParam("fileUrl") String fileUrl){ return success(routeService.parseKmz(fileUrl)); } ard-route/src/main/java/com/ard/route/domain/ActionGroupReq.java
New file @@ -0,0 +1,44 @@ package com.ard.route.domain; import lombok.Data; import java.io.Serializable; import java.util.List; /** * Author:Cleaner * Date: 2024/12/22 10:46 **/ @Data public class ActionGroupReq implements Serializable { /** * 动作组编号 */ private Integer actionGroupId; /** * 动作组开始生效的航点 */ private Integer actionGroupStartIndex; /** * 动作组结束生效的航点 */ private Integer actionGroupEndIndex; /** * 动作触发器类型 */ private String actionTriggerType; /** * 动作触发器参数 */ private Double actionTriggerParam; /** * 动作列表 */ private List<PointActionReq> actions; } ard-route/src/main/java/com/ard/route/domain/ActionTriggerReq.java
File was deleted ard-route/src/main/java/com/ard/route/domain/CoordinatePointReq.java
@@ -5,7 +5,7 @@ import java.io.Serializable; /** * Author:songjian * Author:xia * Date: 2024/12/22 10:46 **/ @Data ard-route/src/main/java/com/ard/route/domain/MappingTypeReq.java
@@ -6,7 +6,7 @@ import java.util.List; /** * Author:songjian * Author:xia * Date: 2024/12/22 10:46 **/ @Data ard-route/src/main/java/com/ard/route/domain/PointActionReq.java
@@ -8,8 +8,6 @@ @Data public class PointActionReq implements Serializable { // @Serial // private static final long serialVersionUID = -1234025611387201652L; /** * 动作编号 */ @@ -65,4 +63,14 @@ */ private Boolean stopRecord; /** * 拍照名称 */ private String fileSuffix; /** * 录像名称 */ private String panoShotSubMode; } ard-route/src/main/java/com/ard/route/domain/RoutePointReq.java
@@ -51,28 +51,6 @@ /** * 航点动作列表 */ private List<PointActionReq> actions; /** * 航点动作触发 */ private ActionTriggerReq actionTriggerReq; /** * 等时拍照间隔时间 单位s */ private Double timeInterval; /** * 等距拍照间隔距离 单位m */ private Double distanceInterval; /** * 停止间隔拍照航点编号 */ private Integer endIntervalRouteIndex; private List<ActionGroupReq> actionGroupList; } ard-route/src/main/java/com/ard/route/domain/UavRouteReq.java
@@ -6,7 +6,7 @@ import java.util.List; /** * Author:songjian * Author:xia * Date: 2024/12/22 10:46 **/ @Data @@ -112,4 +112,9 @@ */ private MappingTypeReq mappingTypeReq; /** * 航线初始动作列表 */ private List<PointActionReq> startActionList; } ard-route/src/main/java/com/ard/route/domain/WaypointHeadingReq.java
@@ -5,7 +5,7 @@ import java.io.Serializable; /** * Author:songjian * Author:xia * Date: 2024/12/22 13:05 **/ @Data ard-route/src/main/java/com/ard/route/domain/WaypointTurnReq.java
@@ -5,7 +5,7 @@ import java.io.Serializable; /** * Author:songjian * Author:xia * Date: 2024/12/22 13:05 **/ @Data ard-route/src/main/java/com/ard/route/domain/kml/KmlFolder.java
@@ -51,6 +51,6 @@ private String waylineId; @XStreamAlias("wpml:startActionGroup") private KmlActionGroup actionGroup; private KmlActionGroup startActionGroup; } ard-route/src/main/java/com/ard/route/domain/kml/KmlMappingHeadingParam.java
New file @@ -0,0 +1,18 @@ package com.ard.route.domain.kml; import com.fasterxml.jackson.annotation.JsonInclude; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; @Data @XStreamAlias("wpml:mappingHeadingParam") @JsonInclude(JsonInclude.Include.NON_NULL) public class KmlMappingHeadingParam { @XStreamAlias("wpml:mappingHeadingMode") private String mappingHeadingMode; @XStreamAlias("wpml:actionActuatorFunc") private String actionActuatorFunc; } ard-route/src/main/java/com/ard/route/domain/kml/KmlParams.java
@@ -1,6 +1,7 @@ package com.ard.route.domain.kml; import com.ard.route.domain.MappingTypeReq; import com.ard.route.domain.PointActionReq; import com.ard.route.domain.WaypointHeadingReq; import com.ard.route.domain.WaypointTurnReq; import lombok.Data; @@ -89,9 +90,17 @@ */ private MappingTypeReq mappingTypeReq; /** * 航点列表 */ private List<RoutePointInfo> routePointList; /** * 航线初始动作列表 */ private List<PointActionReq> startActionList; /** * 飞向首航点模式 * safely:安全模式 * pointToPoint:倾斜飞行模式 ard-route/src/main/java/com/ard/route/domain/kml/KmlPlacemark.java
@@ -1,10 +1,14 @@ package com.ard.route.domain.kml; import com.fasterxml.jackson.annotation.JsonInclude; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import java.util.List; @Data @XStreamAlias("Placemark") @JsonInclude(JsonInclude.Include.NON_NULL) public class KmlPlacemark { @XStreamAlias("wpml:isRisky") @@ -50,7 +54,7 @@ private String gimbalPitchAngle; @XStreamAlias("wpml:actionGroup") private KmlActionGroup actionGroup; private List<KmlActionGroup> actionGroup; // 下面 wpml 文件使用 @XStreamAlias("wpml:executeHeight") @@ -84,18 +88,24 @@ @XStreamAlias("wpml:overlap") private KmlOverlap overlap; @XStreamAlias("wpml:ovefacadeWaylineEnablerlap") @XStreamAlias("wpml:facadeWaylineEnable") private String facadeWaylineEnable; @XStreamAlias("Polygon") private KmlPolygon polygon; @XStreamAlias("wpml:mappingHeadingParam") private KmlActionGroup mappingHeadingParam; private KmlMappingHeadingParam mappingHeadingParam; @XStreamAlias("wpml:gimbalPitchMode") private String gimbalPitchMode; @XStreamAlias("wpml:quickOrthoMappingEnable") private String quickOrthoMappingEnable; @XStreamAlias("wpml:quickOrthoMappingEnable") private String quickOrthoMappingPitch; // 倾斜摄影模板元素 @XStreamAlias("wpml:inclinedGimbalPitch") private String inclinedGimbalPitch; ard-route/src/main/java/com/ard/route/domain/kml/RoutePointInfo.java
@@ -1,6 +1,6 @@ package com.ard.route.domain.kml; import com.ard.route.domain.PointActionReq; import com.ard.route.domain.ActionGroupReq; import com.ard.route.domain.WaypointHeadingReq; import com.ard.route.domain.WaypointTurnReq; import lombok.Data; @@ -54,7 +54,7 @@ /** * 航点动作列表 */ private List<PointActionReq> actions; private List<ActionGroupReq> actionGroupList; /** * 是否首尾航点(首尾航点不能是协调转弯类型) ard-route/src/main/java/com/ard/route/domain/route/ArdRouteInformation.java
@@ -2,6 +2,7 @@ import com.ard.common.annotation.Excel; import com.ard.common.core.domain.BaseEntity; import com.ard.route.domain.UavRouteReq; import lombok.Data; /** @@ -38,4 +39,15 @@ @Excel(name = "Minio文件路径") private String minioUpPath; /** 飞行器 */ private String aircraft; /** 飞行器型号 */ private String aircraftModel; /** * 生成kmz文件实体类 */ private UavRouteReq uavRouteReq; } ard-route/src/main/java/com/ard/route/domain/vo/KmzResultVo.java
New file @@ -0,0 +1,16 @@ package com.ard.route.domain.vo; import lombok.Data; @Data public class KmzResultVo { private String fileNameNew; private String minioUpPath; private String upPath; private Double upFileSize; } ard-route/src/main/java/com/ard/route/service/IArdRouteFileService.java
@@ -1,7 +1,10 @@ package com.ard.route.service; import java.io.File; import java.io.IOException; import java.util.List; import com.ard.route.domain.route.ArdRouteFile; import org.springframework.web.multipart.MultipartFile; /** * 文件Service接口 @@ -33,7 +36,7 @@ * @param ardRouteFile 文件 * @return 结果 */ public int insertArdRouteFile(ArdRouteFile ardRouteFile); public int insertArdRouteFile(ArdRouteFile ardRouteFile, MultipartFile file); /** * 修改文件 ard-route/src/main/java/com/ard/route/service/IArdRouteInformationService.java
@@ -36,7 +36,7 @@ * @param ardRouteInformation 航线(kmz) * @return 结果 */ public int insertArdRouteInformation(ArdRouteInformation ardRouteInformation); public String insertArdRouteInformation(ArdRouteInformation ardRouteInformation); /** * 修改航线(kmz) ard-route/src/main/java/com/ard/route/service/UavRouteService.java
@@ -2,6 +2,7 @@ import com.ard.route.domain.UavRouteReq; import com.ard.route.domain.vo.KmzInfoVO; import com.ard.route.domain.vo.KmzResultVo; import java.io.IOException; @@ -16,11 +17,11 @@ /** * 生成kmz文件(带航点) */ public String buildKmz(UavRouteReq uavRouteReq, String fileName); public KmzResultVo buildKmz(UavRouteReq uavRouteReq, String fileName); /** * 解析kmz文件 */ public KmzInfoVO parseKmz(String file) throws IOException; public KmzInfoVO parseKmz(String file); } ard-route/src/main/java/com/ard/route/service/impl/ArdRouteFileServiceImpl.java
@@ -1,15 +1,20 @@ package com.ard.route.service.impl; import java.io.IOException; import java.util.List; import com.ard.common.annotation.DataScope; import com.ard.common.utils.DateUtils; import com.ard.common.utils.uuid.IdUtils; import com.ard.oss.service.impl.OssServiceContext; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ard.route.mapper.ArdRouteFileMapper; import com.ard.route.domain.route.ArdRouteFile; import com.ard.route.service.IArdRouteFileService; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; /** * 文件Service业务层处理 @@ -22,6 +27,9 @@ @Autowired private ArdRouteFileMapper ardRouteFileMapper; @Autowired private OssServiceContext ossService; /** * 查询文件 @@ -53,9 +61,17 @@ * @return 结果 */ @Override public int insertArdRouteFile(ArdRouteFile ardRouteFile) { public int insertArdRouteFile(ArdRouteFile ardRouteFile, MultipartFile file){ ardRouteFile.setId(IdUtils.simpleUUID()); ardRouteFile.setCreateTime(DateUtils.getNowDate()); // 放到默认文件夹 ardRouteFile.setFolderId("0"); try { String url = ossService.upload("kmz",file); ardRouteFile.setFilePath(url); } catch (IOException e) { throw new RuntimeException(e); } return ardRouteFileMapper.insertArdRouteFile(ardRouteFile); } ard-route/src/main/java/com/ard/route/service/impl/ArdRouteFolderServiceImpl.java
@@ -1,5 +1,6 @@ package com.ard.route.service.impl; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -79,6 +80,9 @@ public int insertArdRouteFolder(ArdRouteFolder ardRouteFolder) { ardRouteFolder.setId(IdUtils.simpleUUID()); ardRouteFolder.setCreateTime(DateUtils.getNowDate()); // 获取当前数据条数 int count = ardRouteFolderMapper.selectArdRouteFolderList(null).size(); ardRouteFolder.setSerialNumber(count + 1); return ardRouteFolderMapper.insertArdRouteFolder(ardRouteFolder); } @@ -90,6 +94,10 @@ */ @Override public int updateArdRouteFolder(ArdRouteFolder ardRouteFolder) { // 不能修改默认文件夹 if ("0".equals(ardRouteFolder.getId())) { throw new RuntimeException("不能修改默认文件夹"); } ardRouteFolder.setUpdateTime(DateUtils.getNowDate()); return ardRouteFolderMapper.updateArdRouteFolder(ardRouteFolder); } @@ -103,13 +111,27 @@ @Override @Transactional(rollbackFor = Exception.class) public Map<String, Integer> deleteArdRouteFolderByIds(String[] ids) { // 检查是否包含默认文件夹,不能删除默认文件夹 for (String id : ids) { if ("0".equals(id)) { throw new RuntimeException("不能删除默认文件夹"); } } Map<String, Integer> result = new HashMap<>(); // 删除文件夹的同时也删除文件夹下的所有文件 int fileAdd = ardRouteFileMapper.deleteRouteFileByFolderIds(ids); result.put("file", fileAdd); int folderCount = ardRouteFolderMapper.deleteArdRouteFolderByIds(ids); result.put("folder", folderCount); return result; try { // 先删除文件 int fileCount = ardRouteFileMapper.deleteRouteFileByFolderIds(ids); result.put("file", fileCount); // 再删除文件夹 int folderCount = ardRouteFolderMapper.deleteArdRouteFolderByIds(ids); result.put("folder", folderCount); return result; } catch (Exception e) { throw e; // 抛出异常让事务回滚 } } /** ard-route/src/main/java/com/ard/route/service/impl/ArdRouteInformationServiceImpl.java
@@ -7,11 +7,15 @@ import com.ard.oss.model.MinioUploadResult; import com.ard.oss.service.impl.OssServiceContext; import com.ard.route.domain.route.ArdRouteInformation; import com.ard.route.domain.vo.KmzResultVo; import com.ard.route.service.UavRouteService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ard.route.mapper.ArdRouteInformationMapper; import com.ard.route.service.IArdRouteInformationService; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import static com.ard.route.util.ToolUtils.extractFilePath; import static com.ard.route.util.ToolUtils.getFileNameWithoutExtension; @@ -30,6 +34,9 @@ @Autowired private OssServiceContext ossService; @Autowired private UavRouteService routeService; /** * 查询航线(kmz) @@ -60,10 +67,21 @@ * @return 结果 */ @Override public int insertArdRouteInformation(ArdRouteInformation ardRouteInformation) { public String insertArdRouteInformation(ArdRouteInformation ardRouteInformation) { ardRouteInformation.setId(IdUtils.simpleUUID()); ardRouteInformation.setCreateTime(DateUtils.getNowDate()); return ardRouteInformationMapper.insertArdRouteInformation(ardRouteInformation); if (ardRouteInformation.getUavRouteReq() != null){ } KmzResultVo kmzResult = routeService.buildKmz(ardRouteInformation.getUavRouteReq(), ardRouteInformation.getFileName()); // 将KmzResult中的信息设置到ardRouteInformation中 ardRouteInformation.setFileNameNew(kmzResult.getFileNameNew()); ardRouteInformation.setMinioUpPath(kmzResult.getMinioUpPath()); ardRouteInformation.setUpPath(kmzResult.getUpPath()); ardRouteInformation.setUpFileSize(kmzResult.getUpFileSize()); ardRouteInformationMapper.insertArdRouteInformation(ardRouteInformation); return kmzResult.getUpPath(); } /** ard-route/src/main/java/com/ard/route/service/impl/UavRouteServiceImpl.java
@@ -13,6 +13,7 @@ import com.ard.route.domain.kml.*; import com.ard.route.domain.route.ArdRouteInformation; import com.ard.route.domain.vo.KmzInfoVO; import com.ard.route.domain.vo.KmzResultVo; import com.ard.route.enums.kml.ExitOnRCLostEnums; import com.ard.route.service.IArdRouteInformationService; import com.ard.route.util.FileUtils; @@ -38,32 +39,20 @@ import java.util.zip.ZipOutputStream; import static com.ard.route.util.RouteFileUtils.*; import static com.ard.route.util.ToolUtils.extractFilePath; import static com.ard.route.util.ToolUtils.getFileNameWithoutExtension; import static com.ard.route.util.ToolUtils.*; /** * Author:songjian * Author:xia * Date: 2024/12/22 10:36 **/ @Service public class UavRouteServiceImpl implements UavRouteService { private Boolean isLocal = false; private String localFilePath = "KmzFile/kmz/"; private String kmzPath = "kmz"; @Resource private OssServiceContext ossService; @Resource private IArdRouteInformationService ardRouteInformationService; /** * XML 头部 */ private static final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; /** * 编辑kmz文件 @@ -149,7 +138,7 @@ * 生成kmz文件(带航点) */ @Override public String buildKmz(UavRouteReq uavRouteReq, String fileName) { public KmzResultVo buildKmz(UavRouteReq uavRouteReq, String fileName) { KmlParams kmlParams = new KmlParams(); BeanUtils.copyProperties(uavRouteReq, kmlParams); kmlParams.setRoutePointList(BeanUtil.copyToList(uavRouteReq.getRoutePointList(), RoutePointInfo.class)); @@ -163,7 +152,7 @@ * @param kmlParams 参数对象 * @return 本地文件路径 */ public String buildKmz(String fileName, KmlParams kmlParams) { public KmzResultVo buildKmz(String fileName, KmlParams kmlParams) { KmlInfo kmlInfo = buildKml(kmlParams); KmlInfo wpmlInfo = buildWpml(kmlParams); return buildKmz(fileName, kmlInfo, wpmlInfo); @@ -177,13 +166,16 @@ * @param wpmlInfo wpml 文件信息 * @return 本地文件路径 */ public String buildKmz(String fileName, KmlInfo kmlInfo, KmlInfo wpmlInfo) { public KmzResultVo buildKmz(String fileName, KmlInfo kmlInfo, KmlInfo wpmlInfo) { XStream xStream = new XStream(new DomDriver()); xStream.processAnnotations(KmlInfo.class); xStream.addImplicitCollection(KmlActionGroup.class, "action"); xStream.addImplicitCollection(KmlPlacemark.class, "actionGroup"); String kml = XML_HEADER + xStream.toXML(kmlInfo); String wpml = XML_HEADER + xStream.toXML(wpmlInfo); KmzResultVo result = new KmzResultVo(); // 判断本地生成kmz文件 if (isLocal) { @@ -198,7 +190,8 @@ } catch (Exception e) { throw new RuntimeException(e); } return localFilePath + fileName + ".kmz"; result.setUpPath(localFilePath + fileName + ".kmz"); return result; }else { try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); ZipOutputStream zipOutputStream = new ZipOutputStream(baos)) { @@ -222,16 +215,11 @@ new ByteArrayInputStream(baos.toByteArray()) ); String kmzFilePath = ossService.upload(kmzPath,multipartFile); // KMZ信息管理 ArdRouteInformation ardRouteInformation = new ArdRouteInformation(); ardRouteInformation.setFileName(fileName); ardRouteInformation.setFileNameNew(getFileNameWithoutExtension(kmzFilePath)); ardRouteInformation.setMinioUpPath(extractFilePath(kmzFilePath)); ardRouteInformation.setUpPath(kmzFilePath); ardRouteInformation.setUpFileSize(fileSize); ardRouteInformation.setCreateBy(SecurityUtils.getUsername()); ardRouteInformationService.insertArdRouteInformation(ardRouteInformation); return kmzFilePath; result.setFileNameNew(getFileNameWithoutExtension(kmzFilePath)); result.setMinioUpPath(extractFilePath(kmzFilePath)); result.setUpPath(kmzFilePath); result.setUpFileSize(fileSize); return result; } catch (Exception e) { throw new RuntimeException("KMZ文件生成或上传失败", e); } @@ -242,7 +230,7 @@ * 解析kmz文件 */ @Override public KmzInfoVO parseKmz(String fileUrl) throws IOException { public KmzInfoVO parseKmz(String fileUrl){ KmzInfoVO kmzInfoVO = new KmzInfoVO(); try (InputStream inputStream = ossService.getObject(kmzPath,fileUrl); ArchiveInputStream archiveInputStream = new ZipArchiveInputStream(inputStream)){ @@ -260,23 +248,5 @@ e.printStackTrace(); } return null; // File file = FileUtils.downloadUrlToTempFile(fileUrl); // try (ArchiveInputStream archiveInputStream = new ZipArchiveInputStream(FileUtil.getInputStream(file))) { // ArchiveEntry entry; // while (!Objects.isNull(entry = archiveInputStream.getNextEntry())) { // String name = entry.getName(); // if (name.toLowerCase().endsWith(".kml")) { // kmzInfoVO.setKmlInfo(RouteFileUtils.parseKml(archiveInputStream)); // } else if (name.toLowerCase().endsWith(".wpml")) { // kmzInfoVO.setWpmlInfo(RouteFileUtils.parseKml(archiveInputStream)); // } // } // return kmzInfoVO; // } catch (Exception e) { // e.printStackTrace(); // } // return null; } } ard-route/src/main/java/com/ard/route/util/RouteFileUtils.java
@@ -21,21 +21,12 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import static com.ard.route.util.ToolUtils.XML_HEADER; /** * 航线文件操作工具类 */ public class RouteFileUtils { /** * XML 头部 */ private static final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; /** * 生成的本地 kmz 文件存储路径 */ private static final String LOCAL_KMZ_FILE_PATH = "file" + File.separator + "kmz" + File.separator; /** * kml文件解析 @@ -175,13 +166,18 @@ kmlFolder.setAutoFlightSpeed(String.valueOf(kmlParams.getAutoFlightSpeed())); if (StringUtils.equals(fileType, FileTypeConstants.KML)) { kmlFolder.setTemplateType(kmlParams.getTemplateType()); kmlFolder.setWaylineCoordinateSysParam(buildKmlWayLineCoordinateSysParam(TemplateTypeEnums.WAYPOINT.getValue())); kmlFolder.setWaylineCoordinateSysParam(buildKmlWayLineCoordinateSysParam(kmlParams.getTemplateType(), HeightModeEnums.RELATIVE_TO_START_POINT.getValue(), String.valueOf(kmlParams.getGlobalHeight()))); kmlFolder.setPayloadParam(buildKmlPayloadParam(kmlParams)); } if (StringUtils.equals(fileType, FileTypeConstants.WPML)) { kmlFolder.setWaylineId("0"); kmlFolder.setExecuteHeightMode(ExecuteHeightModeEnums.RELATIVE_TO_START_POINT.getValue()); // TODO 航线初始动作 if (CollectionUtil.isNotEmpty(kmlParams.getStartActionList())) { KmlActionGroup kmlActionGroup = new KmlActionGroup(); kmlActionGroup.setAction(getKmlActionList(kmlParams.getStartActionList(), kmlParams)); kmlFolder.setStartActionGroup(kmlActionGroup); } } // 航点类型模板航线配置 if (StringUtils.equals(kmlFolder.getTemplateType(), TemplateTypeEnums.WAYPOINT.getValue())) { @@ -222,12 +218,6 @@ if (CollectionUtil.isNotEmpty(routePointList)) { List<KmlPlacemark> kmlPlacemarkList = new ArrayList<>(); for (RoutePointInfo routePointInfo : routePointList) { // ActionTriggerReq actionTriggerReq = new ActionTriggerReq(); // actionTriggerReq.setActionTriggerType(StringUtils.equals(kmlParams.getMappingTypeReq().getShootType(), ShootTypeEnums.TIME.getValue()) ? // ActionTriggerTypeEnums.MULTIPLE_TIMING.getValue() : // ActionTriggerTypeEnums.MULTIPLE_DISTANCE.getValue()); // actionTriggerReq.setActionTriggerParam(2.0); // RoutePointInfo.setActionTriggerReq(actionTriggerReq); kmlPlacemarkList.add(buildKmlPlacemark(routePointInfo, kmlParams, fileType)); } kmlFolder.setPlacemarkList(kmlPlacemarkList); @@ -237,17 +227,56 @@ return kmlFolder; } public static KmlWayLineCoordinateSysParam buildKmlWayLineCoordinateSysParam(String templateType) { /** * 构建航点动作 * * @param actionList 航点动作列表 * @param kmlParams * @return */ private static List<KmlAction> getKmlActionList(List<PointActionReq> actionList, KmlParams kmlParams) { List<KmlAction> kmlActionList = new ArrayList<>(); for (PointActionReq pointActionReq : actionList) { if (ObjectUtil.isNotNull(pointActionReq.getHoverTime())) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.HOVER.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getAircraftHeading())) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.ROTATE_YAW.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getTakePhotoType()) && ObjectUtil.equals(pointActionReq.getTakePhotoType(), 0)) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.TAKE_PHOTO.getValue(), pointActionReq, kmlParams)); } else if ((ObjectUtil.isNotNull(pointActionReq.getGimbalYawRotateAngle())) || (ObjectUtil.isNotNull(pointActionReq.getGimbalPitchRotateAngle()))) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.GIMBAL_ROTATE.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getZoom())) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.ZOOM.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getTakePhotoType()) && ObjectUtil.equals(pointActionReq.getTakePhotoType(), 1)) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.PANO_SHOT.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getStartRecord()) && pointActionReq.getStartRecord()) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.START_RECORD.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getStopRecord()) && pointActionReq.getStopRecord()) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.STOP_RECORD.getValue(), pointActionReq, kmlParams)); } } return kmlActionList; } /** * 构造坐标系参数信息 * * @param templateType 航线模板类型 * @param heightMode 高度模式 * @param height 高度 * @return 坐标系参数信息 */ public static KmlWayLineCoordinateSysParam buildKmlWayLineCoordinateSysParam(String templateType, String heightMode, String height) { KmlWayLineCoordinateSysParam kmlWayLineCoordinateSysParam = new KmlWayLineCoordinateSysParam(); kmlWayLineCoordinateSysParam.setCoordinateMode("WGS84"); kmlWayLineCoordinateSysParam.setHeightMode(HeightModeEnums.RELATIVE_TO_START_POINT.getValue()); kmlWayLineCoordinateSysParam.setHeightMode(heightMode); kmlWayLineCoordinateSysParam.setPositioningType(PositioningTypeEnums.GPS.getValue()); if (StringUtils.equals(templateType, TemplateTypeEnums.MAPPING2D.getValue()) || StringUtils.equals(templateType, TemplateTypeEnums.MAPPING3D.getValue()) || StringUtils.equals(templateType, TemplateTypeEnums.MAPPING_STRIP.getValue())) { kmlWayLineCoordinateSysParam.setGlobalShootHeight("50"); kmlWayLineCoordinateSysParam.setGlobalShootHeight(height); kmlWayLineCoordinateSysParam.setSurfaceFollowModeEnable("1"); kmlWayLineCoordinateSysParam.setSurfaceRelativeHeight("100"); kmlWayLineCoordinateSysParam.setSurfaceRelativeHeight(height); } return kmlWayLineCoordinateSysParam; } @@ -287,6 +316,7 @@ kmlPlacemark.setIsRisky("0"); kmlPlacemark.setKmlPoint(buildKmlPoint(String.valueOf(routePointInfo.getLongitude()), String.valueOf(routePointInfo.getLatitude()))); kmlPlacemark.setIndex(String.valueOf(routePointInfo.getRoutePointIndex())); handleHeight(routePointInfo, kmlParams, fileType, kmlPlacemark); handleSpeed(routePointInfo, kmlParams, fileType, kmlPlacemark); handleWaypointHeadingParam(routePointInfo, kmlParams, fileType, kmlPlacemark); @@ -296,8 +326,12 @@ kmlPlacemark.setGimbalPitchAngle(String.valueOf(routePointInfo.getGimbalPitchAngle())); } } if (CollectionUtil.isNotEmpty(routePointInfo.getActions())) { kmlPlacemark.setActionGroup(buildKmlActionGroup(routePointInfo, kmlParams)); if (CollectionUtil.isNotEmpty(routePointInfo.getActionGroupList())) { List<KmlActionGroup> kmlActionGroupList = new ArrayList<>(); for (ActionGroupReq actionGroupReq : routePointInfo.getActionGroupList()) { kmlActionGroupList.add(buildKmlActionGroup(actionGroupReq, kmlParams)); } kmlPlacemark.setActionGroup(kmlActionGroupList); } return kmlPlacemark; } @@ -321,22 +355,16 @@ private static KmlOverlap buildKmlOverlap(String collectionMethod, String lensType, Integer overlapH, Integer overlapW) { KmlOverlap overlap = new KmlOverlap(); if (StringUtils.equals(collectionMethod, CollectionMethodEnums.ORTHO.getValue())) { if (StringUtils.equals(lensType, LensTypeEnums.LIDAR.getValue())) { overlap.setOrthoLidarOverlapH(String.valueOf(overlapH)); overlap.setOrthoLidarOverlapW(String.valueOf(overlapW)); } else { overlap.setOrthoCameraOverlapH(String.valueOf(overlapH)); overlap.setOrthoCameraOverlapW(String.valueOf(overlapW)); } if (StringUtils.equals(collectionMethod, LensTypeEnums.CAMERA.getValue())) { overlap.setOrthoCameraOverlapH(String.valueOf(overlapH)); overlap.setOrthoCameraOverlapW(String.valueOf(overlapW)); overlap.setInclinedCameraOverlapW(String.valueOf(overlapW)); overlap.setInclinedCameraOverlapH(String.valueOf(overlapH)); } else { if (StringUtils.equals(lensType, LensTypeEnums.LIDAR.getValue())) { overlap.setInclinedLidarOverlapH(String.valueOf(overlapH)); overlap.setInclinedCameraOverlapW(String.valueOf(overlapW)); } else { overlap.setInclinedCameraOverlapH(String.valueOf(overlapH)); overlap.setInclinedCameraOverlapW(String.valueOf(overlapW)); } overlap.setOrthoLidarOverlapH(String.valueOf(overlapH)); overlap.setOrthoLidarOverlapW(String.valueOf(overlapW)); overlap.setInclinedLidarOverlapH(String.valueOf(overlapH)); overlap.setInclinedLidarOverlapW(String.valueOf(overlapW)); } return overlap; } @@ -462,44 +490,15 @@ return kmlWaypointTurnParam; } public static KmlActionGroup buildKmlActionGroup(RoutePointInfo routePointInfo, KmlParams kmlParams) { public static KmlActionGroup buildKmlActionGroup(ActionGroupReq actionGroupReq, KmlParams kmlParams) { KmlActionGroup kmlActionGroup = new KmlActionGroup(); kmlActionGroup.setActionGroupId(String.valueOf(routePointInfo.getRoutePointIndex())); kmlActionGroup.setActionGroupStartIndex(String.valueOf(routePointInfo.getRoutePointIndex())); kmlActionGroup.setActionGroupEndIndex(String.valueOf(ObjectUtil.isNotNull(routePointInfo.getEndIntervalRouteIndex()) ? routePointInfo.getEndIntervalRouteIndex() : routePointInfo.getRoutePointIndex())); kmlActionGroup.setActionGroupId(String.valueOf(actionGroupReq.getActionGroupId())); kmlActionGroup.setActionGroupStartIndex(String.valueOf(actionGroupReq.getActionGroupStartIndex())); kmlActionGroup.setActionGroupEndIndex(String.valueOf(actionGroupReq.getActionGroupEndIndex())); kmlActionGroup.setActionGroupMode(ActionGroupModeEnums.SEQUENCE.getValue()); String actionTriggerType = ActionTriggerTypeEnums.REACH_POINT.getValue(); Double actionTriggerParam = 0.0; if (ObjectUtil.isNotNull(routePointInfo.getTimeInterval())) { actionTriggerType = ActionTriggerTypeEnums.MULTIPLE_TIMING.getValue(); actionTriggerParam = routePointInfo.getTimeInterval(); } else if (ObjectUtil.isNotNull(routePointInfo.getDistanceInterval())) { actionTriggerType = ActionTriggerTypeEnums.MULTIPLE_DISTANCE.getValue(); actionTriggerParam = routePointInfo.getDistanceInterval(); } kmlActionGroup.setActionTrigger(buildKmlActionTrigger(actionTriggerType, actionTriggerParam)); List<KmlAction> kmlActionList = new ArrayList<>(); for (PointActionReq pointActionReq : routePointInfo.getActions()) { if (ObjectUtil.isNotNull(pointActionReq.getHoverTime())) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.HOVER.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getAircraftHeading())) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.ROTATE_YAW.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getTakePhotoType()) && ObjectUtil.equals(pointActionReq.getTakePhotoType(), 0)) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.TAKE_PHOTO.getValue(), pointActionReq, kmlParams)); } else if ((ObjectUtil.isNotNull(pointActionReq.getGimbalYawRotateAngle())) || (ObjectUtil.isNotNull(pointActionReq.getGimbalPitchRotateAngle()))) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.GIMBAL_ROTATE.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getZoom())) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.ZOOM.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getTakePhotoType()) && ObjectUtil.equals(pointActionReq.getTakePhotoType(), 1)) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.PANO_SHOT.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getStartRecord()) && pointActionReq.getStartRecord()) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.START_RECORD.getValue(), pointActionReq, kmlParams)); } else if (ObjectUtil.isNotNull(pointActionReq.getStopRecord()) && pointActionReq.getStopRecord()) { kmlActionList.add(buildKmlAction(String.valueOf(pointActionReq.getActionIndex()), ActionActuatorFuncEnums.STOP_RECORD.getValue(), pointActionReq, kmlParams)); } } kmlActionGroup.setAction(kmlActionList); kmlActionGroup.setActionTrigger(buildKmlActionTrigger(actionGroupReq.getActionTriggerType(), actionGroupReq.getActionTriggerParam())); kmlActionGroup.setAction(getKmlActionList(actionGroupReq.getActions(), kmlParams)); return kmlActionGroup; } @@ -526,7 +525,11 @@ if (StringUtils.equals(actionActuatorFunc, ActionActuatorFuncEnums.TAKE_PHOTO.getValue()) || StringUtils.equals(actionActuatorFunc, ActionActuatorFuncEnums.START_RECORD.getValue())) { kmlActionActuatorFuncParam.setPayloadPositionIndex(String.valueOf(kmlParams.getPayloadPosition())); kmlActionActuatorFuncParam.setFileSuffix(""); if (pointActionReq.getFileSuffix() != null){ kmlActionActuatorFuncParam.setFileSuffix(pointActionReq.getFileSuffix()); }else { kmlActionActuatorFuncParam.setFileSuffix("panoramicPhoto_360"); } kmlActionActuatorFuncParam.setUseGlobalPayloadLensIndex(String.valueOf(pointActionReq.getUseGlobalImageFormat())); if (ObjectUtil.equals(pointActionReq.getUseGlobalImageFormat(), 0)) { kmlActionActuatorFuncParam.setPayloadLensIndex(pointActionReq.getImageFormat()); @@ -568,7 +571,11 @@ } else if (StringUtils.equals(actionActuatorFunc, ActionActuatorFuncEnums.PANO_SHOT.getValue())) { kmlActionActuatorFuncParam.setPayloadPositionIndex(String.valueOf(kmlParams.getPayloadPosition())); kmlActionActuatorFuncParam.setUseGlobalPayloadLensIndex(String.valueOf(pointActionReq.getUseGlobalImageFormat())); kmlActionActuatorFuncParam.setPanoShotSubMode("panoShot_360"); if (pointActionReq.getFileSuffix()!=null){ kmlActionActuatorFuncParam.setPanoShotSubMode(pointActionReq.getPanoShotSubMode()); }else { kmlActionActuatorFuncParam.setPanoShotSubMode("panoShot_360"); } if (ObjectUtil.equals(pointActionReq.getUseGlobalImageFormat(), 0)) { kmlActionActuatorFuncParam.setPayloadLensIndex(pointActionReq.getImageFormat()); } else { ard-route/src/main/java/com/ard/route/util/ToolUtils.java
@@ -8,6 +8,17 @@ */ public class ToolUtils { public static Boolean isLocal = false; public static String localFilePath = "KmzFile/kmz/"; public static String kmzPath = "kmz"; /** * XML 头部 */ public static final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; /** * 生成KMZ文件名称规则 */ ard-route/src/main/resources/mapper/ArdRouteFolderMapper.xml
@@ -40,11 +40,12 @@ <include refid="selectArdRouteFolderVo"/> <where> <if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if> <if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if> <if test="createdTime != null "> and created_time = #{createdTime}</if> <if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if> <if test="updatedTime != null "> and updated_time = #{updatedTime}</if> <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> <if test="createTime != null "> and create_time = #{createTime}</if> <if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if> <if test="updateTime != null "> and update_time = #{updateTime}</if> </where> order by serial_number asc </select> <select id="selectArdRouteFolderById" parameterType="String" resultMap="ArdRouteFolderResult"> ard-route/src/main/resources/mapper/ArdRouteInformationMapper.xml
@@ -11,6 +11,8 @@ <result property="upPath" column="up_path" /> <result property="minioUpPath" column="minio_up_path" /> <result property="upFileSize" column="up_file_size" /> <result property="aircraft" column="aircraft" /> <result property="aircraftModel" column="aircraft_model" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> <result property="updateBy" column="update_by" /> @@ -24,6 +26,8 @@ up_path, minio_up_path, up_file_size, aircraft, aircraft_model, create_by, create_time, update_by, @@ -54,6 +58,8 @@ <if test="upPath != null">up_path,</if> <if test="minioUpPath != null">minio_up_path,</if> <if test="upFileSize != null">up_file_size,</if> <if test="aircraft != null">aircraft,</if> <if test="aircraftModel != null">aircraft_model,</if> <if test="createBy != null">create_by,</if> <if test="createTime != null">create_time,</if> <if test="updateBy != null">update_by,</if> @@ -66,6 +72,8 @@ <if test="upPath != null">#{upPath},</if> <if test="minioUpPath != null">#{minioUpPath},</if> <if test="upFileSize != null">#{upFileSize},</if> <if test="aircraft != null">#{aircraft},</if> <if test="aircraftModel != null">#{aircraftModel},</if> <if test="createBy != null">#{createBy},</if> <if test="createTime != null">#{createTime},</if> <if test="updateBy != null">#{updateBy},</if> @@ -81,6 +89,8 @@ <if test="upPath != null">up_path = #{upPath},</if> <if test="minioUpPath != null">minio_up_path = #{minioUpPath},</if> <if test="upFileSize != null">up_file_size = #{upFileSize},</if> <if test="aircraft != null">aircraft = #{aircraft},</if> <if test="aircraftModel != null">aircraft_model = #{aircraftModel},</if> <if test="createBy != null">create_by = #{createBy},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="updateBy != null">update_by = #{updateBy},</if>