| | |
| | | MapPathService mapPathService; |
| | | |
| | | |
| | | |
| | | @GetMapping("test") |
| | | public ResultBean<List<WebProvince>> add(HttpServletRequest request) { |
| | | String token = request.getHeader("token"); |
| | |
| | | return resultMap; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | } |
| | | |
| | | @UserLoginToken |
| | | @GetMapping("getAccountInfo") |
| | |
| | | String accountId = WebTokenUtils.getIdBytoken(token); |
| | | Account account = accountService.getAccountById(Integer.parseInt(accountId)); |
| | | parameters.put("organizationId",account.getOrganizationId()); |
| | | List<MonitorPoint> monitorPoints = monitorPointService.getMonitorPointsAndDevicesByRegion(parameters); |
| | | List<MonitorPoint> monitorPoints = monitorPointService.getMonitorPointsByRegionAndOrgId(parameters); |
| | | if(ObjectUtils.isEmpty(monitorPoints)) |
| | | return ResultBean.fail("该账号对应地区无站点"); |
| | | |
| | | List<Device> devices = new ArrayList<>(); |
| | | for (MonitorPoint monitorPoint : monitorPoints) { |
| | | if (!ObjectUtils.isEmpty(monitorPoint.getDevices())) |
| | | devices.addAll(monitorPoint.getDevices()); |
| | | } |
| | | if (ObjectUtils.isEmpty(devices)) |