| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.project.domain.ServiceDonationwitnessorgan; |
| | | import com.ruoyi.project.domain.ServiceDonorchargeorgan; |
| | | import com.ruoyi.project.service.IServiceDonorchargeorganService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @Slf4j |
| | | @Api("捐献器官") |
| | | @RestController |
| | | @RequestMapping("/system/donorchargeorgan") |
| | | @RequestMapping("/project/donorchargeorgan") |
| | | public class ServiceDonorchargeorganController extends BaseController { |
| | | @Autowired |
| | | private IServiceDonorchargeorganService serviceDonorchargeorganService; |
| | |
| | | * 查询捐献器官列表 |
| | | */ |
| | | @ApiOperation("查询捐献器官列表") |
| | | @PreAuthorize("@ss.hasPermi('system:donorchargeorgan:list')") |
| | | @PreAuthorize("@ss.hasPermi('project:donorchargeorgan:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceDonorchargeorgan serviceDonorchargeorgan) { |
| | | startPage(); |
| | |
| | | * 导出捐献器官列表 |
| | | */ |
| | | @ApiOperation("导出捐献器官列表") |
| | | @PreAuthorize("@ss.hasPermi('system:donorchargeorgan:export')") |
| | | @PreAuthorize("@ss.hasPermi('project:donorchargeorgan:export')") |
| | | @Log(title = "捐献器官", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceDonorchargeorgan serviceDonorchargeorgan) { |
| | |
| | | * 获取捐献器官详细信息 |
| | | */ |
| | | @ApiOperation("获取捐献器官详细信息") |
| | | @PreAuthorize("@ss.hasPermi('system:donorchargeorgan:query')") |
| | | @GetMapping(value = "/{id}") |
| | | @PreAuthorize("@ss.hasPermi('project:donorchargeorgan:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceDonorchargeorganService.getById(id)); |
| | | } |
| | |
| | | * 新增捐献器官 |
| | | */ |
| | | @ApiOperation("新增捐献器官") |
| | | @PreAuthorize("@ss.hasPermi('system:donorchargeorgan:add')") |
| | | @PreAuthorize("@ss.hasPermi('project:donorchargeorgan:add')") |
| | | @Log(title = "捐献器官", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceDonorchargeorgan serviceDonorchargeorgan) { |
| | | return toAjax(serviceDonorchargeorganService.save(serviceDonorchargeorgan)); |
| | | boolean save = serviceDonorchargeorganService.save(serviceDonorchargeorgan); |
| | | return AjaxResult.success(serviceDonorchargeorgan); |
| | | } |
| | | |
| | | /** |
| | | * 修改捐献器官 |
| | | */ |
| | | @ApiOperation("修改捐献器官") |
| | | @PreAuthorize("@ss.hasPermi('system:donorchargeorgan:edit')") |
| | | @PreAuthorize("@ss.hasPermi('project:donorchargeorgan:edit')") |
| | | @Log(title = "捐献器官", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceDonorchargeorgan serviceDonorchargeorgan) { |
| | | return toAjax(serviceDonorchargeorganService.updateById(serviceDonorchargeorgan)); |
| | |
| | | * 删除捐献器官 |
| | | */ |
| | | @ApiOperation("删除捐献器官") |
| | | @PreAuthorize("@ss.hasPermi('system:donorchargeorgan:remove')") |
| | | @PreAuthorize("@ss.hasPermi('project:donorchargeorgan:remove')") |
| | | @Log(title = "捐献器官", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceDonorchargeorganService.removeByIds(Arrays.asList(ids))); |
| | | } |