|
|
@@ -0,0 +1,91 @@
|
|
|
+package com.fs.app.controller;
|
|
|
+
|
|
|
+import com.fs.app.annotation.Login;
|
|
|
+import com.fs.common.core.controller.BaseController;
|
|
|
+import com.fs.common.core.domain.R;
|
|
|
+import com.fs.his.domain.FsDoctorPrescribeCommon;
|
|
|
+import com.fs.his.param.FsDiagnosisListDParam;
|
|
|
+import com.fs.his.param.FsDoctorPrescribeCommonQueryParam;
|
|
|
+import com.fs.his.service.IFsDoctorPrescribeCommonService;
|
|
|
+import com.fs.his.vo.FsDiagnosisListDVO;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 医生常用诊断/建议用语 控制器
|
|
|
+ */
|
|
|
+@Api("医生常用语管理")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/app/prescribe/common")
|
|
|
+public class PrescribeCommonController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsDoctorPrescribeCommonService fsDoctorPrescribeCommonService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页查询常用语列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询常用语列表")
|
|
|
+ @GetMapping("/getPrescribeCommonList")
|
|
|
+ public R getPrescribeCommonList(FsDoctorPrescribeCommonQueryParam param){
|
|
|
+ PageInfo<FsDoctorPrescribeCommon> list = fsDoctorPrescribeCommonService.getList(param);
|
|
|
+ return R.ok().put("data", list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据ID查询
|
|
|
+ */
|
|
|
+ @ApiOperation("根据ID查询常用语")
|
|
|
+ @GetMapping("/{commonId}")
|
|
|
+ public R getInfo(@PathVariable Long commonId) {
|
|
|
+ FsDoctorPrescribeCommon prescribeCommon = fsDoctorPrescribeCommonService.getById(commonId);
|
|
|
+ return R.ok().put("data",prescribeCommon);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增常用语
|
|
|
+ */
|
|
|
+ @ApiOperation("新增常用语")
|
|
|
+ @PostMapping
|
|
|
+ public R add(@Validated @RequestBody FsDoctorPrescribeCommon common) {
|
|
|
+ fsDoctorPrescribeCommonService.save(common);
|
|
|
+ return R.ok("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改常用语
|
|
|
+ */
|
|
|
+ @ApiOperation("修改常用语")
|
|
|
+ @PutMapping
|
|
|
+ public R edit(@Validated @RequestBody FsDoctorPrescribeCommon common) {
|
|
|
+ fsDoctorPrescribeCommonService.update(common);
|
|
|
+ return R.ok("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除常用语
|
|
|
+ */
|
|
|
+ @ApiOperation("删除常用语")
|
|
|
+ @DeleteMapping("/{commonId}")
|
|
|
+ public R remove(@PathVariable Long commonId) {
|
|
|
+ fsDoctorPrescribeCommonService.removeById(commonId);
|
|
|
+ return R.ok("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量删除
|
|
|
+ */
|
|
|
+ @ApiOperation("批量删除常用语")
|
|
|
+ @DeleteMapping("/batch/{ids}")
|
|
|
+ public R batchRemove(@PathVariable Long[] ids) {
|
|
|
+ fsDoctorPrescribeCommonService.removeByIds(ids);
|
|
|
+ return R.ok("操作成功");
|
|
|
+ }
|
|
|
+}
|