From ea531a6f0efba09ca671fee7e406e42955d1f0d1 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 27 五月 2026 17:48:26 +0800
Subject: [PATCH] 编辑采购台账报错异常+供应商往来查询入库金额sql调整优化
---
src/main/java/com/ruoyi/safe/controller/SafeAccidentController.java | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/ruoyi/safe/controller/SafeAccidentController.java b/src/main/java/com/ruoyi/safe/controller/SafeAccidentController.java
index 615514a..f37f6ef 100644
--- a/src/main/java/com/ruoyi/safe/controller/SafeAccidentController.java
+++ b/src/main/java/com/ruoyi/safe/controller/SafeAccidentController.java
@@ -1,13 +1,14 @@
package com.ruoyi.safe.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.R;
import com.ruoyi.safe.pojo.SafeAccident;
-import com.ruoyi.safe.pojo.SafeContingencyPlan;
import com.ruoyi.safe.service.SafeAccidentService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -22,33 +23,36 @@
*/
@RestController
@RequestMapping("/safeAccident")
-@Api(tags = "瀹夊叏鐢熶骇--浜嬫晠涓婃姤璁板綍")
+@AllArgsConstructor
+@Tag(name = "瀹夊叏鐢熶骇--浜嬫晠涓婃姤璁板綍")
public class SafeAccidentController {
- @Autowired
private SafeAccidentService safeAccidentService;
@GetMapping("/page")
- @ApiOperation("鍒嗛〉鏌ヨ")
+ @Operation(summary = "鍒嗛〉鏌ヨ")
public R page(Page page, SafeAccident safeAccident) {
return R.ok(safeAccidentService.pageSafeAccident(page, safeAccident));
}
- @ApiOperation("鏂板浜嬫晠涓婃姤璁板綍")
+ @Operation(summary = "鏂板浜嬫晠涓婃姤璁板綍")
+ @Log(title = "瀹夊叏浜嬫晠", businessType = BusinessType.INSERT)
@PostMapping()
public R add(@RequestBody SafeAccident safeAccident) {
return R.ok(safeAccidentService.save(safeAccident));
}
- @ApiOperation("淇敼浜嬫晠涓婃姤璁板綍")
+ @Operation(summary = "淇敼浜嬫晠涓婃姤璁板綍")
+ @Log(title = "瀹夊叏浜嬫晠", businessType = BusinessType.UPDATE)
@PutMapping ()
public R update(@RequestBody SafeAccident safeAccident) {
return R.ok(safeAccidentService.updateById(safeAccident));
}
- @ApiOperation("鍒犻櫎浜嬫晠涓婃姤璁板綍")
+ @Operation(summary = "鍒犻櫎浜嬫晠涓婃姤璁板綍")
+ @Log(title = "瀹夊叏浜嬫晠", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
- public R delSafeCertification(@RequestBody List<Integer> ids) {
+ public R delSafeAccident(@RequestBody List<Integer> ids) {
return R.ok(safeAccidentService.removeBatchByIds(ids));
}
--
Gitblit v1.9.3