kaiyu
2020-12-02 84b79096372143c9f9ed5d91156a966f7d119c2b
src/main/java/com/moral/controller/WebController.java
@@ -66,7 +66,6 @@
    MapPathService mapPathService;
    @GetMapping("test")
    public ResultBean<List<WebProvince>> add(HttpServletRequest request) {
        String token = request.getHeader("token");
@@ -118,6 +117,9 @@
        return resultMap;
    }
    public static void main(String[] args) {
    }
    @UserLoginToken
    @GetMapping("getAccountInfo")
@@ -220,12 +222,13 @@
        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))