Browse Source

优化设备在线率tab页导出以及查询

develop
zhaoxianglong 4 months ago
parent
commit
76ddcad06e
  1. 4
      zc-business/src/main/java/com/zc/business/controller/DcDeviceOnlineController.java

4
zc-business/src/main/java/com/zc/business/controller/DcDeviceOnlineController.java

@ -70,6 +70,9 @@ public class DcDeviceOnlineController extends BaseController {
if(StringUtil.isEmpty(params.getOrderByField()) ||"time".equals(params.getOrderByField())) {
params.setOrderByField("online_rate");
}
params.setStakeMark(params.getStakeMark().replace(" ","+"));
List<OnlineSum> sums = onlineSumService.queryByDeviceTypesOfToday(params);
Map<String,List<OnlineSum>> sumsMap = sums.stream().collect(Collectors.groupingBy(OnlineSum::getDeviceType));
LinkedHashMap<String,Object> map = new LinkedHashMap<>();
@ -96,6 +99,7 @@ public class DcDeviceOnlineController extends BaseController {
params.setOrderByField("online_rate");
}
startPage();
params.setStakeMark(params.getStakeMark().replace(" ","+"));
List<OnlineSum> sums = onlineSumService.queryByDeviceTypesOfToday(params);
/*Map<String,OnlineSum> onlineSumMap = redisCache.getCacheMap(RedisKeyConstants.DEVICE_ONLINE);
String date = LocalDate.now().toString();*/

Loading…
Cancel
Save