Răsfoiți Sursa

WIFI和蓝牙增加经纬度

wukai 1 an în urmă
părinte
comite
9e1ce4c5ba

+ 5 - 1
dayun-admin/src/main/java/com/jjt/biz/controller/ApiController.java

@@ -104,6 +104,8 @@ public class ApiController extends BaseController {
             info.setBssid(vo.getBssid());
             info.setSsid(vo.getSsid());
             info.setTime(vo.getTime());
+            info.setLat(vo.getLat());
+            info.setLng(vo.getLng());
             IllegalVO illegal = isIllegal(vo.getSsid());
             if (illegal.isIllegal()) {
                 info.setIsIllegal("Y");
@@ -154,7 +156,9 @@ public class ApiController extends BaseController {
             info.setFileName(vo.getFileName());
             info.setFilePath(vo.getFilePath());
             info.setTime(vo.getTime());
-
+            info.setLat(vo.getLat());
+            info.setLng(vo.getLng());
+            
             IllegalVO illegal = isIllegal(vo.getName());
             if (illegal.isIllegal()) {
                 info.setIsIllegal("Y");

+ 25 - 0
dayun-admin/src/main/java/com/jjt/biz/domain/BluetoothInfo.java

@@ -84,6 +84,16 @@ public class BluetoothInfo extends BaseEntity {
      */
     @Excel(name = "关键字类型")
     private String keyType;
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    private String lat;
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    private String lng;
 
     /**
      * 数据采集时间
@@ -92,6 +102,21 @@ public class BluetoothInfo extends BaseEntity {
     @Excel(name = "数据采集时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date time;
 
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
 
     public String getVenueName() {
         return venueName;

+ 26 - 0
dayun-admin/src/main/java/com/jjt/biz/domain/WifiInfo.java

@@ -69,6 +69,16 @@ public class WifiInfo extends BaseEntity {
      */
     @Excel(name = "关键字类型")
     private String keyType;
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    private String lat;
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    private String lng;
 
     /**
      * 数据采集时间
@@ -85,6 +95,22 @@ public class WifiInfo extends BaseEntity {
      */
     private String areaName;
 
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
+
     public String getVenueName() {
         return venueName;
     }

+ 24 - 0
dayun-admin/src/main/java/com/jjt/biz/vo/BluetoothInfoVO.java

@@ -53,6 +53,30 @@ public class BluetoothInfoVO {
     private String filePath;
 
     private Date time;
+    /**
+     * 纬度
+     */
+    private String lat;
+    /**
+     * 经度
+     */
+    private String lng;
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
 
     public void setbInfoId(Long bInfoId) {
         this.bInfoId = bInfoId;

+ 24 - 0
dayun-admin/src/main/java/com/jjt/biz/vo/WifiInfoVO.java

@@ -48,6 +48,30 @@ public class WifiInfoVO {
     private String authPage;
 
     private Date time;
+    /**
+     * 纬度
+     */
+    private String lat;
+    /**
+     * 经度
+     */
+    private String lng;
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
 
     public void setWifiInfoId(Long wifiInfoId) {
         this.wifiInfoId = wifiInfoId;

+ 1 - 1
dayun-admin/src/main/resources/application.yml

@@ -37,7 +37,7 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: test
+    active: dev
   # 文件上传
   servlet:
     multipart:

+ 12 - 2
dayun-admin/src/main/resources/mapper/biz/BluetoothInfoMapper.xml

@@ -18,6 +18,8 @@
         <result property="isIllegal" column="IS_ILLEGAL"/>
         <result property="keyType" column="KEY_TYPE"/>
         <result property="time" column="TIME"/>
+        <result property="lat" column="LAT"/>
+        <result property="lng" column="LNG"/>
     </resultMap>
 
     <sql id="selectBluetoothInfoVo">
@@ -30,13 +32,15 @@
                FILE_NAME,
                FILE_PATH,
                IS_ILLEGAL,
-               KEY_TYPE, TIME
+               KEY_TYPE,
+               LAT,
+               LNG, TIME
         from bluetooth_info
     </sql>
 
     <select id="selectBluetoothInfoList" parameterType="BluetoothInfo" resultMap="BluetoothInfoResult">
         select * from (select B_INFO_ID, DEVICE_ID, a.VENUE_ID,b.VENUE_NAME, a.AREA_ID,c.area_name, MAC, NAME,
-        FILE_NAME, FILE_PATH, IS_ILLEGAL, KEY_TYPE, TIME from bluetooth_info a left join venue_info b on
+        FILE_NAME, FILE_PATH, IS_ILLEGAL, KEY_TYPE,LAT,LNG, TIME from bluetooth_info a left join venue_info b on
         a.venue_id=b.venue_id left join venue_area
         c on a.AREA_ID=c.area_id ) t
         <where>
@@ -73,6 +77,8 @@
             <if test="isIllegal != null">IS_ILLEGAL,</if>
             <if test="keyType != null">KEY_TYPE,</if>
             <if test="time != null">TIME,</if>
+            <if test="lat != null">LAT,</if>
+            <if test="lng != null">LNG,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="deviceId != null">#{deviceId},</if>
@@ -85,6 +91,8 @@
             <if test="isIllegal != null">#{isIllegal},</if>
             <if test="keyType != null">#{keyType},</if>
             <if test="time != null">#{time},</if>
+            <if test="lat != null">#{lat},</if>
+            <if test="lng != null">#{lng},</if>
         </trim>
     </insert>
 
@@ -101,6 +109,8 @@
             <if test="isIllegal != null">IS_ILLEGAL = #{isIllegal},</if>
             <if test="keyType != null">KEY_TYPE = #{keyType},</if>
             <if test="time != null">TIME = #{time},</if>
+            <if test="lat != null">LAT=#{lat},</if>
+            <if test="lng != null">LNG=#{lng},</if>
         </trim>
         where B_INFO_ID = #{bInfoId}
     </update>

+ 17 - 4
dayun-admin/src/main/resources/mapper/biz/WifiInfoMapper.xml

@@ -17,6 +17,8 @@
         <result property="isIllegal" column="IS_ILLEGAL"/>
         <result property="keyType" column="KEY_TYPE"/>
         <result property="time" column="TIME"/>
+        <result property="lat" column="LAT"/>
+        <result property="lng" column="LNG"/>
     </resultMap>
 
     <sql id="selectWifiInfoVo">
@@ -28,13 +30,16 @@
                SSID,
                AUTH_PAGE,
                IS_ILLEGAL,
-               KEY_TYPE, TIME
+               KEY_TYPE,
+               LAT,
+               LNG, TIME
         from wifi_info
     </sql>
 
     <select id="selectWifiInfoList" parameterType="WifiInfo" resultMap="WifiInfoResult">
-        select * from (select WIFI_INFO_ID, DEVICE_ID, a.VENUE_ID,b.VENUE_NAME, a.AREA_ID,c.area_name, BSSID, SSID, AUTH_PAGE,
-        IS_ILLEGAL, KEY_TYPE, TIME from wifi_info a left join venue_info b on a.venue_id=b.venue_id left join venue_area
+        select * from (select WIFI_INFO_ID, DEVICE_ID, a.VENUE_ID,b.VENUE_NAME, a.AREA_ID,c.area_name, BSSID, SSID,
+        AUTH_PAGE,
+        IS_ILLEGAL, KEY_TYPE,LAT,LNG, TIME from wifi_info a left join venue_info b on a.venue_id=b.venue_id left join venue_area
         c on a.AREA_ID=c.area_id ) t
         <where>
             <if test="deviceId != null  and deviceId != ''">and DEVICE_ID = #{deviceId}</if>
@@ -46,7 +51,9 @@
             <if test="isIllegal != null  and isIllegal != ''">and IS_ILLEGAL = #{isIllegal}</if>
             <if test="keyType != null  and keyType != ''">and KEY_TYPE = #{keyType}</if>
             <if test="time != null ">and TIME = #{time}</if>
-            <if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and TIME between #{params.beginTime} and #{params.endTime}</if>
+            <if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
+                and TIME between #{params.beginTime} and #{params.endTime}
+            </if>
         </where>
     </select>
 
@@ -67,6 +74,8 @@
             <if test="isIllegal != null">IS_ILLEGAL,</if>
             <if test="keyType != null">KEY_TYPE,</if>
             <if test="time != null">TIME,</if>
+            <if test="lat != null">LAT,</if>
+            <if test="lng != null">LNG,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="deviceId != null">#{deviceId},</if>
@@ -78,6 +87,8 @@
             <if test="isIllegal != null">#{isIllegal},</if>
             <if test="keyType != null">#{keyType},</if>
             <if test="time != null">#{time},</if>
+            <if test="lat != null">#{lat},</if>
+            <if test="lng != null">#{lng},</if>
         </trim>
     </insert>
 
@@ -93,6 +104,8 @@
             <if test="isIllegal != null">IS_ILLEGAL = #{isIllegal},</if>
             <if test="keyType != null">KEY_TYPE = #{keyType},</if>
             <if test="time != null">TIME = #{time},</if>
+            <if test="lat != null">LAT=#{lat},</if>
+            <if test="lng != null">LNG=#{lng},</if>
         </trim>
         where WIFI_INFO_ID = #{wifiInfoId}
     </update>