fuliqi
2024-07-31 f284c5ef6a1aa6e9ba5d4e94e4b2abe83b6ea18c
ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java
@@ -32,7 +32,7 @@
    /**
     * 查询设备资产列表
     */
//    @PreAuthorize("@ss.hasPermi('system:monitor:list')")
   @PreAuthorize("@ss.hasPermi('system:monitor:list')")
    @GetMapping("/list")
    public TableDataInfo list(TMonitor tMonitor)
    {
@@ -44,7 +44,7 @@
    /**
     * 导出设备资产列表
     */
//    @PreAuthorize("@ss.hasPermi('system:monitor:export')")
   @PreAuthorize("@ss.hasPermi('system:monitor:export')")
    @Log(title = "设备资产", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, TMonitor tMonitor)
@@ -57,7 +57,7 @@
    /**
     * 获取设备资产详细信息
     */
//    @PreAuthorize("@ss.hasPermi('system:monitor:query')")
   @PreAuthorize("@ss.hasPermi('system:monitor:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
@@ -67,7 +67,7 @@
    /**
     * 新增设备资产
     */
//    @PreAuthorize("@ss.hasPermi('system:monitor:add')")
   @PreAuthorize("@ss.hasPermi('system:monitor:add')")
    @Log(title = "设备资产", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TMonitor tMonitor)
@@ -78,7 +78,7 @@
    /**
     * 修改设备资产
     */
//    @PreAuthorize("@ss.hasPermi('system:monitor:edit')")
   @PreAuthorize("@ss.hasPermi('system:monitor:edit')")
    @Log(title = "设备资产", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TMonitor tMonitor)
@@ -89,11 +89,35 @@
    /**
     * 删除设备资产
     */
//    @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/{cameraFunType}")
    public AjaxResult getVideoCount(@PathVariable String cameraFunType)
    {
        TMonitor tMonitor = new TMonitor();
        tMonitor.setCameraFunType(cameraFunType);
        return success(tMonitorService.getVideoCount(tMonitor));
    }
    /**
     * 获取异常恢复视频设备统计数
     */
    @PreAuthorize("@ss.hasPermi('system:monitor:list')")
    @GetMapping("/recoveryException")
    public AjaxResult recoveryException()
    {
        return success(tMonitorService.recoveryException());
    }
}