| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | 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.bean.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.project.domain.ServiceOrganallocation; |
| | | import com.ruoyi.project.service.IServiceOrganallocationService; |
| | |
| | | |
| | | /** |
| | | * 器官分配Controller |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2021-11-10 |
| | | */ |
| | | @Api("器官分配管理") |
| | | @RestController |
| | | @RequestMapping("/project/organallocation") |
| | | public class ServiceOrganallocationController extends BaseController |
| | | { |
| | | public class ServiceOrganallocationController extends BaseController { |
| | | @Autowired |
| | | private IServiceOrganallocationService serviceOrganallocationService; |
| | | |
| | |
| | | @ApiOperation("器官分配信息列表") |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceOrganallocation serviceOrganallocation) |
| | | { |
| | | public TableDataInfo list(ServiceOrganallocation serviceOrganallocation) { |
| | | startPage(); |
| | | //List<ServiceOrganallocation> list = serviceOrganallocationService.queryList(serviceOrganallocation); |
| | | List<ServiceOrganallocation> list = serviceOrganallocationService.selectServiceOrganallocationList(serviceOrganallocation); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:export')") |
| | | @Log(title = "器官分配", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceOrganallocation serviceOrganallocation) |
| | | { |
| | | public AjaxResult export(ServiceOrganallocation serviceOrganallocation) { |
| | | List<ServiceOrganallocation> list = serviceOrganallocationService.queryList(serviceOrganallocation); |
| | | ExcelUtil<ServiceOrganallocation> util = new ExcelUtil<ServiceOrganallocation>(ServiceOrganallocation.class); |
| | | return util.exportExcel(list, "器官分配数据"); |
| | |
| | | @ApiOperation("通过id获取器官分配信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceOrganallocationService.getById(id)); |
| | | } |
| | | |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:add')") |
| | | @Log(title = "器官分配", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceOrganallocation serviceOrganallocation) |
| | | { |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceOrganallocation serviceOrganallocation) { |
| | | return toAjax(serviceOrganallocationService.save(serviceOrganallocation)); |
| | | } |
| | | |
| | | /** |
| | | * 新增器官分配 |
| | | */ |
| | | @ApiOperation("新增器官分配集合信息") |
| | | @Log(title = "器官分配集合", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult addArrayData(@RequestBody List<ServiceOrganallocation> serviceOrganallocations) { |
| | | return AjaxResult.success(serviceOrganallocationService.saveDate(serviceOrganallocations)); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:edit')") |
| | | @Log(title = "器官分配", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceOrganallocation serviceOrganallocation) |
| | | { |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceOrganallocation serviceOrganallocation) { |
| | | return toAjax(serviceOrganallocationService.updateById(serviceOrganallocation)); |
| | | } |
| | | |
| | | /** |
| | | * 修改器官分配 |
| | | */ |
| | | @ApiOperation("修改器官分配信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:edit')") |
| | | @Log(title = "器官分配", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/editarraydata") |
| | | @RepeatSubmit |
| | | public AjaxResult editArrayData(@RequestBody List<ServiceOrganallocation> serviceOrganallocations) { |
| | | return AjaxResult.success(serviceOrganallocationService.editArrayData(serviceOrganallocations)); |
| | | } |
| | | |
| | | /** |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:remove')") |
| | | @Log(title = "器官分配", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceOrganallocationService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | } |