diff --git a/zc-business/src/main/java/com/zc/business/controller/DcDeviceOnlineController.java b/zc-business/src/main/java/com/zc/business/controller/DcDeviceOnlineController.java index 38c956e7..5b1d8ee5 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcDeviceOnlineController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcDeviceOnlineController.java @@ -120,23 +120,7 @@ public class DcDeviceOnlineController extends BaseController { params.setStakeMark(stakeMark.replace(UniversalEnum.BLANK_SPACE.getValue(), UniversalEnum.PLUS_SIGN.getValue())); } List sums = onlineSumService.queryByDeviceTypesOfToday(params); - // 按桩号排序 - List sortedSums = sums.stream() - .sorted(Comparator.comparing(OnlineSum::getStakeMark)) - .collect(Collectors.toList()); - /*Map onlineSumMap = redisCache.getCacheMap(RedisKeyConstants.DEVICE_ONLINE); - String date = LocalDate.now().toString();*/ - /*for (OnlineSum sum : sums) { - String deviceId = sum.getDeviceId().toString(); - String hKey = date+":"+deviceId; - OnlineSum online = onlineSumMap.get(hKey); - if(ObjectUtils.isEmpty(online)) { - continue; - } - sum.setLastOnlineTime(onlineSumMap.get(hKey).getLastOnlineTime()); - sum.setDeviceStatus(onlineSumMap.get(hKey).getDeviceStatus()); - }*/ - return getDataTable(sortedSums); + return getDataTable(sums); } //按时间划分设备柱状图 diff --git a/zc-business/src/main/resources/mapper/OnlineSumMapper.xml b/zc-business/src/main/resources/mapper/OnlineSumMapper.xml index 3e380ba5..54170e22 100644 --- a/zc-business/src/main/resources/mapper/OnlineSumMapper.xml +++ b/zc-business/src/main/resources/mapper/OnlineSumMapper.xml @@ -119,8 +119,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and d.use_state = #{useState} + order by d.stake_mark - order by ${orderByField} ${orderDirection} + , ${orderByField} ${orderDirection}