ソースを参照

无人机航飞接口

DESKTOP-2K9OVK9\siwei 1 ヶ月 前
コミット
1f736f084a

+ 10 - 5
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/gdbh/TGdbhGdController.java

@@ -1,14 +1,13 @@
 package com.onemap.apply.controller.gdbh;
 
+import com.onemap.apply.domain.gdbh.TGdbhFlightBatchDto;
 import com.onemap.apply.domain.gdbh.TGdbhGdServerDTO;
 import com.onemap.apply.service.gdbh.ITGdbhGdService;
 import com.onemap.common.core.utils.StringUtils;
 import com.onemap.common.core.web.controller.BaseController;
 import com.onemap.common.core.web.domain.AjaxResult;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 /**
@@ -57,7 +56,7 @@ public class TGdbhGdController extends BaseController {
      * 变化规律
      *
      * @param xzqhdm 12
-     * @param dlbm 12
+     * @param dlbm   12
      */
     @GetMapping("/ntzlbhqk")
     public AjaxResult ntzlbhqk(String sourceyear, String targeyear, String xzqhdm, String dlbm) {
@@ -78,7 +77,7 @@ public class TGdbhGdController extends BaseController {
      * 变化规律
      *
      * @param xzqhdm 1
-     * @param dlbm 1
+     * @param dlbm   1
      * @return
      */
     @GetMapping("/ntzllnbhqk")
@@ -100,4 +99,10 @@ public class TGdbhGdController extends BaseController {
         return success(itGdbhGdService.ntzlqxfl(year, xzqhdm, dlbm));
     }
 
+    @PostMapping("/uav/query")
+    public AjaxResult uavQuery(@RequestBody TGdbhFlightBatchDto tGdbhFlightBatchDto) {
+        return success(itGdbhGdService.uavQuery(tGdbhFlightBatchDto));
+    }
+
+
 }

+ 51 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/gdbh/TGdbhFlightBatchDto.java

@@ -0,0 +1,51 @@
+package com.onemap.apply.domain.gdbh;
+
+import java.util.List;
+
+public class TGdbhFlightBatchDto {
+
+    private String id;
+    private String batch;
+    private String batch_time;
+    private List<TGdbhFlightVideoDto> videoDtoList;
+    private List<TGdbhFlightDto> flightDtoList;
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getBatch() {
+        return batch;
+    }
+
+    public void setBatch(String batch) {
+        this.batch = batch;
+    }
+
+    public String getBatch_time() {
+        return batch_time;
+    }
+
+    public void setBatch_time(String batch_time) {
+        this.batch_time = batch_time;
+    }
+
+    public List<TGdbhFlightVideoDto> getVideoDtoList() {
+        return videoDtoList;
+    }
+
+    public void setVideoDtoList(List<TGdbhFlightVideoDto> videoDtoList) {
+        this.videoDtoList = videoDtoList;
+    }
+
+    public List<TGdbhFlightDto> getFlightDtoList() {
+        return flightDtoList;
+    }
+
+    public void setFlightDtoList(List<TGdbhFlightDto> flightDtoList) {
+        this.flightDtoList = flightDtoList;
+    }
+}

+ 154 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/gdbh/TGdbhFlightDto.java

@@ -0,0 +1,154 @@
+package com.onemap.apply.domain.gdbh;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+public class TGdbhFlightDto {
+
+    //    @TableField(exist = false)
+    private String id;
+    private String photo_path;
+    private String longitude;
+    private String latitude;
+    private String height;
+    private String omega;
+    private String phi;
+    private String kappa;
+    private String quality;
+    private String solve_type;
+    private String gps_time;
+    private String batch;
+    private String batch_time;
+    private String geom;
+    private String photo_name;
+    private Double[] pngenvelope;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getPhoto_path() {
+        return photo_path;
+    }
+
+    public void setPhoto_path(String photo_path) {
+        this.photo_path = photo_path;
+    }
+
+    public String getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(String longitude) {
+        this.longitude = longitude;
+    }
+
+    public String getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(String latitude) {
+        this.latitude = latitude;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getOmega() {
+        return omega;
+    }
+
+    public void setOmega(String omega) {
+        this.omega = omega;
+    }
+
+    public String getPhi() {
+        return phi;
+    }
+
+    public void setPhi(String phi) {
+        this.phi = phi;
+    }
+
+    public String getKappa() {
+        return kappa;
+    }
+
+    public void setKappa(String kappa) {
+        this.kappa = kappa;
+    }
+
+    public String getQuality() {
+        return quality;
+    }
+
+    public void setQuality(String quality) {
+        this.quality = quality;
+    }
+
+    public String getSolve_type() {
+        return solve_type;
+    }
+
+    public void setSolve_type(String solve_type) {
+        this.solve_type = solve_type;
+    }
+
+    public String getGps_time() {
+        return gps_time;
+    }
+
+    public void setGps_time(String gps_time) {
+        this.gps_time = gps_time;
+    }
+
+    public String getBatch() {
+        return batch;
+    }
+
+    public void setBatch(String batch) {
+        this.batch = batch;
+    }
+
+    public String getBatch_time() {
+        return batch_time;
+    }
+
+    public void setBatch_time(String batch_time) {
+        this.batch_time = batch_time;
+    }
+
+    public String getGeom() {
+        return geom;
+    }
+
+    public void setGeom(String geom) {
+        this.geom = geom;
+    }
+
+
+    public String getPhoto_name() {
+        return photo_name;
+    }
+
+    public void setPhoto_name(String photo_name) {
+        this.photo_name = photo_name;
+    }
+
+    public Double[] getPngenvelope() {
+        return pngenvelope;
+    }
+
+    public void setPngenvelope(Double[] pngenvelope) {
+        this.pngenvelope = pngenvelope;
+    }
+}

+ 59 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/gdbh/TGdbhFlightVideoDto.java

@@ -0,0 +1,59 @@
+package com.onemap.apply.domain.gdbh;
+
+public class TGdbhFlightVideoDto {
+
+    private String id;
+    private String batch;
+    private String video_time;
+    private String video_path;
+    private String video_name;
+    private String video_type;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getBatch() {
+        return batch;
+    }
+
+    public void setBatch(String batch) {
+        this.batch = batch;
+    }
+
+    public String getVideo_time() {
+        return video_time;
+    }
+
+    public void setVideo_time(String video_time) {
+        this.video_time = video_time;
+    }
+
+    public String getVideo_path() {
+        return video_path;
+    }
+
+    public void setVideo_path(String video_path) {
+        this.video_path = video_path;
+    }
+
+    public String getVideo_name() {
+        return video_name;
+    }
+
+    public void setVideo_name(String video_name) {
+        this.video_name = video_name;
+    }
+
+    public String getVideo_type() {
+        return video_type;
+    }
+
+    public void setVideo_type(String video_type) {
+        this.video_type = video_type;
+    }
+}

+ 11 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/gdbh/TGdbhFlightBatchMapper.java

@@ -0,0 +1,11 @@
+package com.onemap.apply.mapper.gdbh;
+
+import com.onemap.apply.domain.gdbh.TGdbhFlightBatchDto;
+
+import java.util.List;
+
+public interface TGdbhFlightBatchMapper {
+
+    public List<TGdbhFlightBatchDto> selectList();
+
+}

+ 11 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/gdbh/TGdbhFlightMapper.java

@@ -0,0 +1,11 @@
+package com.onemap.apply.mapper.gdbh;
+
+import com.onemap.apply.domain.gdbh.TGdbhFlightDto;
+
+import java.util.List;
+
+public interface TGdbhFlightMapper {
+
+    public List<TGdbhFlightDto> selectList(TGdbhFlightDto dto);
+
+}

+ 11 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/gdbh/TGdbhFlightVideoMapper.java

@@ -0,0 +1,11 @@
+package com.onemap.apply.mapper.gdbh;
+
+import com.onemap.apply.domain.gdbh.TGdbhFlightVideoDto;
+
+import java.util.List;
+
+public interface TGdbhFlightVideoMapper {
+
+    public List<TGdbhFlightVideoDto> selectList(TGdbhFlightVideoDto tGdbhFlightVideoDto);
+
+}

+ 4 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/ITGdbhGdService.java

@@ -1,5 +1,8 @@
 package com.onemap.apply.service.gdbh;
 
+import com.onemap.apply.domain.gdbh.TGdbhFlightBatchDto;
+import com.onemap.apply.domain.gdbh.TGdbhFlightBatchDto;
+import com.onemap.apply.domain.gdbh.TGdbhFlightDto;
 import com.onemap.apply.domain.gdbh.TGdbhGdServerDTO;
 import com.onemap.apply.domain.gdbh.TGdbhYjjbntServerDTO;
 
@@ -25,5 +28,5 @@ public interface ITGdbhGdService {
     List<Map<String, Object>> ntzllnbhqk(String xzqhdm, String dlbm);
 
     List<Map<String, Object>> ntzlqxfl(String year, String xzqhdm, String dlbm);
-
+    List<TGdbhFlightBatchDto> uavQuery(TGdbhFlightBatchDto tGdbhFlightBatchDto);
 }

+ 27 - 6
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/TGdbhGdServiceImpl.java

@@ -1,11 +1,7 @@
 package com.onemap.apply.service.gdbh.impl;
 
-import com.onemap.apply.domain.gdbh.TGdbhGdServerDTO;
-import com.onemap.apply.domain.gdbh.TGdbhYjjbntServerDTO;
-import com.onemap.apply.mapper.gdbh.TGdbhGdMapper;
-import com.onemap.apply.mapper.gdbh.TGdbhGdServerMapper;
-import com.onemap.apply.mapper.gdbh.TGdbhYjjbntMapper;
-import com.onemap.apply.mapper.gdbh.TGdbhYjjbntServerMapper;
+import com.onemap.apply.domain.gdbh.*;
+import com.onemap.apply.mapper.gdbh.*;
 import com.onemap.apply.service.gdbh.ITGdbhGdService;
 import com.onemap.common.core.utils.StringUtils;
 import org.springframework.stereotype.Service;
@@ -30,6 +26,12 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService {
     private TGdbhGdServerMapper tGdbhGdServerMapper;
     @Resource
     private TGdbhGdMapper tGdbhGdMapper;
+    @Resource
+    private TGdbhFlightMapper tGdbhFlightMapper;
+    @Resource
+    private TGdbhFlightBatchMapper tGdbhFlightBatchMapper;
+    @Resource
+    private TGdbhFlightVideoMapper tGdbhFlightVideoMapper;
 
     @Override
     public List<TGdbhGdServerDTO> selectTGdbhGdServerList(TGdbhGdServerDTO tGdbhGdServer) {
@@ -152,4 +154,23 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService {
         return retMap;
     }
 
+    @Override
+    public List<TGdbhFlightBatchDto> uavQuery(TGdbhFlightBatchDto tGdbhFlightBatchDto) {
+        List<TGdbhFlightBatchDto> bathDtos = tGdbhFlightBatchMapper.selectList();
+        for (TGdbhFlightBatchDto bathDto : bathDtos) {
+            if (StringUtils.isNotEmpty(bathDto.getBatch())){
+                TGdbhFlightVideoDto queryvideo = new TGdbhFlightVideoDto();
+                queryvideo.setBatch(bathDto.getBatch());
+                List<TGdbhFlightVideoDto> videoDtoList = tGdbhFlightVideoMapper.selectList(queryvideo);
+                bathDto.setVideoDtoList(videoDtoList);
+                TGdbhFlightDto queryFlightDto = new TGdbhFlightDto();
+                queryFlightDto.setBatch(bathDto.getBatch());
+                List<TGdbhFlightDto> flightDtoList = tGdbhFlightMapper.selectList(queryFlightDto);
+                bathDto.setFlightDtoList(flightDtoList);
+            }
+
+        }
+        return bathDtos;
+    }
+
 }

+ 20 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/gdbh/TGdbhFlightBathMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.gdbh.TGdbhFlightBatchMapper">
+
+    <resultMap type="TGdbhFlightBatchDto" id="TGdbhFlightBatchDtoResult">
+        <result property="id" column="id"/>
+        <result property="batch" column="batch"/>
+        <result property="batch_time" column="batch_time"/>
+    </resultMap>
+
+
+    <select id="selectList" resultMap="TGdbhFlightBatchDtoResult">
+        SELECT *
+        FROM t_gdbh_flight_bath inTbale
+        order by batch_time asc
+    </select>
+
+</mapper>

+ 39 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/gdbh/TGdbhFlightMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.gdbh.TGdbhFlightMapper">
+
+    <resultMap type="TGdbhFlightDto" id="TGdbhFlightDtoResult">
+        <result property="id" column="id"/>
+        <result property="photo_path" column="photo_path"/>
+        <result property="longitude" column="longitude"/>
+        <result property="latitude" column="latitude"/>
+        <result property="height" column="height"/>
+        <result property="omega" column="omega"/>
+        <result property="phi" column="phi"/>
+        <result property="kappa" column="kappa"/>
+        <result property="quality" column="quality"/>
+        <result property="solve_type" column="solve_type"/>
+        <result property="gps_time" column="gps_time"/>
+        <result property="batch" column="batch"/>
+        <result property="batch_time" column="batch_time"/>
+        <result property="geom" column="geom"/>
+        <result property="photo_name" column="photo_name"/>
+        <result property="pngenvelope" column="pngenvelope" jdbcType="ARRAY" typeHandler="org.apache.ibatis.type.ArrayTypeHandler"/>
+    </resultMap>
+
+
+    <select id="selectList" parameterType="TGdbhFlightDto" resultMap="TGdbhFlightDtoResult">
+        SELECT id,photo_path,longitude,latitude,height,omega,phi,kappa,quality,solve_type,gps_time,batch,
+        batch_time,photo_name,ARRAY[ public.ST_XMin(geom),public.ST_YMin(geom),public.ST_XMax(geom),public.ST_YMax(geom)] as pngenvelope
+        FROM t_gdbh_flight inTbale
+        <where>
+            <if test="batch!=null and batch!='' ">
+                and batch = #{batch}
+            </if>
+        </where>
+        order by photo_name asc
+    </select>
+
+</mapper>

+ 28 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/gdbh/TGdbhFlightVideoMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.gdbh.TGdbhFlightVideoMapper">
+
+    <resultMap type="TGdbhFlightVideoDto" id="TGdbhFlightVideoDtoResult">
+        <result property="id" column="id"/>
+        <result property="batch" column="batch"/>
+        <result property="video_time" column="video_time"/>
+        <result property="video_path" column="video_path"/>
+        <result property="video_type" column="video_type"/>
+        <result property="video_name" column="video_name"/>
+    </resultMap>
+
+
+    <select id="selectList" parameterType="TGdbhFlightVideoDto" resultMap="TGdbhFlightVideoDtoResult">
+        SELECT *
+        FROM t_gdbh_flight_video
+        <where>
+            <if test="batch!=null and batch!='' ">
+                and batch = #{batch}
+            </if>
+        </where>
+        order by video_time desc
+    </select>
+
+</mapper>