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/SafetyTrainingPlanController.java | 76 ++++++++++++++++++++++++++++++++++++++
1 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/safety/controller/SafetyTrainingPlanController.java b/src/main/java/com/ruoyi/safety/controller/SafetyTrainingPlanController.java
new file mode 100644
index 0000000..f049d78
--- /dev/null
+++ b/src/main/java/com/ruoyi/safety/controller/SafetyTrainingPlanController.java
@@ -0,0 +1,76 @@
+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.SafetyTrainingPlan;
+import com.ruoyi.safety.service.SafetyTrainingPlanService;
+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/training/plan")
+public class SafetyTrainingPlanController extends SafetyControllerSupport {
+
+ @Autowired
+ private SafetyTrainingPlanService planService;
+
+ /**
+ * 鍒嗛〉鏌ヨ鍩硅璁″垝銆�
+ */
+ @Log(title = "瀹夌幆绠$悊-鍩硅璁″垝-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
+ @ApiOperation("鍒嗛〉鏌ヨ鍩硅璁″垝")
+ @GetMapping("/list")
+ public AjaxResult list(Page<SafetyTrainingPlan> page, SafetyTrainingPlan query,
+ @RequestParam(value = "pageNum", required = false) Long pageNum,
+ @RequestParam(value = "pageSize", required = false) Long pageSize) {
+ return AjaxResult.success(planService.queryPage(buildPage(page, pageNum, pageSize), query));
+ }
+
+ /**
+ * 鏂板鍩硅璁″垝銆�
+ */
+ @Log(title = "瀹夌幆绠$悊-鍩硅璁″垝-鏂板", businessType = BusinessType.INSERT)
+ @ApiOperation("鏂板鍩硅璁″垝")
+ @PostMapping("/add")
+ public AjaxResult add(@RequestBody SafetyTrainingPlan plan) {
+ return toAjax(planService.saveSafety(plan));
+ }
+
+ /**
+ * 淇敼鍩硅璁″垝銆�
+ */
+ @Log(title = "瀹夌幆绠$悊-鍩硅璁″垝-淇敼", businessType = BusinessType.UPDATE)
+ @ApiOperation("淇敼鍩硅璁″垝")
+ @PutMapping("/update")
+ public AjaxResult update(@RequestBody SafetyTrainingPlan plan) {
+ return toAjax(planService.updateSafety(plan));
+ }
+
+ /**
+ * 鍒犻櫎鍩硅璁″垝銆�
+ */
+ @Log(title = "瀹夌幆绠$悊-鍩硅璁″垝-鍒犻櫎", businessType = BusinessType.DELETE)
+ @ApiOperation("鍒犻櫎鍩硅璁″垝")
+ @DeleteMapping("/delete/{id}")
+ public AjaxResult delete(@PathVariable Long id) {
+ return toAjax(planService.deleteSafetyById(id));
+ }
+
+ /**
+ * 鏌ヨ鍩硅璁″垝璇︽儏銆�
+ */
+ @Log(title = "瀹夌幆绠$悊-鍩硅璁″垝-璇︽儏", businessType = BusinessType.OTHER)
+ @ApiOperation("鏌ヨ鍩硅璁″垝璇︽儏")
+ @GetMapping("/detail/{id}")
+ public AjaxResult detail(@PathVariable Long id) {
+ return AjaxResult.success(planService.getById(id));
+ }
+}
--
Gitblit v1.9.3