| | |
| | | <groupId>com.ard</groupId> |
| | | <artifactId>ard-work</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ard</groupId> |
| | | <artifactId>ard-ossdock</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | @Excel(name = "文件路径") |
| | | private String path; |
| | | |
| | | /** 文件路径1 */ |
| | | @Excel(name = "文件路径1") |
| | | private String path1; |
| | | // /** 文件路径1 */ |
| | | // @Excel(name = "文件路径1") |
| | | // private String path1; |
| | | |
| | | /** 分组ID */ |
| | | @Excel(name = "分组ID") |
| | |
| | | */ |
| | | public enum DroneEnumValueEnums { |
| | | |
| | | M350_RTK(89, "M350 RTK"), |
| | | M300_RTK(60, "M300 RTK"), |
| | | M350_RTK(89, "M350 RTK"), |
| | | M400_RTK(103, "M400 RTK"), |
| | | M30_M30T(67, "M30/M30T"), |
| | | M3E_M3T_M3M(77, "M3E/M3T/M3M"), |
| | | M3D_M3TD(91, "M3D/M3TD"); |
| | | M3D_M3TD(91, "M3D/M3TD"), |
| | | MATRICE_4D(100, "MATRICES 4D"); |
| | | |
| | | private Integer value; |
| | | private String description; |
| | |
| | | import com.ard.framework.web.service.TokenService; |
| | | import com.ard.oss.model.MinioUploadResult; |
| | | import com.ard.oss.service.impl.OssServiceContext; |
| | | import com.ard.ossdock.service.impl.OssDockServiceContext; |
| | | import com.ard.route.domain.djuav.ActionGroupReq; |
| | | import com.ard.route.domain.djuav.PointActionReq; |
| | | import com.ard.route.domain.djuav.RoutePointReq; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static com.ard.route.util.InitializationUtils.divided_23; |
| | | import static com.ard.route.util.InitializationUtils.divided_6; |
| | | import static com.ard.route.util.ToolUtils.*; |
| | | import static com.ard.route.util.UavRouteReqUtils.fileConversionEntity; |
| | |
| | | @Autowired |
| | | private OssServiceContext ossService; |
| | | |
| | | @Autowired |
| | | private OssDockServiceContext ossDockService; |
| | | |
| | | @Autowired |
| | | private UavRouteService routeService; |
| | |
| | | if (ardRouteInfo.getUavRouteReq().getDroneType().equals(89)){ |
| | | for (ActionGroupReq actionGroupReq : routePointReq.getActionGroupList()) { |
| | | for (PointActionReq action : actionGroupReq.getActions()) { |
| | | action.setZoom(divided_6(action.getZoom())); |
| | | action.setZoom(divided_23(action.getZoom())); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return ardRouteInfo; |
| | | } |
| | | |
| | | // 变焦放大缩小 |
| | | public void zoom(){ |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | if (information.getPath() != null){ |
| | | ossService.deleteObject("kmz", subStringMinioUrlName(information.getPath())); |
| | | } |
| | | if (information.getPath1() != null){ |
| | | ossDockService.deleteObject("kmz", subStringMinioUrlName(information.getPath1())); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | String url = ossService.upload("kmz",file); |
| | | String urlDock = ossDockService.upload("kmz",file); |
| | | ardRouteInfo.setName(file.getOriginalFilename()); |
| | | ardRouteInfo.setPath(url); |
| | | ardRouteInfo.setPath1(urlDock); |
| | | ardRouteInfo.setGroupId("0"); // 默认分组 |
| | | ardRouteInfo.setReadOnly("1"); // 默认只读 |
| | | insertRouteInfomation(ardRouteInfo); |
| | |
| | | @Resource |
| | | private OssServiceContext ossService; |
| | | |
| | | @Resource |
| | | private OssDockServiceContext ossDockService; |
| | | // @Resource |
| | | // private OssDockServiceContext ossDockService; |
| | | |
| | | @Resource |
| | | private IArdRouteInfoService ardRouteInformationService; |
| | |
| | | } |
| | | } |
| | | // 删除文件 |
| | | if ("100".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue()) |
| | | ||"91".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue())){ |
| | | ossDockService.deleteObject(kmzPath,minioUrlName); |
| | | } |
| | | // if ("100".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue()) |
| | | // ||"91".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue())){ |
| | | // ossDockService.deleteObject(kmzPath,minioUrlName); |
| | | // } |
| | | ossService.deleteObject(kmzPath, minioUrlName); |
| | | return buildKmzMethod(routeInformation.getName(), kmlInfo, wpmlInfo); |
| | | } catch (Exception e) { |
| | |
| | | new ByteArrayInputStream(baos.toByteArray()) |
| | | ); |
| | | // 通过无人机类型,判断上传文件 |
| | | if ("100".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue()) |
| | | ||"91".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue())){ |
| | | String kmzFilePathDock = ossDockService.upload(kmzPath,multipartFile); |
| | | result.setPathDock(kmzFilePathDock); |
| | | } |
| | | // if ("100".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue()) |
| | | // ||"91".equals(kmlInfo.getDocument().getKmlMissionConfig().getDroneInfo().getDroneEnumValue())){ |
| | | // String kmzFilePathDock = ossDockService.upload(kmzPath,multipartFile); |
| | | // result.setPathDock(kmzFilePathDock); |
| | | // } |
| | | String kmzFilePath = ossService.upload(kmzPath,multipartFile); |
| | | result.setPath(kmzFilePath); |
| | | return result; |
| | |
| | | package com.ard.route.util; |
| | | |
| | | import com.ard.oss.service.impl.OssServiceContext; |
| | | import com.ard.route.domain.djuav.ActionGroupReq; |
| | | import com.ard.route.domain.djuav.PointActionReq; |
| | | import com.ard.route.domain.djuav.RoutePointReq; |
| | |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | <result property="id" column="id" /> |
| | | <result property="name" column="name" /> |
| | | <result property="path" column="path" /> |
| | | <result property="path1" column="path1" /> |
| | | <!-- <result property="path1" column="path1" />--> |
| | | <result property="groupId" column="group_id" /> |
| | | <result property="type" column="type" /> |
| | | <result property="aircraft" column="aircraft" /> |
| | |
| | | select id, |
| | | name, |
| | | path, |
| | | path1, |
| | | <!-- path1,--> |
| | | group_id, |
| | | type, |
| | | aircraft, |
| | |
| | | <if test="id != null">id,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="path != null">path,</if> |
| | | <if test="path1 != null">path1,</if> |
| | | <!-- <if test="path1 != null">path1,</if>--> |
| | | <if test="groupId != null">group_id,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="aircraft != null">aircraft,</if> |
| | |
| | | <if test="id != null">#{id},</if> |
| | | <if test="name != null">#{name},</if> |
| | | <if test="path != null">#{path},</if> |
| | | <if test="path1 != null">#{path1},</if> |
| | | <!-- <if test="path1 != null">#{path1},</if>--> |
| | | <if test="groupId != null">#{groupId},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="aircraft != null">#{aircraft},</if> |
| | |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="name != null">name = #{name},</if> |
| | | <if test="path != null">path = #{path},</if> |
| | | <if test="path1 != null">path1 = #{path1},</if> |
| | | <!-- <if test="path1 != null">path1 = #{path1},</if>--> |
| | | <if test="groupId != null">group_id = #{groupId},</if> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="aircraft != null">aircraft = #{aircraft},</if> |
| | |
| | | </delete> |
| | | |
| | | <select id="selectArdRouteInfoByGroupId" parameterType="String" resultMap="ArdRouteInfoResult"> |
| | | select id,name,path,path1,group_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time,point_count from ard_route_info |
| | | select id,name,path,group_id,type,aircraft,payload,read_only,create_by,create_time,update_by,update_time,point_count from ard_route_info |
| | | <where> |
| | | <if test="groupId != null "> and group_id = #{groupId}</if> |
| | | </where> |