|
|
|
@ -93,7 +93,8 @@ public class wifiExcelBluetoothServiceImpl implements wifiExcelBluetoothService
|
|
|
|
|
wifiName= getSafeString(dataObject, "router");
|
|
|
|
|
}
|
|
|
|
|
//手机MAC
|
|
|
|
|
result.append(phoneMAC).append(",");
|
|
|
|
|
String mac = convertToUpper(phoneMAC);
|
|
|
|
|
result.append(mac).append(",");
|
|
|
|
|
//信号强度
|
|
|
|
|
result.append(getSafeString(dataObject, "rssi")).append(",");
|
|
|
|
|
//手机与采集设备之间的预估距离
|
|
|
|
@ -122,7 +123,8 @@ public class wifiExcelBluetoothServiceImpl implements wifiExcelBluetoothService
|
|
|
|
|
String collectDeviceIp = ExcelReader.getmap("collectDeviceIp", id);
|
|
|
|
|
result.append(collectDeviceIp).append(",");
|
|
|
|
|
//路由器mac
|
|
|
|
|
result.append(wifiMAC).append("\n");
|
|
|
|
|
String wifimac = convertToUpper(wifiMAC);
|
|
|
|
|
result.append(wifimac).append("\n");
|
|
|
|
|
|
|
|
|
|
results.append(result);
|
|
|
|
|
|
|
|
|
@ -295,8 +297,9 @@ public class wifiExcelBluetoothServiceImpl implements wifiExcelBluetoothService
|
|
|
|
|
result.append(timestamp).append(",");
|
|
|
|
|
|
|
|
|
|
//手机MAC
|
|
|
|
|
|
|
|
|
|
result.append(getSafeString(dataObject, "s")).append(",");
|
|
|
|
|
String safeString = getSafeString(dataObject, "s");
|
|
|
|
|
String convertToUpper = convertToUpper(safeString);
|
|
|
|
|
result.append(convertToUpper).append(",");
|
|
|
|
|
//信号强度
|
|
|
|
|
result.append(getSafeString(dataObject, "p")).append(",");
|
|
|
|
|
//手机与采集设备之间的预估距离
|
|
|
|
@ -317,7 +320,9 @@ public class wifiExcelBluetoothServiceImpl implements wifiExcelBluetoothService
|
|
|
|
|
String collectDeviceIp = ExcelReader.getmap("collectDeviceIp", gwid);
|
|
|
|
|
result.append(collectDeviceIp).append(",");
|
|
|
|
|
//路由器mac
|
|
|
|
|
result.append(getSafeString(dataObject, "a")).append("\n");
|
|
|
|
|
String a = getSafeString(dataObject, "a");
|
|
|
|
|
String a1 = convertToUpper(a);
|
|
|
|
|
result.append(a1).append("\n");
|
|
|
|
|
|
|
|
|
|
results.append(result);
|
|
|
|
|
|
|
|
|
@ -337,6 +342,31 @@ public class wifiExcelBluetoothServiceImpl implements wifiExcelBluetoothService
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String jsonParsingVer(String json) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
//解析json
|
|
|
|
|
JSONObject jsonObject = new JSONObject(json);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
System.out.println("捕获异常= "+e+"json:"+json);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return "{\"ap\":{\"pwd\":\"\",\"ssid\":\"\"},\"ftpserver\":{\"ip\":\"\",\"path\":\"\",\"port\":\"\",\"pwd\":\"\",\"user\":\"\"},\"httpserver\":{\"url\":\"\"},\"ntpserver\":{\"ip\":\"\"},\"reboot\":{\"value\":\"\"},\"runmode\":{\"value\":\"\"},\"transfer\":{\"value\":\"\"},\"upgrade\":{\"filename\":\"\",\"ftpport\":\"\",\"ftppwd\":\"\",\"ftpserver\":\"\",\"ftpuser\":\"\",\"isupgrade\":\"\",\"md5\":\"\",\"ver\":\"\"}}{\"ap\":{\"pwd\":\"\",\"ssid\":\"\"},\"ftpserver\":{\"ip\":\"\",\"path\":\"\",\"port\":\"\",\"pwd\":\"\",\"user\":\"\"},\"httpserver\":{\"url\":\"\"},\"ntpserver\":{\"ip\":\"\"},\"reboot\":{\"value\":\"\"},\"runmode\":{\"value\":\"\"},\"transfer\":{\"value\":\"\"},\"upgrade\":{\"filename\":\"\",\"ftpport\":\"\",\"ftppwd\":\"\",\"ftpserver\":\"\",\"ftpuser\":\"\",\"isupgrade\":\"\",\"md5\":\"\",\"ver\":\"\"}}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String convertToUpper(String input) {
|
|
|
|
|
// 检查输入是否为空
|
|
|
|
|
if (input == null || input.isEmpty()) {
|
|
|
|
|
return "null";
|
|
|
|
|
}
|
|
|
|
|
// 将所有小写字母转换为大写字母
|
|
|
|
|
return input.toUpperCase();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String decodeUrl(String encodedString) throws UnsupportedEncodingException {
|
|
|
|
|
if(StringUtils.isEmpty(encodedString)){
|
|
|
|
|