From 3b0516a2959e25576e4f3fda697a3b025d06c8c9 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 24 六月 2025 14:09:07 +0800
Subject: [PATCH] 每日录像可用指标添加日志,修改大屏为查看当前月平均

---
 ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java |   88 ++++++++++++++++++++++++++++++++++++--------
 1 files changed, 72 insertions(+), 16 deletions(-)

diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java b/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java
index 7591d6e..48f4102 100644
--- a/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java
+++ b/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java
@@ -2,6 +2,7 @@
 
 import annotation.Log;
 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;
@@ -12,8 +13,10 @@
 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;
 
 /**
@@ -32,9 +35,9 @@
     /**
      * 鏌ヨ璁惧璧勪骇鍒楄〃
      */
-//    @PreAuthorize("@ss.hasPermi('system:monitor:list')")
+    @PreAuthorize("@ss.hasPermi('system:monitor:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TMonitor tMonitor)
+    public TableDataInfo list(TMonitorVO tMonitor)
     {
         startPage();
         List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor);
@@ -42,22 +45,45 @@
     }
 
     /**
-     * 瀵煎嚭璁惧璧勪骇鍒楄〃
+     * 瀵煎嚭
      */
-//    @PreAuthorize("@ss.hasPermi('system:monitor:export')")
-    @Log(title = "璁惧璧勪骇", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, TMonitor tMonitor)
-    {
-        List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor);
-        ExcelUtil<TMonitorVO> util = new ExcelUtil<TMonitorVO>(TMonitorVO.class);
-        util.exportExcel(response, list, "璁惧璧勪骇鏁版嵁");
+    @PreAuthorize("@ss.hasPermi('system:monitor:export')")
+    @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:query')")
+    @PreAuthorize("@ss.hasPermi('system:monitor:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -67,7 +93,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 +104,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 +115,41 @@
     /**
      * 鍒犻櫎璁惧璧勪骇
      */
-//    @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);
+    }
+
 }

--
Gitblit v1.8.0