From 722fa40345f1fc650eaeae4a721c3ae4106d92a8 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 18 九月 2024 19:03:56 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java | 79 ++++++++++++++++++++++++++-------------
1 files changed, 52 insertions(+), 27 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
index e5cca58..8a75226 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
@@ -1,7 +1,14 @@
-package com.smartor.controller;
+package com.ruoyi.web.controller.smartor;
+import java.lang.reflect.Array;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
+
+import com.smartor.domain.PatMedReq;
+import com.smartor.domain.PatMedRes;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -23,37 +30,53 @@
/**
* 鎮h�呴棬璇婅褰旵ontroller
- *
+ *
* @author smartor
* @date 2023-03-04
*/
@RestController
@RequestMapping("/smartor/patouthosp")
-public class PatMedOuthospController extends BaseController
-{
+@Api(description = "鎮h�呴棬璇婅褰�")
+public class PatMedOuthospController extends BaseController {
@Autowired
private IPatMedOuthospService patMedOuthospService;
/**
* 鏌ヨ鎮h�呴棬璇婅褰曞垪琛�
*/
- @PreAuthorize("@ss.hasPermi('smartor:patouthosp:list')")
- @GetMapping("/list")
- public TableDataInfo list(PatMedOuthosp patMedOuthosp)
- {
+ //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:list')")
+ @PostMapping("/selectPatMedOuthospList")
+ @ApiOperation("鏌ヨ鎮h�呴棬璇婅褰曞垪琛�")
+ public TableDataInfo selectPatMedOuthosplist(@RequestBody PatMedOuthosp patMedOuthosp) {
startPage();
List<PatMedOuthosp> list = patMedOuthospService.selectPatMedOuthospList(patMedOuthosp);
return getDataTable(list);
}
/**
+ * 鏌ヨ鎮h�呴棬璇婅褰曞垪琛�
+ */
+ @PostMapping("/selectPatMedOuthospCount")
+ @ApiOperation("鏌ヨ闂ㄨ瘖鐪嬬梾浜烘鍜屼汉鏁�")
+ public AjaxResult selectPatMedOuthospCount(@RequestBody PatMedReq patMedReq) {
+ PatMedRes patMedRes = patMedOuthospService.selectPatMedOuthospCount(patMedReq);
+ return success(patMedRes);
+ }
+
+ @PostMapping("/getDeptCodeByPatId")
+ @ApiOperation("鏌ヨ閮ㄩ棬缂栫爜閫氳繃userId")
+ public AjaxResult getDeptCodeByPatId(@RequestBody PatMedOuthosp patMedOuthosp) {
+ return success(patMedOuthospService.getDeptCodeByPatId(patMedOuthosp));
+ }
+
+ /**
* 瀵煎嚭鎮h�呴棬璇婅褰曞垪琛�
*/
- @PreAuthorize("@ss.hasPermi('smartor:patouthosp:export')")
+ //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:export')")
@Log(title = "鎮h�呴棬璇婅褰�", businessType = BusinessType.EXPORT)
+ @ApiOperation("鎮h�呴棬璇婅褰�")
@PostMapping("/export")
- public void export(HttpServletResponse response, PatMedOuthosp patMedOuthosp)
- {
+ public void export(HttpServletResponse response, PatMedOuthosp patMedOuthosp) {
List<PatMedOuthosp> list = patMedOuthospService.selectPatMedOuthospList(patMedOuthosp);
ExcelUtil<PatMedOuthosp> util = new ExcelUtil<PatMedOuthosp>(PatMedOuthosp.class);
util.exportExcel(response, list, "鎮h�呴棬璇婅褰曟暟鎹�");
@@ -62,43 +85,45 @@
/**
* 鑾峰彇鎮h�呴棬璇婅褰曡缁嗕俊鎭�
*/
- @PreAuthorize("@ss.hasPermi('smartor:patouthosp:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id)
- {
+ @ApiOperation("鑾峰彇鎮h�呴棬璇婅褰曡缁嗕俊鎭�")
+ @ApiImplicitParam(name = "getInfo", value = "涓婚敭ID", dataType = "long", dataTypeClass = Long.class)
+ //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:query')")
+ @GetMapping(value = "getInfo/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(patMedOuthospService.selectPatMedOuthospById(id));
}
/**
* 鏂板鎮h�呴棬璇婅褰�
*/
- @PreAuthorize("@ss.hasPermi('smartor:patouthosp:add')")
+ @ApiOperation("鏂板鎮h�呴棬璇婅褰�")
+ //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:add')")
@Log(title = "鎮h�呴棬璇婅褰�", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody PatMedOuthosp patMedOuthosp)
- {
+ @PostMapping("/add")
+ public AjaxResult add(@RequestBody PatMedOuthosp patMedOuthosp) {
return toAjax(patMedOuthospService.insertPatMedOuthosp(patMedOuthosp));
}
/**
* 淇敼鎮h�呴棬璇婅褰�
*/
- @PreAuthorize("@ss.hasPermi('smartor:patouthosp:edit')")
+ @ApiOperation("淇敼鎮h�呴棬璇婅褰�")
+ //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:edit')")
@Log(title = "鎮h�呴棬璇婅褰�", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody PatMedOuthosp patMedOuthosp)
- {
+ @PostMapping("/edit")
+ public AjaxResult edit(@RequestBody PatMedOuthosp patMedOuthosp) {
return toAjax(patMedOuthospService.updatePatMedOuthosp(patMedOuthosp));
}
/**
* 鍒犻櫎鎮h�呴棬璇婅褰�
*/
- @PreAuthorize("@ss.hasPermi('smartor:patouthosp:remove')")
+ @ApiOperation("鍒犻櫎鎮h�呴棬璇婅褰�")
+ //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:remove')")
+ @ApiImplicitParam(name = "remove", value = "涓婚敭ID", dataType = "long", dataTypeClass = Array.class)
@Log(title = "鎮h�呴棬璇婅褰�", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids)
- {
+ @GetMapping("/remove/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(patMedOuthospService.deletePatMedOuthospByIds(ids));
}
}
--
Gitblit v1.9.3