liusheng
3 天以前 c80135e5c3f7bfab96ba558a910a06f1e587c53c
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicalHistoryController.java
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.smartor;
import cn.hutool.db.Page;
import com.ruoyi.common.annotation.AddOrgId;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -36,10 +37,11 @@
     * 查询病史列表
     */
    //@PreAuthorize("@ss.hasPermi('system:history:list')")
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/selectMedicalHistoryList")
    @ApiOperation("查询病史列表")
    public TableDataInfo selectMedicalHistorylist(@RequestBody  MedicalHistory medicalHistory) {
        PageUtils.startPageByPost(medicalHistory.getPageNum(),medicalHistory.getPageSize());
    public TableDataInfo selectMedicalHistorylist(@RequestBody MedicalHistory medicalHistory) {
        PageUtils.startPageByPost(medicalHistory.getPageNum(), medicalHistory.getPageSize());
        List<MedicalHistory> list = medicalHistoryService.selectMedicalHistoryList(medicalHistory);
        return getDataTable(list);
    }
@@ -63,7 +65,7 @@
    //@PreAuthorize("@ss.hasPermi('system:history:query')")
    @ApiOperation("获取病史详细信息")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id,@PathVariable("pid") Long pid) {
    public AjaxResult getInfo(@PathVariable("id") Long id, @PathVariable("pid") Long pid) {
        return success(medicalHistoryService.selectMedicalHistoryById(id));
    }
@@ -73,6 +75,7 @@
    //@PreAuthorize("@ss.hasPermi('system:history:add')")
    @Log(title = "病史", businessType = BusinessType.INSERT)
    @ApiOperation("新增病史")
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody MedicalHistory medicalHistory) {
        medicalHistory.setOrgid(getOrgid());
@@ -85,6 +88,7 @@
    //@PreAuthorize("@ss.hasPermi('system:history:edit')")
    @Log(title = "病史", businessType = BusinessType.UPDATE)
    @ApiOperation("修改病史")
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody MedicalHistory medicalHistory) {
        return toAjax(medicalHistoryService.updateMedicalHistory(medicalHistory));