|
@@ -21,6 +21,7 @@ import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 蓝牙信息Controller
|
|
* 蓝牙信息Controller
|
|
@@ -48,14 +49,18 @@ public class IndexController extends BaseController {
|
|
Map<String, Object> map = new HashMap<>(16);
|
|
Map<String, Object> map = new HashMap<>(16);
|
|
List deviceInfos = deviceInfoService.selectDeviceInfoList(new DeviceInfo());
|
|
List deviceInfos = deviceInfoService.selectDeviceInfoList(new DeviceInfo());
|
|
map.put("deviceNO", deviceInfos.size());
|
|
map.put("deviceNO", deviceInfos.size());
|
|
- WifiInfo wifiInfo = new WifiInfo();
|
|
|
|
- wifiInfo.setIsIllegal("Y");
|
|
|
|
- List wifiInfos = wifiInfoService.selectWifiInfoList(wifiInfo);
|
|
|
|
- map.put("wifiNO", wifiInfos.size());
|
|
|
|
- BluetoothInfo bluetoothInfo = new BluetoothInfo();
|
|
|
|
- bluetoothInfo.setIsIllegal("Y");
|
|
|
|
- List bluetoothInfos = bluetoothInfoService.selectBluetoothInfoList(bluetoothInfo);
|
|
|
|
- map.put("bluetoothNO", bluetoothInfos.size());
|
|
|
|
|
|
+ List<WifiInfo> wifiInfos = wifiInfoService.selectWifiInfoList(new WifiInfo());
|
|
|
|
+ List wifis = wifiInfos.stream()
|
|
|
|
+ .filter(bean -> bean.getIsIllegal().equals("Y"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ map.put("totalWifiNO", wifiInfos.size());
|
|
|
|
+ map.put("wifiNO", wifis.size());
|
|
|
|
+ List<BluetoothInfo> bluetoothInfos = bluetoothInfoService.selectBluetoothInfoList(new BluetoothInfo());
|
|
|
|
+ List blues = bluetoothInfos.stream()
|
|
|
|
+ .filter(bean -> bean.getIsIllegal().equals("Y"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ map.put("totalBluetoothNO", bluetoothInfos.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());
|
|
return map;
|
|
return map;
|