| | |
| | | import com.ard.work.service.ITyService; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | // 调整航点高度 |
| | | adjustRoutePointHeight(routePointReq, altitudeOffset); |
| | | // 如果是M350_RTK无人机,处理变焦动作 |
| | | if (isM350RTK && routePointReq.getActionGroupList() != null) { |
| | | for (ActionGroupReq actionGroupReq : routePointReq.getActionGroupList()) { |
| | | if (actionGroupReq != null && actionGroupReq.getActions() != null) { |
| | | processZoomActions(actionGroupReq); |
| | | } |
| | | } |
| | | } |
| | | // if (isM350RTK && routePointReq.getActionGroupList() != null) { |
| | | // for (ActionGroupReq actionGroupReq : routePointReq.getActionGroupList()) { |
| | | // if (actionGroupReq != null && actionGroupReq.getActions() != null) { |
| | | // processZoomActions(actionGroupReq); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | 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); |
| | | } |
| | | |
| | |
| | | if (ardRouteInfo.getGroupId() == null){ |
| | | ardRouteInfo.setGroupId("0"); |
| | | } |
| | | UavRouteReq uavRouteReq = new UavRouteReq(); |
| | | BeanUtils.copyProperties(ardRouteInfo.getUavRouteReq(), uavRouteReq); |
| | | ardRouteInfo.getUavRouteReq().setDroneType(subStringDroneType(ardRouteInfo.getAircraft())); |
| | | KmzResultVo kmzResult = routeService.buildKmz(ardRouteInfo.getUavRouteReq(),ardRouteInfo.getName()); |
| | | KmzResultVo kmzResult = routeService.buildKmz(uavRouteReq,ardRouteInfo.getName()); |
| | | if (M350_RTK.getValue().equals(uavRouteReq.getDroneType())) { |
| | | // 变焦数值加工 |
| | | for (RoutePointReq routePointReq : ardRouteInfo.getUavRouteReq().getRoutePointList()) { |
| | | for (ActionGroupReq actionGroupReq : routePointReq.getActionGroupList()) { |
| | | for (PointActionReq action : actionGroupReq.getActions()) { |
| | | action.setZoom(divided_23(action.getZoom())); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ardRouteInfo.setPath(kmzResult.getPath()); |
| | | ardRouteInfo.setReadOnly("0"); |
| | | ardRouteInfoMapper.insertArdRouteInfo(dataProcessing(ardRouteInfo)); |