| | |
| | | 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; |
| | | 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.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.PatMedOperation; |
| | | import com.smartor.service.IPatMedOperationService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 患者手术记录Controller |
| | | * |
| | | * @author lihu |
| | | * @date 2024-08-05 |
| | | * @date 2025-02-21 |
| | | */ |
| | | @Api("患者手术记录") |
| | | @RestController |
| | | @RequestMapping("/smartor/operation") |
| | | public class PatMedOperationController extends BaseController { |
| | | public class PatMedOperationController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IPatMedOperationService patMedOperationService; |
| | | |
| | |
| | | @ApiOperation("查询患者手术记录列表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:operation:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(PatMedOperation patMedOperation) { |
| | | public TableDataInfo list(PatMedOperation patMedOperation) |
| | | { |
| | | startPage(); |
| | | List<PatMedOperation> list = patMedOperationService.selectPatMedOperationList(patMedOperation); |
| | | return getDataTable(list); |
| | |
| | | */ |
| | | @ApiOperation("导出患者手术记录列表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:operation:export')") |
| | | @Log(title = "患者手术记录" , businessType = BusinessType.EXPORT) |
| | | @Log(title = "患者手术记录", 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, "患者手术记录数据"); |
| | |
| | | @ApiOperation("获取患者手术记录详细信息") |
| | | //@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)); |
| | | } |
| | | |
| | | /** |
| | | * 新增患者手术记录 |
| | | */ |
| | | @ApiOperation("新增患者手术记录") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:operation:add')") |
| | | @Log(title = "患者手术记录" , businessType = BusinessType.INSERT) |
| | | @Log(title = "患者手术记录", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PatMedOperation patMedOperation) { |
| | | public AjaxResult add(@RequestBody PatMedOperation patMedOperation) |
| | | { |
| | | return toAjax(patMedOperationService.insertPatMedOperation(patMedOperation)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("修改患者手术记录") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:operation:edit')") |
| | | @Log(title = "患者手术记录" , businessType = BusinessType.UPDATE) |
| | | @Log(title = "患者手术记录", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody PatMedOperation patMedOperation) { |
| | | public AjaxResult edit(@RequestBody PatMedOperation patMedOperation) |
| | | { |
| | | return toAjax(patMedOperationService.updatePatMedOperation(patMedOperation)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("删除患者手术记录") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:operation:remove')") |
| | | @Log(title = "患者手术记录" , businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | @Log(title = "患者手术记录", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(patMedOperationService.deletePatMedOperationByIds(ids)); |
| | | } |
| | | } |