| | |
| | | @ApiOperation(value = "获取总用户数和总设备数") |
| | | public AjaxResult selectCount(@PathVariable("id") int id) throws Exception { |
| | | if (id > 0) { |
| | | //根据用户登录的角色身份查询总设备数(台) |
| | | int count = deviceService.selectDeviceCount(id); |
| | | //根据登录用户的角色身份查询设备的使用人数 |
| | | int total = deviceService.selectUserDeviceByCount(id); |
| | | AjaxResult ajax = new AjaxResult(); |
| | | ajax.put("deviceCount", count); |
| | | ajax.put("userTotal", total); |
| | | return AjaxResult.success("查询成功", ajax); |
| | | return deviceService.selectDeviceCount(id); |
| | | } else { |
| | | return AjaxResult.error("未查询到有关信息,id的值不能小于1"); |
| | | } |
| | |
| | | @ApiOperation("设备分页简短列表") |
| | | public TableDataInfo shortList(Device device) { |
| | | startPage(); |
| | | return getDataTable(deviceService.selectDeviceShortList(device)); |
| | | return getDataTable(deviceService.selectDeviceShortList(device, false)); |
| | | } |
| | | |
| | | /** |
| | | * 查询设备简短列表,主页列表数据 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('iot:device:list')") |
| | | @GetMapping("/shortListRepair") |
| | | @ApiOperation("设备分页简短列表") |
| | | public TableDataInfo shortListRepair(Device device) { |
| | | startPage(); |
| | | return getDataTable(deviceService.selectDeviceShortList(device, true)); |
| | | } |
| | | |
| | | /** |