From ba69dcfe19d7718449f45b3aba8e9fc75ed93025 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期二, 15 四月 2025 15:56:14 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java | 39 ++++++++++++++++++++++----------------- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java index fa30e22..e513751 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java @@ -1,12 +1,9 @@ package com.ruoyi.web.controller.smartor; import java.util.List; - import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; - import javax.servlet.http.HttpServletResponse; - import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -30,12 +27,13 @@ * 鎮h�呮墜鏈褰旵ontroller * * @author lihu - * @date 2024-08-05 + * @date 2025-02-25 */ @Api("鎮h�呮墜鏈褰�") @RestController @RequestMapping("/smartor/operation") -public class PatMedOperationController extends BaseController { +public class PatMedOperationController extends BaseController +{ @Autowired private IPatMedOperationService patMedOperationService; @@ -44,8 +42,9 @@ */ @ApiOperation("鏌ヨ鎮h�呮墜鏈褰曞垪琛�") //@PreAuthorize("@ss.hasPermi('smartor:operation:list')") - @GetMapping("/list") - public TableDataInfo list(PatMedOperation patMedOperation) { + @PostMapping("/list") + public TableDataInfo list(@RequestBody PatMedOperation patMedOperation) + { startPage(); List<PatMedOperation> list = patMedOperationService.selectPatMedOperationList(patMedOperation); return getDataTable(list); @@ -56,9 +55,10 @@ */ @ApiOperation("瀵煎嚭鎮h�呮墜鏈褰曞垪琛�") //@PreAuthorize("@ss.hasPermi('smartor:operation:export')") - @Log(title = "鎮h�呮墜鏈褰�" , businessType = BusinessType.EXPORT) + @Log(title = "鎮h�呮墜鏈褰�", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, PatMedOperation patMedOperation) { + public void export(HttpServletResponse response, PatMedOperation patMedOperation) + { List<PatMedOperation> list = patMedOperationService.selectPatMedOperationList(patMedOperation); ExcelUtil<PatMedOperation> util = new ExcelUtil<PatMedOperation>(PatMedOperation.class); util.exportExcel(response, list, "鎮h�呮墜鏈褰曟暟鎹�"); @@ -70,17 +70,20 @@ @ApiOperation("鑾峰彇鎮h�呮墜鏈褰曡缁嗕俊鎭�") //@PreAuthorize("@ss.hasPermi('smartor:operation:query')") @GetMapping(value = "/getInfo/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { + public AjaxResult getInfo(@PathVariable("id") Long id) + { return success(patMedOperationService.selectPatMedOperationById(id)); } /** * 鏂板鎮h�呮墜鏈褰� */ + @ApiOperation("鏂板鎮h�呮墜鏈褰�") //@PreAuthorize("@ss.hasPermi('smartor:operation:add')") - @Log(title = "鎮h�呮墜鏈褰�" , businessType = BusinessType.INSERT) + @Log(title = "鎮h�呮墜鏈褰�", businessType = BusinessType.INSERT) @PostMapping("/add") - public AjaxResult add(@RequestBody PatMedOperation patMedOperation) { + public AjaxResult add(@RequestBody PatMedOperation patMedOperation) + { return toAjax(patMedOperationService.insertPatMedOperation(patMedOperation)); } @@ -89,9 +92,10 @@ */ @ApiOperation("淇敼鎮h�呮墜鏈褰�") //@PreAuthorize("@ss.hasPermi('smartor:operation:edit')") - @Log(title = "鎮h�呮墜鏈褰�" , businessType = BusinessType.UPDATE) + @Log(title = "鎮h�呮墜鏈褰�", businessType = BusinessType.UPDATE) @PostMapping("/edit") - public AjaxResult edit(@RequestBody PatMedOperation patMedOperation) { + public AjaxResult edit(@RequestBody PatMedOperation patMedOperation) + { return toAjax(patMedOperationService.updatePatMedOperation(patMedOperation)); } @@ -100,9 +104,10 @@ */ @ApiOperation("鍒犻櫎鎮h�呮墜鏈褰�") //@PreAuthorize("@ss.hasPermi('smartor:operation:remove')") - @Log(title = "鎮h�呮墜鏈褰�" , businessType = BusinessType.DELETE) - @GetMapping("/remove/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { + @Log(title = "鎮h�呮墜鏈褰�", businessType = BusinessType.DELETE) + @GetMapping("/remove/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { return toAjax(patMedOperationService.deletePatMedOperationByIds(ids)); } } -- Gitblit v1.9.3