|
@@ -625,7 +625,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
lqw.eq(DeviceInfo::getActiveState, DeviceActiveStateEnum.TRUE.getCode());
|
|
lqw.eq(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(deviceId != null, DeviceInfo::getDeviceId, deviceId);
|
|
- lqw.like(StrUtil.isNotEmpty(deviceName), DeviceInfo::getDeviceName, deviceName).orderByAsc(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);
|
|
//未分配线路的设置默认值
|
|
//未分配线路的设置默认值
|
|
deviceInfoList.stream().filter(s -> s.getPlaceLineId() == null).forEach(s -> s.setPlaceLineId(-1L));
|
|
deviceInfoList.stream().filter(s -> s.getPlaceLineId() == null).forEach(s -> s.setPlaceLineId(-1L));
|
|
@@ -711,9 +711,10 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- //在线排序
|
|
|
|
|
|
+ //名称排序
|
|
if (CollUtil.isNotEmpty(deviceInfos)) {
|
|
if (CollUtil.isNotEmpty(deviceInfos)) {
|
|
- deviceInfos = ListUtil.sortByProperty(deviceInfos, LambdaUtils.getProperty(DeviceInfoDto.MercHomeDeviceVo::getNetState));
|
|
|
|
|
|
+ deviceInfos = ListUtil.sortByProperty(deviceInfos, LambdaUtils.getProperty(DeviceInfoDto.MercHomeDeviceVo::getDeviceName));
|
|
|
|
+ deviceInfos = ListUtil.sortByProperty(deviceInfos, LambdaUtils.getProperty(DeviceInfoDto.MercHomeDeviceVo::getDeviceId));
|
|
}
|
|
}
|
|
vo.setDeviceInfos(deviceInfos);
|
|
vo.setDeviceInfos(deviceInfos);
|
|
|
|
|