From 4f3a98f19143865cdc1de4791e8a95d96bd40c65 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期五, 01 八月 2025 13:27:59 +0800
Subject: [PATCH] yys 密码已重置

---
 cnas-device/src/main/java/com/ruoyi/device/controller/DeviceAccidentReportController.java |   84 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceAccidentReportController.java b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceAccidentReportController.java
new file mode 100644
index 0000000..22a216b
--- /dev/null
+++ b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceAccidentReportController.java
@@ -0,0 +1,84 @@
+package com.ruoyi.device.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.core.domain.Result;
+import com.ruoyi.device.pojo.DeviceAccidentReport;
+import com.ruoyi.device.service.DeviceAccidentReportService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+/**
+ * <p>
+ * 璁惧浜嬫晠鎶ュ憡鍗� 鍓嶇鎺у埗鍣�
+ * </p>
+ *
+ * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
+ * @since 2024-12-17 06:31:12
+ */
+@Api(tags = "璁惧浜嬫晠鎶ュ憡鍗�")
+@AllArgsConstructor
+@RestController
+@RequestMapping("/deviceAccidentReport")
+public class DeviceAccidentReportController {
+
+    private DeviceAccidentReportService deviceAccidentReportService;
+
+
+    /**
+     * 璁惧浜嬫晠鎶ュ憡鍒楄〃
+     * @return
+     */
+    @ApiOperation(value = "璁惧浜嬫晠鎶ュ憡鍒楄〃")
+    @GetMapping("/pageDeviceAccidentReport")
+    public Result<IPage<DeviceAccidentReport>> pageDeviceAccidentReport(Page page, DeviceAccidentReport deviceAccidentReport){
+        return Result.success(deviceAccidentReportService.pageDeviceAccidentReport(page, deviceAccidentReport));
+    }
+
+    /**
+     * 鏌ヨ璁惧浜嬫晠鎶ュ憡
+     * @return
+     */
+    @ApiOperation(value = "鏌ヨ璁惧浜嬫晠鎶ュ憡")
+    @GetMapping("/getDeviceAccidentReport")
+    public Result getDeviceAccidentReport(Integer accidentReportId){
+        return Result.success(deviceAccidentReportService.getById(accidentReportId));
+    }
+
+    /**
+     * 鍒犻櫎璁惧浜嬫晠鎶ュ憡
+     * @return
+     */
+    @ApiOperation(value = "鍒犻櫎璁惧浜嬫晠鎶ュ憡")
+    @DeleteMapping("/delDeviceAccidentReport")
+    public Result delDeviceAccidentReport(Integer accidentReportId){
+        return Result.success(deviceAccidentReportService.removeById(accidentReportId));
+    }
+
+    /**
+     * 鏂板璁惧浜嬫晠鎶ュ憡
+     * @return
+     */
+    @ApiOperation(value = "鏂板璁惧浜嬫晠鎶ュ憡")
+    @PostMapping("/addDeviceAccidentReport")
+    public Result addDeviceAccidentReport(@RequestBody DeviceAccidentReport deviceAccidentReport){
+        return Result.success(deviceAccidentReportService.addDeviceAccidentReport(deviceAccidentReport));
+    }
+
+    /**
+     * 瀵煎嚭璁惧浜嬫晠鎶ュ憡
+     * @param accidentReportId 璁惧浜嬫晠鎶ュ憡id
+     * @param response 鍝嶅簲
+     */
+    @ApiOperation(value = "瀵煎嚭璁惧浜嬫晠鎶ュ憡")
+    @GetMapping("/exportDeviceAccidentReport")
+    public Result exportDeviceAccidentReport(Integer accidentReportId, HttpServletResponse response) {
+        deviceAccidentReportService.exportDeviceAccidentReport(accidentReportId, response);
+        return Result.success();
+    }
+}

--
Gitblit v1.9.3