|
@@ -679,25 +679,34 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
dto.setActiveState("1");
|
|
|
}
|
|
|
|
|
|
+ List<Long> myDeviceIds = dto.getDeviceIdList();
|
|
|
|
|
|
Integer busyStatus = dto.getBusyStatus();
|
|
|
Integer onlineStatus = dto.getOnlineStatus();
|
|
|
Integer deviceType = dto.getDeviceType();
|
|
|
//条件查询 在线状态,运营状态,设备类型,
|
|
|
List<Long> deviceIdList = new ArrayList<>();
|
|
|
- if (deviceId != null) {
|
|
|
+ if (deviceId != null && myDeviceIds.contains(deviceId)) {
|
|
|
deviceIdList.add(deviceId);
|
|
|
}
|
|
|
+ if (CollUtil.isNotEmpty(myDeviceIds)) {
|
|
|
+ deviceIdList.addAll(myDeviceIds);
|
|
|
+ }
|
|
|
+
|
|
|
if (onlineStatus != null) {
|
|
|
List<DeviceStatus> deviceStatusList = deviceStatusService.list(Wrappers.<DeviceStatus>lambdaQuery()
|
|
|
.eq(onlineStatus != null, DeviceStatus::getNetState, onlineStatus)
|
|
|
+ .in(CollUtil.isNotEmpty(myDeviceIds), DeviceStatus::getDeviceId, deviceIdList)
|
|
|
);
|
|
|
if (CollUtil.isNotEmpty(deviceStatusList)) {
|
|
|
List<Long> dbDeviceIdList = deviceStatusList.stream().map(DeviceStatus::getDeviceId).collect(Collectors.toList());
|
|
|
deviceIdList.addAll(dbDeviceIdList);
|
|
|
}
|
|
|
}
|
|
|
- dto.setDeviceIdList(deviceIdList);
|
|
|
+ if (CollUtil.isNotEmpty(deviceIdList)) {
|
|
|
+ dto.setDeviceIdList(deviceIdList);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
List<DeviceInfoDto.MercHomeCountVO> list = this.baseMapper.merHomeCountList(dto);
|
|
|
if (CollUtil.isEmpty(list)) {
|
|
@@ -708,7 +717,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
LambdaQueryWrapper<DeviceInfo> lqw = new LambdaQueryWrapper<>();
|
|
|
//非质检商户才需要激活
|
|
|
lqw.eq(!isQa, DeviceInfo::getActiveState, DeviceActiveStateEnum.TRUE.getCode());
|
|
|
- lqw.eq(mercId != null, DeviceInfo::getMercId, mercId);
|
|
|
+ lqw.eq(mercId != null && CollUtil.isEmpty(myDeviceIds), DeviceInfo::getMercId, mercId);
|
|
|
lqw.eq(busyStatus != null, DeviceInfo::getBusyState, busyStatus);
|
|
|
lqw.eq(deviceType != null, DeviceInfo::getDeviceType, deviceType);
|
|
|
lqw.in(CollUtil.isNotEmpty(deviceIdList), DeviceInfo::getDeviceId, deviceIdList);
|