|
@@ -411,47 +411,6 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-// List<Map<String,Object>> returnList = new ArrayList<>();
|
|
|
-// for (HtAnalogDataVo htAnalogDataVo:yearOnYearList) {
|
|
|
-// Field[] fields = htAnalogDataVo.getClass().getDeclaredFields();
|
|
|
-// Map<String,Object> map = new HashMap<>();
|
|
|
-// for (String fiied:list) {
|
|
|
-// for (int i = 0; i < fields.length; i++) {
|
|
|
-// fields[i].setAccessible(true);
|
|
|
-// if (fiied.equals(fields[i].getName())){
|
|
|
-// try {
|
|
|
-// if (fiied.equals("dataTime")){
|
|
|
-// map.put(fiied,fields[i].get(htAnalogDataVo));
|
|
|
-// }else {
|
|
|
-// map.put(fields[2].get(htAnalogDataVo)+"_"+fiied,fields[i].get(htAnalogDataVo));
|
|
|
-// }
|
|
|
-// }catch (Exception e){
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// Map<String,Object> deviceMap = new HashMap<>();
|
|
|
-// deviceMap.put("deviceName",htAnalogDataVo.getDeviceName());
|
|
|
-// deviceMap.put("monitorDeviceName",htAnalogDataVo.getMonitorDeviceName());
|
|
|
-// deviceMap.put("deviceAttributeId",htAnalogDataVo.getDeviceAttributeId());
|
|
|
-// deviceMap.put("data",map);
|
|
|
-// returnList.add(deviceMap);
|
|
|
-// }
|
|
|
-// List<CommonIcoVO> reList = new ArrayList<>();
|
|
|
-// Map<String, List<Map<String, Object>>> glist = returnList.stream().collect(Collectors.groupingBy(e -> e.get("deviceAttributeId").toString()));
|
|
|
-// for (String key:glist.keySet()) {
|
|
|
-// List<Object> objectList = new ArrayList<>();
|
|
|
-// List<Map<String, Object>> maps = glist.get(key);
|
|
|
-// for (Map<String,Object> map:maps) {
|
|
|
-// objectList.add(map.get("data"));
|
|
|
-// }
|
|
|
-// reList.add(CommonIcoVO.builder().name(key).list(objectList).listDate(objectList).build());
|
|
|
-// }
|
|
|
return reListOne;
|
|
|
}
|
|
|
|
|
@@ -552,68 +511,6 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-// List<Map<String,Object>> returnList = new ArrayList<>();
|
|
|
-// for (HtAnalogDataVo htAnalogDataVo:currentPeriodRingRatioList) {
|
|
|
-// Field[] fields = htAnalogDataVo.getClass().getDeclaredFields();
|
|
|
-// Map<String,Object> map = new HashMap<>();
|
|
|
-// for (String fiied:list) {
|
|
|
-// for (int i = 0; i < fields.length; i++) {
|
|
|
-// fields[i].setAccessible(true);
|
|
|
-// if (fiied.equals(fields[i].getName())){
|
|
|
-// try {
|
|
|
-// if (fiied.equals("dataTime")){
|
|
|
-// map.put(fiied,fields[i].get(htAnalogDataVo));
|
|
|
-// }
|
|
|
-// String targetValue = fields[2].get(htAnalogDataVo) + "_" + fields[i].getName();
|
|
|
-// if (dataManagementOneVO.getDisplayField().contains(targetValue)){
|
|
|
-// map.put(targetValue,fields[i].get(htAnalogDataVo));
|
|
|
-// }
|
|
|
-//
|
|
|
-// }catch (Exception e){
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// Map<String,Object> deviceMap = new HashMap<>();
|
|
|
-// deviceMap.put("deviceName",htAnalogDataVo.getDeviceName());
|
|
|
-// deviceMap.put("monitorDeviceName",htAnalogDataVo.getMonitorDeviceName());
|
|
|
-// deviceMap.put("deviceAttributeId",htAnalogDataVo.getDeviceAttributeId());
|
|
|
-// deviceMap.put("data",map);
|
|
|
-// returnList.add(deviceMap);
|
|
|
-// }
|
|
|
-//
|
|
|
-// List<CommonIcoVO> reList = new ArrayList<>();
|
|
|
-// Map<String, List<Map<String, Object>>> glist = returnList.stream().collect(Collectors.groupingBy(e -> e.get("deviceAttributeId").toString()));
|
|
|
-// for (String key:glist.keySet()) {
|
|
|
-// List<Object> objectList = new ArrayList<>();
|
|
|
-// List<Map<String, Object>> maps = glist.get(key);
|
|
|
-// for (Map<String,Object> map:maps) {
|
|
|
-// objectList.add(map.get("data"));
|
|
|
-// }
|
|
|
-// reList.add(CommonIcoVO.builder().name(key).list(objectList).listDate(objectList).build());
|
|
|
-// }
|
|
|
-//
|
|
|
-// List<CommonIcoVO> reListOne = new ArrayList<>();
|
|
|
-// for (int i = 0; i < dataManagementOneVO.getDisplayField().size(); i++) {
|
|
|
-// String fieldValue = dataManagementOneVO.getDisplayField().get(i).split("_")[1];
|
|
|
-// String name = FieldEscapeUtils.fieldEscapeUtils(fieldValue);
|
|
|
-// for (int j = 0; j < reList.size(); j++) {
|
|
|
-// List<Object> a = new ArrayList<>();
|
|
|
-// List<Object> time = new ArrayList<>();
|
|
|
-// for (int k = 0; k < ((List) reList.get(j).getList()).size(); k++) {
|
|
|
-// if (((List<Map<String,Object>>) reList.get(j).getList()).get(k).containsKey(dataManagementOneVO.getDisplayField().get(i))){
|
|
|
-// a.add(((List<Map<String,Object>>) reList.get(j).getList()).get(k).get(dataManagementOneVO.getDisplayField().get(i)));
|
|
|
-// time.add(((List<Map<String,Object>>) reList.get(j).getList()).get(k).get("dataTime"));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if (a.size()>0){
|
|
|
-// reListOne.add(CommonIcoVO.builder().name(name).list(a).listDate(time).build());
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
return reListOne;
|
|
|
}
|
|
|
|