| | |
| | | public ResultBean<List<MonitorPoint>> getMonitorPointsAndDevicesByRegion(HttpServletRequest request) |
| | | throws Exception { |
| | | Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null); |
| | | String regionCode = parameters.get("regionCode").toString(); |
| | | List<MonitorPoint> monitorPoints = monitorPointService.getMonitorPointsAndDevicesByRegion(parameters); |
| | | |
| | | //剔除沧州非本公司设备 |
| | | if (regionCode.startsWith("1309")) { |
| | | List<Integer> orgIds = new ArrayList<>(); |
| | | Collections.addAll(orgIds, 60, 65, 159, 165, 166); |
| | | Iterator<MonitorPoint> iter = monitorPoints.iterator(); |
| | | while (iter.hasNext()) { |
| | | MonitorPoint next = iter.next(); |
| | | Integer mpId = next.getId(); |
| | | Integer orgId = next.getOrganizationId(); |
| | | if (!orgIds.contains(orgId)) { |
| | | iter.remove(); |
| | | } else { |
| | | if (orgId == 60) { |
| | | if (mpId != 56) { |
| | | iter.remove(); |
| | | } |
| | | } else if (orgId == 65) { |
| | | if (mpId != 83 && mpId != 84) { |
| | | iter.remove(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //给每一个monitorPoint下的设备通过device.getName()进行排序 |
| | | for (MonitorPoint monitorPoint : monitorPoints) { |
| | | List<Device> deviceList = monitorPoint.getDevices(); |
| | |
| | | @ApiImplicitParam(name = "endTime", value = "结束时间(格式:2020-08-04)", required = false, paramType = "query", dataType = "String")}) |
| | | public ResultBean<List<Map<String, Object>>> getAllDeviceDataToExcel(HttpServletRequest request) throws Exception { |
| | | Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null); |
| | | ParameterUtils.getTimeType4Time(parameters); |
| | | List<Map<String, Object>> list = historyMinutelyService.getAllDeviceDataToExcel(parameters); |
| | | return new ResultBean<List<Map<String, Object>>>(list); |
| | | } |