package com.ruoyi.web.controller.smartor;
|
|
import java.util.List;
|
import javax.servlet.http.HttpServletResponse;
|
|
import io.swagger.annotations.Api;
|
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;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.enums.BusinessType;
|
import com.smartor.domain.PatMedPhysical;
|
import com.smartor.service.IPatMedPhysicalService;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
/**
|
* 患者体检记录Controller
|
*
|
* @author smartor
|
* @date 2023-03-04
|
*/
|
@Api(description = "患者体检记录")
|
@RestController
|
@RequestMapping("/smartor/patphysical")
|
public class PatMedPhysicalController extends BaseController
|
{
|
@Autowired
|
private IPatMedPhysicalService patMedPhysicalService;
|
|
/**
|
* 查询患者体检记录列表
|
*/
|
@ApiOperation("查询患者体检记录列表")
|
//@PreAuthorize("@ss.hasPermi('smartor:patphysical:list')")
|
@PostMapping("/selectPatMedPhysicalList")
|
public TableDataInfo selectPatMedPhysicallist(@RequestBody PatMedPhysical patMedPhysical)
|
{
|
startPage();
|
List<PatMedPhysical> list = patMedPhysicalService.selectPatMedPhysicalList(patMedPhysical);
|
return getDataTable(list);
|
}
|
|
/**
|
* 导出患者体检记录列表
|
*/
|
@ApiOperation("导出患者体检记录列表")
|
//@PreAuthorize("@ss.hasPermi('smartor:patphysical:export')")
|
@Log(title = "患者体检记录", businessType = BusinessType.EXPORT)
|
@PostMapping("/export")
|
public void export(HttpServletResponse response, PatMedPhysical patMedPhysical)
|
{
|
List<PatMedPhysical> list = patMedPhysicalService.selectPatMedPhysicalList(patMedPhysical);
|
ExcelUtil<PatMedPhysical> util = new ExcelUtil<PatMedPhysical>(PatMedPhysical.class);
|
util.exportExcel(response, list, "患者体检记录数据");
|
}
|
|
/**
|
* 获取患者体检记录详细信息
|
*/
|
@ApiOperation("获取患者体检记录详细信息")
|
//@PreAuthorize("@ss.hasPermi('smartor:patphysical:query')")
|
@GetMapping(value = "/{id}")
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
{
|
return success(patMedPhysicalService.selectPatMedPhysicalById(id));
|
}
|
|
/**
|
* 新增患者体检记录
|
*/
|
@ApiOperation("新增患者体检记录")
|
//@PreAuthorize("@ss.hasPermi('smartor:patphysical:add')")
|
@Log(title = "患者体检记录", businessType = BusinessType.INSERT)
|
@PostMapping("/add")
|
public AjaxResult add(@RequestBody PatMedPhysical patMedPhysical)
|
{
|
return toAjax(patMedPhysicalService.insertPatMedPhysical(patMedPhysical));
|
}
|
|
/**
|
* 修改患者体检记录
|
*/
|
@ApiOperation("修改患者体检记录")
|
//@PreAuthorize("@ss.hasPermi('smartor:patphysical:edit')")
|
@Log(title = "患者体检记录", businessType = BusinessType.UPDATE)
|
@PostMapping("/edit")
|
public AjaxResult edit(@RequestBody PatMedPhysical patMedPhysical)
|
{
|
return toAjax(patMedPhysicalService.updatePatMedPhysical(patMedPhysical));
|
}
|
|
/**
|
* 删除患者体检记录
|
*/
|
@ApiOperation("删除患者体检记录")
|
//@PreAuthorize("@ss.hasPermi('smartor:patphysical:remove')")
|
@Log(title = "患者体检记录", businessType = BusinessType.DELETE)
|
@GetMapping("/remove/{ids}")
|
public AjaxResult remove(@PathVariable Long[] ids)
|
{
|
return toAjax(patMedPhysicalService.deletePatMedPhysicalByIds(ids));
|
}
|
}
|