|
@@ -654,6 +654,27 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
} else {
|
|
} else {
|
|
dto.setActiveState("1");
|
|
dto.setActiveState("1");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Integer busyStatus = dto.getBusyStatus();
|
|
|
|
+ Integer onlineStatus = dto.getOnlineStatus();
|
|
|
|
+ Integer deviceType = dto.getDeviceType();
|
|
|
|
+ //条件查询 在线状态,运营状态,设备类型,
|
|
|
|
+ List<Long> deviceIdList = new ArrayList<>();
|
|
|
|
+ if (deviceId != null) {
|
|
|
|
+ deviceIdList.add(deviceId);
|
|
|
|
+ }
|
|
|
|
+ if (onlineStatus != null) {
|
|
|
|
+ List<DeviceStatus> deviceStatusList = deviceStatusService.list(Wrappers.<DeviceStatus>lambdaQuery()
|
|
|
|
+ .eq(onlineStatus != null, DeviceStatus::getNetState, onlineStatus)
|
|
|
|
+ );
|
|
|
|
+ if (CollUtil.isNotEmpty(deviceStatusList)) {
|
|
|
|
+ List<Long> dbDeviceIdList = deviceStatusList.stream().map(DeviceStatus::getDeviceId).collect(Collectors.toList());
|
|
|
|
+ deviceIdList.addAll(dbDeviceIdList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ dto.setDeviceIdList(deviceIdList);
|
|
|
|
+
|
|
List<DeviceInfoDto.MercHomeCountVO> list = this.baseMapper.merHomeCountList(dto);
|
|
List<DeviceInfoDto.MercHomeCountVO> list = this.baseMapper.merHomeCountList(dto);
|
|
if (CollUtil.isEmpty(list)) {
|
|
if (CollUtil.isEmpty(list)) {
|
|
return R.ok(Collections.emptyList());
|
|
return R.ok(Collections.emptyList());
|
|
@@ -664,7 +685,9 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
//非质检商户才需要激活
|
|
//非质检商户才需要激活
|
|
lqw.eq(!isQa, DeviceInfo::getActiveState, DeviceActiveStateEnum.TRUE.getCode());
|
|
lqw.eq(!isQa, DeviceInfo::getActiveState, DeviceActiveStateEnum.TRUE.getCode());
|
|
lqw.eq(mercId != null, DeviceInfo::getMercId, mercId);
|
|
lqw.eq(mercId != null, DeviceInfo::getMercId, mercId);
|
|
- lqw.eq(deviceId != null, DeviceInfo::getDeviceId, deviceId);
|
|
|
|
|
|
+ lqw.eq(busyStatus != null, DeviceInfo::getBusyState, busyStatus);
|
|
|
|
+ lqw.eq(deviceType != null, DeviceInfo::getDeviceType, deviceType);
|
|
|
|
+ lqw.in(CollUtil.isNotEmpty(deviceIdList), DeviceInfo::getDeviceId, deviceIdList);
|
|
lqw.like(StrUtil.isNotEmpty(deviceName), DeviceInfo::getDeviceName, deviceName).orderByAsc(true, DeviceInfo::getDeviceName, DeviceInfo::getDeviceId);
|
|
lqw.like(StrUtil.isNotEmpty(deviceName), DeviceInfo::getDeviceName, deviceName).orderByAsc(true, DeviceInfo::getDeviceName, DeviceInfo::getDeviceId);
|
|
List<DeviceInfo> deviceInfoList = this.list(lqw);
|
|
List<DeviceInfo> deviceInfoList = this.list(lqw);
|
|
//未分配线路的设置默认值
|
|
//未分配线路的设置默认值
|