Browse Source

删除WIFI和蓝牙接口需要传场馆信息

wukai 2 years ago
parent
commit
ceb03d7163

+ 16 - 15
dayun-admin/src/main/java/com/jjt/biz/controller/ApiController.java

@@ -69,13 +69,14 @@ public class ApiController extends BaseController {
         try {
         try {
             i = deviceInfoService.insertDeviceInfo(deviceInfo);
             i = deviceInfoService.insertDeviceInfo(deviceInfo);
         } catch (Exception e) {
         } catch (Exception e) {
+            i = 0;
             if (e.getMessage().contains("Duplicate entry")) {
             if (e.getMessage().contains("Duplicate entry")) {
                 return AjaxResult.error("DEVICE_ID重复");
                 return AjaxResult.error("DEVICE_ID重复");
             } else {
             } else {
                 return AjaxResult.error(e.getMessage());
                 return AjaxResult.error(e.getMessage());
             }
             }
         }
         }
-        return toAjax(1);
+        return toAjax(i);
     }
     }
 
 
     /**
     /**
@@ -87,14 +88,14 @@ public class ApiController extends BaseController {
         infoList.forEach(vo -> {
         infoList.forEach(vo -> {
             WifiInfo info = new WifiInfo();
             WifiInfo info = new WifiInfo();
             info.setDeviceId(vo.getDeviceId());
             info.setDeviceId(vo.getDeviceId());
-            String[] vaId = vo.getVenueId().split("-");
-            Long vId = Long.parseLong(vaId[0]);
-            info.setVenueId(vId);
+//            String[] vaId = vo.getVenueId().split("-");
+//            Long vId = Long.parseLong(vaId[0]);
+//            info.setVenueId(vId);
+//            if (vaId.length > 1) {
+//                Long aId = Long.parseLong(vaId[1]);
+//                info.setAreaId(aId);
+//            }
             info.setIsIllegal("N");
             info.setIsIllegal("N");
-            if (vaId.length > 1) {
-                Long aId = Long.parseLong(vaId[1]);
-                info.setAreaId(aId);
-            }
             if (StringUtils.isNotEmpty(vo.getAuthPage())) {
             if (StringUtils.isNotEmpty(vo.getAuthPage())) {
                 String page = new String(Base64.decode(vo.getAuthPage()), StandardCharsets.UTF_8);
                 String page = new String(Base64.decode(vo.getAuthPage()), StandardCharsets.UTF_8);
                 IllegalVO illegal = isIllegal(page);
                 IllegalVO illegal = isIllegal(page);
@@ -147,14 +148,14 @@ public class ApiController extends BaseController {
         infoList.forEach(vo -> {
         infoList.forEach(vo -> {
             BluetoothInfo info = new BluetoothInfo();
             BluetoothInfo info = new BluetoothInfo();
             info.setDeviceId(vo.getDeviceId());
             info.setDeviceId(vo.getDeviceId());
-            String[] vaId = vo.getVenueId().split("-");
-            Long vId = Long.parseLong(vaId[0]);
-            info.setVenueId(vId);
+//            String[] vaId = vo.getVenueId().split("-");
+//            Long vId = Long.parseLong(vaId[0]);
+//            info.setVenueId(vId);
+//            if (vaId.length > 1) {
+//                Long aId = Long.parseLong(vaId[1]);
+//                info.setAreaId(aId);
+//            }
             info.setIsIllegal("N");
             info.setIsIllegal("N");
-            if (vaId.length > 1) {
-                Long aId = Long.parseLong(vaId[1]);
-                info.setAreaId(aId);
-            }
             info.setMac(vo.getMac());
             info.setMac(vo.getMac());
             info.setName(vo.getName());
             info.setName(vo.getName());
             info.setFileName(vo.getFileName());
             info.setFileName(vo.getFileName());

+ 18 - 0
dayun-admin/src/main/java/com/jjt/biz/controller/IndexController.java

@@ -63,6 +63,24 @@ public class IndexController extends BaseController {
         map.put("bluetoothNO", blues.size());
         map.put("bluetoothNO", blues.size());
         List venueInfos = venueInfoService.selectVenueInfoList(new VenueInfo());
         List venueInfos = venueInfoService.selectVenueInfoList(new VenueInfo());
         map.put("venueNO", venueInfos.size());
         map.put("venueNO", venueInfos.size());
+        List<InfoVO> infoVOS = new ArrayList<>();
+        InfoVO vo = new InfoVO();
+        vo.setBluetooth(12);
+        vo.setTotalBluetooth(100);
+        vo.setTotalWifi(300);
+        vo.setWifi(15);
+        vo.setLat("30.593938");
+        vo.setLng("104.243116");
+        infoVOS.add(vo);
+        vo = new InfoVO();
+        vo.setBluetooth(5);
+        vo.setTotalBluetooth(15);
+        vo.setWifi(21);
+        vo.setTotalWifi(400);
+        vo.setLat("30.546");
+        vo.setLng("104.113");
+        map.put("info", infoVOS);
+        infoVOS.add(vo);
         return map;
         return map;
     }
     }
 
 

+ 103 - 0
dayun-admin/src/main/java/com/jjt/biz/domain/InfoVO.java

@@ -0,0 +1,103 @@
+package com.jjt.biz.domain;
+
+import com.jjt.common.annotation.Excel;
+
+/**
+ * WIFI信息对象 wifi_info
+ *
+ * @author ruoyi
+ * @date 2023-07-06
+ */
+public class InfoVO {
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    private String lat;
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    private String lng;
+
+
+    /**
+     * wifi数量
+     */
+    private Integer wifi;
+    /**
+     * wifi数量
+     */
+    private Integer totalWifi;
+
+    /**
+     * 蓝牙数量
+     */
+    private Integer bluetooth;
+    /**
+     * 蓝牙数量
+     */
+    private Integer totalBluetooth;
+
+
+    public Integer getTotalWifi() {
+        return totalWifi;
+    }
+
+    public void setTotalWifi(Integer totalWifi) {
+        this.totalWifi = totalWifi;
+    }
+
+    public Integer getTotalBluetooth() {
+        return totalBluetooth;
+    }
+
+    public void setTotalBluetooth(Integer totalBluetooth) {
+        this.totalBluetooth = totalBluetooth;
+    }
+
+    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 Integer getWifi() {
+        return wifi;
+    }
+
+    public void setWifi(Integer wifi) {
+        this.wifi = wifi;
+    }
+
+    public Integer getBluetooth() {
+        return bluetooth;
+    }
+
+    public void setBluetooth(Integer bluetooth) {
+        this.bluetooth = bluetooth;
+    }
+
+    @Override
+    public String toString() {
+        return "InfoVO{" +
+                "lat='" + lat + '\'' +
+                ", lng='" + lng + '\'' +
+                ", wifi=" + wifi +
+                ", bluetooth=" + bluetooth +
+                '}';
+    }
+}