| | |
| | | import java.util.stream.Collectors;
|
| | |
|
| | | import org.apache.commons.collections.CollectionUtils;
|
| | | import org.apache.commons.collections.MapUtils;
|
| | | import org.apache.commons.net.ftp.FTPClient;
|
| | | import org.apache.log4j.Logger;
|
| | | import org.dom4j.Document;
|
| | |
| | | String monitor_point_id = (String) parameters.get("monitor_point_id");
|
| | | List<Map<String, Object>> list = sensorService.getSensorByMonitorPointId(monitor_point_id);
|
| | | List<Map<String, Object>> sensorUnitList = sensorUnitService.getSensorsByMonitPointId2(monitor_point_id);
|
| | | System.out.println(sensorUnitList);
|
| | | System.out.println("list:"+list);
|
| | | System.out.println("sensorUnitList:"+sensorUnitList);
|
| | | for (Map<String, Object> sensorMap : list) {
|
| | | for (Map<String, Object> sensorUnitMap : sensorUnitList) {
|
| | | if (sensorUnitMap.get("sensor_key").equals(sensorMap.get("sensor_key"))) {
|
| | | if (sensorUnitMap.get("sensor_key").equals(sensorMap.get("sensorKey"))) {
|
| | | sensorMap.put("unit", sensorUnitMap.get("name"));
|
| | | }
|
| | | }
|
| | |
| | | LocalDateTime timeLocalDateTime = LocalDateTime.parse(time, dateTimeFormatter);
|
| | | int month = timeLocalDateTime.getMonth().getValue();
|
| | | Point dirPoint = historyHourlyService.getDirPoint(parameters);
|
| | | Map<String, Object> getPollutionSourceData = historyHourlyService.getPollutionSourceData(parameters);
|
| | | Map<String, Object> getPollutionSourceData = historyHourlyService.getPollutionSourceDataByHour(parameters);
|
| | | if (MapUtils.isEmpty(getPollutionSourceData)) {
|
| | | getPollutionSourceData = historyHourlyService.getPollutionSourceDataAll(parameters);
|
| | | }
|
| | | String mac = parameters.get("mac").toString();
|
| | | Device device = deviceService.getDeviceByMac(mac, false);
|
| | | JSONObject params = new JSONObject();
|