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/SafetyInspectionRecordController.java | 72 ++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/safety/controller/SafetyInspectionRecordController.java b/src/main/java/com/ruoyi/safety/controller/SafetyInspectionRecordController.java
new file mode 100644
index 0000000..30dac35
--- /dev/null
+++ b/src/main/java/com/ruoyi/safety/controller/SafetyInspectionRecordController.java
@@ -0,0 +1,72 @@
+package com.ruoyi.safety.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.pojo.SafetyInspectionRecord;
+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.*;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Safety inspection record APIs.
+ */
+@RestController
+@Api(tags = "safety-inspection-record")
+@RequestMapping("/safety/inspection/record")
+public class SafetyInspectionRecordController extends SafetyControllerSupport {
+
+ @Autowired
+ private SafetyInspectionRecordService recordService;
+
+ @Log(title = "safety-inspection-record-list", businessType = BusinessType.OTHER)
+ @ApiOperation("query safety inspection records by page")
+ @GetMapping("/list")
+ public AjaxResult list(Page<SafetyInspectionRecord> page,
+ SafetyInspectionRecord query,
+ @RequestParam(value = "startDate", required = false) String startDate,
+ @RequestParam(value = "endDate", required = false) String endDate,
+ @RequestParam(value = "pageNum", required = false) Long pageNum,
+ @RequestParam(value = "pageSize", required = false) Long pageSize) {
+ return AjaxResult.success(recordService.queryPage(buildPage(page, pageNum, pageSize), query, startDate, endDate));
+ }
+
+ @Log(title = "safety-inspection-record-add", businessType = BusinessType.INSERT)
+ @ApiOperation("add safety inspection record")
+ @PostMapping("/add")
+ public AjaxResult add(@RequestBody SafetyInspectionRecord record) {
+ return toAjax(recordService.saveSafety(record));
+ }
+
+ @Log(title = "safety-inspection-record-update", businessType = BusinessType.UPDATE)
+ @ApiOperation("update safety inspection record")
+ @PutMapping("/update")
+ public AjaxResult update(@RequestBody SafetyInspectionRecord record) {
+ return toAjax(recordService.updateSafety(record));
+ }
+
+ @Log(title = "safety-inspection-record-delete", businessType = BusinessType.DELETE)
+ @ApiOperation("delete safety inspection record")
+ @DeleteMapping("/delete/{id}")
+ public AjaxResult delete(@PathVariable Long id) {
+ return toAjax(recordService.deleteSafetyById(id));
+ }
+
+ @Log(title = "safety-inspection-record-sync", businessType = BusinessType.IMPORT)
+ @ApiOperation("sync mock subsystem inspection data")
+ @PostMapping("/sync")
+ public AjaxResult sync() {
+ List<SafetyInspectionRecord> records = recordService.syncMockSubsystemData();
+ Map<String, Object> data = new HashMap<String, Object>(2);
+ data.put("count", records.size());
+ data.put("records", records);
+ return AjaxResult.success(data);
+ }
+}
--
Gitblit v1.9.3