|
|
|
@ -97,7 +97,7 @@ public class DeviceWarinningRecordController {
|
|
|
|
@Operation(summary = "获得告警记录列表")
|
|
|
|
@Operation(summary = "获得告警记录列表")
|
|
|
|
@Parameter(name = "deviceId", description = "设备Id", required = true, example = "1024")
|
|
|
|
@Parameter(name = "deviceId", description = "设备Id", required = true, example = "1024")
|
|
|
|
@Parameter(name = "orgId", description = "产线组织Id", required = true, example = "1024")
|
|
|
|
@Parameter(name = "orgId", description = "产线组织Id", required = true, example = "1024")
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device-warinning-record:query')")
|
|
|
|
//@PreAuthorize("@ss.hasPermission('iot:device-warinning-record:query')")
|
|
|
|
public CommonResult<List<DeviceWarinningRecordDO>> getList(@RequestParam(name = "deviceId" ,required = false) Long id,
|
|
|
|
public CommonResult<List<DeviceWarinningRecordDO>> getList(@RequestParam(name = "deviceId" ,required = false) Long id,
|
|
|
|
@RequestParam(name = "orgId" ,required = false) Long orgId) {
|
|
|
|
@RequestParam(name = "orgId" ,required = false) Long orgId) {
|
|
|
|
List<DeviceWarinningRecordDO> deviceWarinningRecord = deviceWarinningRecordService.getList(id);
|
|
|
|
List<DeviceWarinningRecordDO> deviceWarinningRecord = deviceWarinningRecordService.getList(id);
|
|
|
|
@ -108,7 +108,7 @@ public class DeviceWarinningRecordController {
|
|
|
|
@GetMapping("/getLastSevenHoursCount")
|
|
|
|
@GetMapping("/getLastSevenHoursCount")
|
|
|
|
@Operation(summary = "获取过去7小时每小时告警数量")
|
|
|
|
@Operation(summary = "获取过去7小时每小时告警数量")
|
|
|
|
@Parameter(name = "orgId", description = "产线组织Id", required = true, example = "1024")
|
|
|
|
@Parameter(name = "orgId", description = "产线组织Id", required = true, example = "1024")
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device-warinning-record:query')")
|
|
|
|
//@PreAuthorize("@ss.hasPermission('iot:device-warinning-record:query')")
|
|
|
|
public CommonResult<List<Map<String, Object>>> getLastSevenHoursCount( @RequestParam(name = "orgId" ,required = false) Long orgId) {
|
|
|
|
public CommonResult<List<Map<String, Object>>> getLastSevenHoursCount( @RequestParam(name = "orgId" ,required = false) Long orgId) {
|
|
|
|
List<Map<String, Object>> hourCounts = deviceWarinningRecordService.getLastSevenHoursCount();
|
|
|
|
List<Map<String, Object>> hourCounts = deviceWarinningRecordService.getLastSevenHoursCount();
|
|
|
|
return success(hourCounts);
|
|
|
|
return success(hourCounts);
|
|
|
|
|