设备弹窗-供电数据接口增加实时数据realData以及对接口进行排序

This commit is contained in:
wuyw
2024-08-15 07:52:19 +08:00
parent 58b20a4b8d
commit c86a631cc5
5 changed files with 122 additions and 11 deletions

View File

@ -1635,6 +1635,7 @@ public class DeviceServiceImpl implements IDeviceService {
kvHashMap.put("beginTime", beginTime);
kvHashMap.put("endTime", endTime);
List<ThingsModel> thingsModels = thingsModelService.selectThingsModelList(new ThingsModel(device.getProductId()));
thingsModels.sort(Comparator.comparing(ThingsModel::getModelOrder));
List<DeviceLog> deviceLogs= logService.selectDataList(kvHashMap);
Map<String, List<DeviceLog>> collect = deviceLogs != null ? deviceLogs.stream().collect(Collectors.groupingBy(t -> t.getIdentity())): new HashMap();
for (ThingsModel modelDevice : thingsModels) {