| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.entity.TMonitor; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.form.VideoExportForm; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TMonitor tMonitor) |
| | | public TableDataInfo list(TMonitorVO tMonitor) |
| | | { |
| | | startPage(); |
| | | List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出设备资产列表 |
| | | * 导出 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @Log(title = "设备资产", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, TMonitor tMonitor) |
| | | { |
| | | List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | ExcelUtil<TMonitor> util = new ExcelUtil<TMonitor>(TMonitor.class); |
| | | util.exportExcel(response, list, "设备资产数据"); |
| | | @Log(title = "导出视频总量数据", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export/video/total") |
| | | public void exportVideoTotal(HttpServletResponse response, @Validated VideoExportForm exportForm) throws IOException { |
| | | tMonitorService.exportVideoTotal(response,exportForm); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @Log(title = "导出每日在线情况", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export/video/online") |
| | | public void exportVideoOnline(HttpServletResponse response, @Validated VideoExportForm exportForm) throws IOException, NoSuchFieldException, IllegalAccessException { |
| | | tMonitorService.exportVideoOnline(response,exportForm); |
| | | } |
| | | /** |
| | | * 导出 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @Log(title = "导出每日录像情况", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export/video/record") |
| | | public void exportVideoRecord(HttpServletResponse response, @Validated VideoExportForm exportForm) throws IOException, NoSuchFieldException, IllegalAccessException { |
| | | tMonitorService.exportVideoRecord(response,exportForm); |
| | | } |
| | | /** |
| | | * 导出 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @Log(title = "导出每日离线时长", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export/video/loseTime") |
| | | public void exportVideoOffTime(HttpServletResponse response, @Validated VideoExportForm exportForm) throws IOException, NoSuchFieldException, IllegalAccessException { |
| | | tMonitorService.exportVideoLoseTime(response,exportForm); |
| | | } |
| | | /** |
| | | * 获取设备资产详细信息 |
| | | */ |
| | |
| | | /** |
| | | * 修改设备资产 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:edit')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:edit')") |
| | | @Log(title = "设备资产", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody TMonitor tMonitor) |
| | |
| | | /** |
| | | * 删除设备资产 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:remove')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:remove')") |
| | | @Log(title = "设备资产", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(tMonitorService.deleteTMonitorByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 获取视频设备统计数 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/getVideoCount") |
| | | public AjaxResult getVideoCount(TMonitorVO monitor) |
| | | { |
| | | return success(tMonitorService.getVideoCount(monitor)); |
| | | } |
| | | |
| | | /** |
| | | * 获取异常恢复视频设备统计数 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/recoveryException") |
| | | public AjaxResult recoveryException(TMonitorVO monitor) |
| | | { |
| | | return success(tMonitorService.recoveryException(monitor)); |
| | | } |
| | | /** |
| | | * 导出 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @Log(title = "导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response,TMonitorVO tMonitor) throws IOException, NoSuchFieldException, IllegalAccessException { |
| | | tMonitorService.export(response,tMonitor); |
| | | } |
| | | |
| | | } |