From 1b77c2724e38d087f3eab4a2f27b3b165f4265dc Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 25 五月 2026 14:37:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_tide' into dev_tide

---
 src/main/java/com/ruoyi/safety/controller/SafetyInspectionStatisticsController.java |   65 ++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/safety/controller/SafetyInspectionStatisticsController.java b/src/main/java/com/ruoyi/safety/controller/SafetyInspectionStatisticsController.java
new file mode 100644
index 0000000..10ff0f9
--- /dev/null
+++ b/src/main/java/com/ruoyi/safety/controller/SafetyInspectionStatisticsController.java
@@ -0,0 +1,65 @@
+package com.ruoyi.safety.controller;
+
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.safety.service.SafetyInspectionRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 瀹夌幆绠$悊-宸℃缁熻鎶ヨ〃鎺ュ彛銆�
+ */
+@RestController
+@Api(tags = "瀹夌幆绠$悊-宸℃缁熻鎶ヨ〃")
+@RequestMapping("/safety/inspection/statistics")
+public class SafetyInspectionStatisticsController {
+
+    @Autowired
+    private SafetyInspectionRecordService recordService;
+
+    /**
+     * 鏌ヨ浠婃棩宸℃缁熻銆�
+     */
+    @Log(title = "瀹夌幆绠$悊-宸℃缁熻-浠婃棩缁熻", businessType = BusinessType.OTHER)
+    @ApiOperation("鏌ヨ浠婃棩宸℃缁熻")
+    @GetMapping("/today")
+    public AjaxResult todayStatistics() {
+        return AjaxResult.success(recordService.getTodayStatistics());
+    }
+
+    /**
+     * 鏌ヨ宸℃瓒嬪娍缁熻銆�
+     */
+    @Log(title = "瀹夌幆绠$悊-宸℃缁熻-瓒嬪娍缁熻", businessType = BusinessType.OTHER)
+    @ApiOperation("鏌ヨ宸℃瓒嬪娍缁熻")
+    @GetMapping("/trend")
+    public AjaxResult trendStatistics(@RequestParam(value = "startDate", required = false) String startDate,
+                                      @RequestParam(value = "endDate", required = false) String endDate) {
+        return AjaxResult.success(recordService.getTrendStatistics(startDate, endDate));
+    }
+
+    /**
+     * 鏌ヨ宸℃绫诲瀷鍒嗗竷銆�
+     */
+    @Log(title = "瀹夌幆绠$悊-宸℃缁熻-绫诲瀷鍒嗗竷", businessType = BusinessType.OTHER)
+    @ApiOperation("鏌ヨ宸℃绫诲瀷鍒嗗竷")
+    @GetMapping("/type")
+    public AjaxResult typeStatistics(@RequestParam(value = "startDate", required = false) String startDate,
+                                     @RequestParam(value = "endDate", required = false) String endDate) {
+        return AjaxResult.success(recordService.getTypeStatistics(startDate, endDate));
+    }
+
+    /**
+     * 鏌ヨ宸℃浜哄憳灞ヨ亴缁熻銆�
+     */
+    @Log(title = "瀹夌幆绠$悊-宸℃缁熻-浜哄憳灞ヨ亴", businessType = BusinessType.OTHER)
+    @ApiOperation("鏌ヨ宸℃浜哄憳灞ヨ亴缁熻")
+    @GetMapping("/inspector")
+    public AjaxResult inspectorStatistics(@RequestParam(value = "startDate", required = false) String startDate,
+                                          @RequestParam(value = "endDate", required = false) String endDate) {
+        return AjaxResult.success(recordService.getInspectorStatistics(startDate, endDate));
+    }
+}

--
Gitblit v1.9.3