|
@@ -705,7 +705,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
Integer deviceType = dto.getDeviceType();
|
|
|
//条件查询 在线状态,运营状态,设备类型,
|
|
|
List<Long> deviceIdList = new ArrayList<>();
|
|
|
- if (deviceId != null && myDeviceIds.contains(deviceId)) {
|
|
|
+ if (deviceId != null && myDeviceIds.indexOf(deviceId) > 0) {
|
|
|
deviceIdList.add(deviceId);
|
|
|
}
|
|
|
|
|
@@ -727,16 +727,17 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
dto.setDeviceIdList(deviceIdList);
|
|
|
List<Long> queryDeviceIds = new ArrayList<>();
|
|
|
if (CollUtil.isNotEmpty(searchDeviceIds)) {
|
|
|
- searchDeviceIds.forEach(id -> {
|
|
|
+ for (Long id : searchDeviceIds) {
|
|
|
int index = deviceIdList.indexOf(id);
|
|
|
if (index > 0) {
|
|
|
queryDeviceIds.add(id);
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
//无符合权限的搜索设备,返空
|
|
|
if (CollUtil.isEmpty(queryDeviceIds)) {
|
|
|
return R.ok(new ArrayList<>());
|
|
|
} else {
|
|
|
+ deviceIdList = queryDeviceIds;
|
|
|
dto.setDeviceIdList(queryDeviceIds);
|
|
|
}
|
|
|
}
|