| | |
| | | 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 ("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) { |
| | |
| | | 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())); |
| | | } |
| | | } |
| | | } |
| | |
| | | // 1.1通过航线数据,转换。 |
| | | ArdRouteInfo route = ardRouteInfoMapper.selectArdRouteInfoById(id); |
| | | try { |
| | | // if ("3".equals(route.getType())) { |
| | | // UavRouteReq uavRouteReq = new UavRouteReq(); |
| | | // BeanUtils.copyProperties(deserialize(route.getRouteData()), uavRouteReq); |
| | | // route.setUavRouteReq((UavRouteReq) deserialize(route.getRouteData())); |
| | | // }else { |
| | | // route.setUavRouteReq((UavRouteReq) deserialize(route.getRouteData())); |
| | | // } |
| | | route.setUavRouteReq((UavRouteReq) deserialize(route.getRouteData())); |
| | | if (route.getCloudData() != null){ |
| | | route.setArdPointCloudList(deserializeLs(route.getCloudData())); |