| | |
| | | import com.ard.route.domain.WaypointHeadingReq; |
| | | import com.ard.route.domain.WaypointTurnReq; |
| | | import com.ard.route.domain.kml.*; |
| | | import com.ard.route.domain.route.ArdRouteInfor; |
| | | import com.ard.route.domain.route.ArdRouteInfo; |
| | | 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.IArdRouteInforService; |
| | | import com.ard.route.service.IArdRouteInfoService; |
| | | import com.ard.route.util.InitializationUtils; |
| | | import com.ard.route.util.RouteFileUtils; |
| | | import com.ard.route.service.UavRouteService; |
| | |
| | | private OssServiceContext ossService; |
| | | |
| | | @Resource |
| | | private IArdRouteInforService ardRouteInformationService; |
| | | private IArdRouteInfoService ardRouteInformationService; |
| | | |
| | | InitializationUtils init = new InitializationUtils(); |
| | | |
| | |
| | | public KmzResultVo updateKmz(UavRouteReq uavRouteReq,String fileName){ |
| | | KmzResultVo result = new KmzResultVo(); |
| | | // 校验修改的文件是否存在 |
| | | ArdRouteInfor routeInformation = ardRouteInformationService.selectArdRouteInforByName(fileName); |
| | | ArdRouteInfo routeInformation = ardRouteInformationService.selectArdRouteInfoByName(fileName); |
| | | if ( routeInformation == null ){ |
| | | result.setData("修改航线文件失败,请检查文件是否存在"); |
| | | return result; |
| | |
| | | } |
| | | // 删除文件 |
| | | ossService.deleteObject(kmzPath, minioUrlName); |
| | | return buildKmzMethod(routeInformation.getKmzName(), kmlInfo, wpmlInfo); |
| | | return buildKmzMethod(routeInformation.getName(), kmlInfo, wpmlInfo); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | result.setData("更新航线kmz文件失败"); |
| | |
| | | public KmzResultVo updateKmzNew(UavRouteReq uavRouteReq, String oldFile, String newFile) { |
| | | KmzResultVo result = new KmzResultVo(); |
| | | // 校验修改的文件是否存在 |
| | | ArdRouteInfor routeInformation = ardRouteInformationService.selectArdRouteInforByName(oldFile); |
| | | ArdRouteInfo routeInformation = ardRouteInformationService.selectArdRouteInfoByName(oldFile); |
| | | if ( routeInformation == null ){ |
| | | result.setData("修改航线文件失败,请检查文件是否存在"); |
| | | return result; |