From fa074e6bfce456256a4f9aa42c89e69a0582f6e7 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 25 九月 2024 15:05:16 +0800 Subject: [PATCH] 大屏考核分数保留一位数 --- ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java | 46 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 36 insertions(+), 10 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 b79c732..32d1f22 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; /** @@ -42,18 +45,41 @@ } /** - * 瀵煎嚭璁惧璧勪骇鍒楄〃 + * 瀵煎嚭 */ - @PreAuthorize("@ss.hasPermi('system:monitor:export')") - @Log(title = "璁惧璧勪骇", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, TMonitorVO 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); + } /** * 鑾峰彇璁惧璧勪骇璇︾粏淇℃伅 */ -- Gitblit v1.8.0