| | |
| | | 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; |
| | | import javax.annotation.Resource; |
| | | import static com.ard.route.enums.kml.DroneEnumValueEnums.M350_RTK; |
| | | import static com.ard.route.util.InitializationUtils.divided_23; |
| | | import static com.ard.route.util.InitializationUtils.divided23; |
| | | import static com.ard.route.util.ToolUtils.*; |
| | | import static com.ard.route.util.UavRouteReqUtils.buildWayLineUploadDTO; |
| | | import static com.ard.route.util.UavRouteReqUtils.fileConversionEntity; |
| | |
| | | ArdRouteInfo ardRouteInfo = ardRouteInfoMapper.selectArdRouteInfoById(id); |
| | | try { |
| | | if (ardRouteInfo != null) { |
| | | if (ardRouteInfo.getRouteData() != null){ |
| | | ardRouteInfo.setUavRouteReq((UavRouteReq) deserialize(ardRouteInfo.getRouteData())); |
| | | if (ardRouteInfo.getCloudData() != null){ |
| | | ardRouteInfo.setArdPointCloudList(deserializeLs(ardRouteInfo.getCloudData())); |
| | | if ("3".equals(ardRouteInfo.getType())) { |
| | | if (ardRouteInfo.getRouteData() != null){ |
| | | UavRouteReq uavRouteReq = new UavRouteReq(); |
| | | BeanUtils.copyProperties(deserialize(ardRouteInfo.getRouteData()), uavRouteReq); |
| | | ardRouteInfo.setUavRouteReq(uavRouteReq); |
| | | } |
| | | } else { |
| | | if (ardRouteInfo.getRouteData() != null){ |
| | | ardRouteInfo.setUavRouteReq((UavRouteReq) deserialize(ardRouteInfo.getRouteData())); |
| | | } |
| | | } |
| | | if (ardRouteInfo.getCloudData() != null){ |
| | | ardRouteInfo.setArdPointCloudList(deserializeLs(ardRouteInfo.getCloudData())); |
| | | } |
| | | } |
| | | } catch (IOException | ClassNotFoundException e) { |
| | |
| | | ardRouteInfo.setUpdateTime(DateUtils.getNowDate()); // 修改时间,用于排序 |
| | | if (ardRouteInfo.getGroupId() == null){ |
| | | ardRouteInfo.setGroupId("0"); |
| | | } |
| | | if ("3".equals(ardRouteInfo.getType())){ |
| | | ardRouteInfo.getUavRouteReq().setHeightMode("EGM96"); |
| | | }else { |
| | | ardRouteInfo.getUavRouteReq().setHeightMode("relativeToStartPoint"); |
| | | } |
| | | ardRouteInfo.getUavRouteReq().setDroneType(subStringDroneType(ardRouteInfo.getAircraft())); |
| | | KmzResultVo kmzResult = routeService.buildKmz(ardRouteInfo.getUavRouteReq(),ardRouteInfo.getName()); |
| | |
| | | for (ActionGroupReq actionGroupReq : routePointReq.getActionGroupList()) { |
| | | for (PointActionReq action : actionGroupReq.getActions()) { |
| | | if (action.getZoom() != null){ |
| | | action.setZoom(divided_23(action.getZoom())); |
| | | action.setZoom(divided23(action.getZoom())); |
| | | } |
| | | } |
| | | } |
| | |
| | | WaylineInfo WaylineInfo = new WaylineInfo(); |
| | | WaylineInfo.setBoxSn(boxSn); |
| | | WaylineInfo.setWaylineId(route.getId()); |
| | | WaylineInfo.setRouteName(route.getName()); |
| | | UavWaylineCache.put(WaylineInfo); |
| | | // 4.调用接口 |
| | | tyService.wayLineUpload(wayLineUploadDTO); |