ard-inspection/src/main/java/com/ard/inspection/service/impl/ArdPointCloudServiceImpl.java
@@ -8,6 +8,7 @@ import com.ard.inspection.domain.NotCould; import com.ard.inspection.utils.ZipFileUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import com.ard.inspection.mapper.ArdPointCloudMapper; import com.ard.inspection.domain.ArdPointCloud; @@ -23,6 +24,9 @@ */ @Service public class ArdPointCloudServiceImpl implements IArdPointCloudService { @Value(value = "${pointCloud.folder}") private String cloudFolder; @Autowired private ArdPointCloudMapper ardPointCloudMapper; @@ -87,11 +91,10 @@ @Override public int deleteArdPointCloudByIds(String[] ids) { // 删除点云文件 String folderPath = "/home/inspection/uploadPath/zip/"; int count = 0; for (String id : ids) { ArdPointCloud ardPointCloud = ardPointCloudMapper.selectArdPointCloudById(id); if (zipFileUtils.deleteZipFile(folderPath + ardPointCloud.getFolderName())){ if (zipFileUtils.deleteZipFile(cloudFolder + ardPointCloud.getFolderName())){ ardPointCloudMapper.deleteArdPointCloudById(id); count++; } ard-inspection/src/main/java/com/ard/inspection/service/impl/BigFileUploadServiceImpl.java
@@ -1,7 +1,6 @@ package com.ard.inspection.service.impl; import com.ard.common.core.domain.AjaxResult; import com.ard.common.utils.uuid.IdUtils; import com.ard.inspection.domain.ArdPointCloud; import com.ard.inspection.domain.UploadFileEntity; import com.ard.inspection.service.IArdPointCloudService; @@ -9,6 +8,7 @@ import com.ard.inspection.utils.ZipFileUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; @@ -28,7 +28,11 @@ @Slf4j public class BigFileUploadServiceImpl implements IBigFileUploadService { public static final String CLOUD_FILE_PATH = "https://192.168.1.3:3001/tileset/"; @Value(value = "${pointCloud.url}") private String cloudUrl; @Value(value = "${pointCloud.type}") private String cloudType; @Autowired private IArdPointCloudService ardPointCloudService; @@ -256,7 +260,7 @@ ardPointCloud.setFileSize(formatFileSize(file.getSize())); int dotIndex = originalFilename.lastIndexOf('.'); String folderName = (dotIndex > 0) ? originalFilename.substring(0, dotIndex) : originalFilename; String zipP = CLOUD_FILE_PATH + folderName + "/tileset.json"; String zipP = cloudUrl + folderName + cloudType; ardPointCloud.setFilePath(zipP); ardPointCloud.setFolderName(folderName); return AjaxResult.success("文件上传并解压成功", ardPointCloud); ard-route/src/main/java/com/ard/route/service/impl/ArdRouteInfoServiceImpl.java
@@ -169,6 +169,11 @@ 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()); zoomProcessing(ardRouteInfo); @@ -465,13 +470,6 @@ // 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())); ard-route/src/main/java/com/ard/route/util/InitializationUtils.java
@@ -34,7 +34,8 @@ if (uavRouteReq.getTakeOffRefPoint() == null){ uavRouteReq.setTakeOffRefPoint( uavRouteReq.getRoutePointList().get(0).getLatitude() + "," + uavRouteReq.getRoutePointList().get(0).getLongitude() + "," + "0"); uavRouteReq.getRoutePointList().get(0).getLongitude() + "," + uavRouteReq.getRoutePointList().get(0).getHeight()); } //uavRouteReq.setDroneType(89); uavRouteReq.setSubDroneType(0); @@ -56,7 +57,6 @@ } uavRouteReq.setWaypointTurnReq(waypointTurnReq); uavRouteReq.setGimbalPitchMode("usePointSetting"); uavRouteReq.setHeightMode("EGM96"); if (M350_RTK.getValue().equals(uavRouteReq.getDroneType())) { // 变焦数值加工 buildZoom(uavRouteReq); @@ -91,11 +91,13 @@ * 根据起飞点高度减去当前航点高度 */ public void buildHeight(UavRouteReq uavRouteReq){ if (!"EGM96".equals(uavRouteReq.getHeightMode())){ double takeOffHeight = getDoublePoint(uavRouteReq.getTakeOffRefPoint(),"alt"); for (RoutePointReq routePointReq : uavRouteReq.getRoutePointList()) { routePointReq.setHeight(routePointReq.getHeight() - takeOffHeight); } } } /** * 变焦动作加工