| | |
| | | } catch (IOException | ClassNotFoundException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | for (RoutePointReq routePointReq : ardRouteInfo.getUavRouteReq().getRoutePointList()) { |
| | | routePointReq.setHeight(routePointReq.getHeight() + getDoublePoint(ardRouteInfo.getUavRouteReq().getTakeOffRefPoint(),"alt")); |
| | | } |
| | | return ardRouteInfo; |
| | | } |
| | | |
| | |
| | | }else if ("0".equals(ardRouteInfo.getOrderByTime())) { |
| | | ardRouteInfo.setOrderByTime("ASC"); |
| | | } |
| | | // List<ArdRouteInfo> list = ardRouteInfoMapper.selectArdRouteInfoList(ardRouteInfo); |
| | | // for (ArdRouteInfo routeInfo : list) { |
| | | // for (RoutePointReq routePointReq : routeInfo.getUavRouteReq().getRoutePointList()) { |
| | | // routePointReq.setHeight(routePointReq.getHeight() + getDoublePoint(ardRouteInfo.getUavRouteReq().getTakeOffRefPoint(),"alt")); |
| | | // } |
| | | // } |
| | | return ardRouteInfoMapper.selectArdRouteInfoList(ardRouteInfo); |
| | | } |
| | | |
| | |
| | | ardRouteInfo.setGroupId("0"); |
| | | } |
| | | ardRouteInfo.getUavRouteReq().setDroneType(subStringDroneType(ardRouteInfo.getAircraft())); |
| | | KmzResultVo kmzResult = routeService.buildKmz(ardRouteInfo.getUavRouteReq(), ardRouteInfo.getName()); |
| | | KmzResultVo kmzResult = routeService.buildKmz(ardRouteInfo.getUavRouteReq(),ardRouteInfo.getName()); |
| | | ardRouteInfo.setPath(kmzResult.getPath()); |
| | | ardRouteInfo.setReadOnly("0"); |
| | | ardRouteInfoMapper.insertArdRouteInfo(dataProcessing(ardRouteInfo)); |
| | |
| | | ardRouteInfo.setAircraft(droneTypeData(uavRouteReq)); |
| | | } |
| | | // 判断禁飞区 |
| | | List<RoutePointReq> routePointList = ardRouteInfo.getUavRouteReq().getRoutePointList(); |
| | | for (RoutePointReq routePointReq : routePointList) { |
| | | ArdNoflyDto ardNoflyDto = new ArdNoflyDto(); |
| | | ardNoflyDto.setCurrent(new Vertex(routePointReq.getLongitude(), routePointReq.getLatitude())); |
| | | verifyNoFlyZone(ardNoflyDto); |
| | | } |
| | | // List<RoutePointReq> routePointList = ardRouteInfo.getUavRouteReq().getRoutePointList(); |
| | | // for (RoutePointReq routePointReq : routePointList) { |
| | | // ArdNoflyDto ardNoflyDto = new ArdNoflyDto(); |
| | | // ardNoflyDto.setCurrent(new Vertex(routePointReq.getLongitude(), routePointReq.getLatitude())); |
| | | // verifyNoFlyZone(ardNoflyDto); |
| | | // } |
| | | String url = ossService.upload("kmz",file); |
| | | String urlDock = ossDockService.upload("kmz",file); |
| | | ardRouteInfo.setName(file.getOriginalFilename()); |