| | |
| | | parameters.put("monitorPointId", parameters.remove("monitorPoint"));
|
| | | Object sensorKey = parameters.remove("sensorKey");
|
| | | parameters.put("sensors", Arrays.asList(sensorKey));
|
| | | monitorPointService.isCompensateCalculation(parameters);
|
| | | List<Map<String, Object>> list = historyMinutelyService.getMonitorPointOrDeviceAvgData(parameters);
|
| | |
|
| | | for (Map<String, Object> map : list) {
|
| | |
| | | parameters.put("monitorPointId", parameters.remove("monitorPoint"));
|
| | | String[] sensorKeys = parameters.remove("sensorKey").toString().split(",");
|
| | | parameters.put("sensors", Arrays.asList(sensorKeys));
|
| | | monitorPointService.isCompensateCalculation(parameters);
|
| | | List<Map<String, Object>> list = historyMinutelyService.getMonitorPointOrDeviceAvgData(parameters);
|
| | |
|
| | | for (Map<String, Object> map : list) {
|
| | |
| | | List<MonitorPoint> getMonitorPointsAndDevicesByRegion(Map<String, Object> parameters);
|
| | |
|
| | | Collection<Object> getDevicesStateByRegion(Map<String, Object> parameters);
|
| | |
|
| | | void isCompensateCalculation(Map<String, Object> parameters);
|
| | | }
|
| | |
| | | Map<String,Float> adjustMap = new HashMap<>(); |
| | | if(adjustValue.getValue()!=null&&!adjustValue.getValue().isEmpty()){ |
| | | for(Map.Entry<String,Float> entry:adjustValue.getValue().entrySet()){ |
| | | if(entry.getValue()!=null&&entry.getValue()!=0){ |
| | | if(entry.getValue()!=null){ |
| | | adjustMap.put(entry.getKey(),entry.getValue()); |
| | | } |
| | | } |
| | |
| | | @Override
|
| | | public List<Map<String, Object>> getMonitorPointOrDeviceAvgData(Map<String, Object> parameters) throws Exception {
|
| | | convertQueryParam(parameters);
|
| | |
|
| | | if (!ObjectUtils.isEmpty(parameters.get("compensate"))) {
|
| | | parameters.put("timeUnits", "10min");
|
| | | }
|
| | | return historyMinutelyMapper.getMonitorPointOrDeviceAvgData(parameters);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | return result.values();
|
| | | }
|
| | | |
| | | @Override
|
| | | public void isCompensateCalculation(Map<String, Object> parameters) {
|
| | | MonitorPoint monitorPoint = monitorPointMapper.selectByPrimaryKey(Integer.valueOf(parameters.get("monitorPointId").toString()));
|
| | | if (Integer.valueOf(320581).equals(monitorPoint.getAreaCode())) {
|
| | | parameters.put("compensate", true);
|
| | | }
|
| | | |
| | | }
|
| | | }
|