|
|
|
|
@ -63,7 +63,6 @@ public class EquBaseController extends BaseController |
|
|
|
|
* 查询多台设备的最新监测信息 |
|
|
|
|
**/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('device:files:querymonitorpage')") |
|
|
|
|
@Log(title="查询多台设备信息",businessType =BusinessType.OTHER) |
|
|
|
|
@GetMapping("/monitorpage") |
|
|
|
|
@ApiOperation("分页查询多台设备的最新监测信息") |
|
|
|
|
public TableDataInfo getMonitorList() { |
|
|
|
|
@ -76,11 +75,10 @@ public class EquBaseController extends BaseController |
|
|
|
|
* 首页展示:查询每台设备的最新监测信息 |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('device:files:query')") |
|
|
|
|
@Log(title="首页查询设备信息",businessType =BusinessType.OTHER) |
|
|
|
|
@GetMapping("/monitorById") |
|
|
|
|
@ApiOperation("首页展示:查询每台设备的最新监测信息") |
|
|
|
|
public TableDataInfo getLatestEquMonitorList() { |
|
|
|
|
startPage(); |
|
|
|
|
startPage(); // 启用分页(如果首页不分页可删除)
|
|
|
|
|
List<EquMonitorHomeDto> list = equBaseService.selectLatestEquMonitorList(); |
|
|
|
|
return getDataTable(list); |
|
|
|
|
} |
|
|
|
|
@ -92,12 +90,12 @@ public class EquBaseController extends BaseController |
|
|
|
|
* @param id 查询对象,包含设备ID、开始时间和结束时间 |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('device:files:querylatest')") |
|
|
|
|
@Log(title="查询设备最新信息",businessType =BusinessType.OTHER) |
|
|
|
|
@GetMapping(value = "/latest/{id}") |
|
|
|
|
@GetMapping(value = "/latest/{id}") // URL清晰地表达了意图:获取历史监控信息
|
|
|
|
|
@ApiOperation("获取设备最新时间的历史监控信息") |
|
|
|
|
@Anonymous |
|
|
|
|
public AjaxResult getLastInfo(@PathVariable("id") String id) |
|
|
|
|
public AjaxResult getLastInfo(@PathVariable("id") String id) // 方法名也更清晰
|
|
|
|
|
{ |
|
|
|
|
// 调用职责单一的 Service 方法
|
|
|
|
|
return success(equBaseService.selectLatestEquMonitorInfo(id)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -106,7 +104,6 @@ public class EquBaseController extends BaseController |
|
|
|
|
* @param equBaseQueryDto 查询对象,包含设备ID、开始时间和结束时间 |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('device:files:queryhistory')") |
|
|
|
|
@Log(title="查询设备历史信息",businessType =BusinessType.OTHER) |
|
|
|
|
@GetMapping(value = "/history") // URL清晰地表达了意图:获取历史监控信息
|
|
|
|
|
@ApiOperation("获取设备指定时间段内的历史监控信息") |
|
|
|
|
@Anonymous |
|
|
|
|
@ -119,7 +116,6 @@ public class EquBaseController extends BaseController |
|
|
|
|
* 统计设备监测信息列表 - 按设备类型分类 |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('device:files:statistic')") |
|
|
|
|
@Log(title="统计设备信息",businessType =BusinessType.OTHER) |
|
|
|
|
@GetMapping("/byEquType") |
|
|
|
|
@ApiOperation("按设备类型分类统计设备信息") |
|
|
|
|
public AjaxResult listMonitorInfoByType() { |
|
|
|
|
@ -137,7 +133,6 @@ public class EquBaseController extends BaseController |
|
|
|
|
* 统计楼层设备分布 |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('device:files:statisticfloor')") |
|
|
|
|
@Log(title="统计楼层设备分布",businessType =BusinessType.OTHER) |
|
|
|
|
@GetMapping("/floorStatistic") |
|
|
|
|
@ApiOperation("统计楼层设备分布信息") |
|
|
|
|
public AjaxResult getFloorDeviceStatistic() { |
|
|
|
|
|