| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | 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; |
| | |
| | | @Api("手术模板科室关联") |
| | | @RestController |
| | | @RequestMapping("/smartor/taskoper") |
| | | public class ServiceTaskoperController extends BaseController |
| | | { |
| | | public class ServiceTaskoperController extends BaseController { |
| | | @Autowired |
| | | private IServiceTaskoperService serviceTaskoperService; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("查询模板科室关联列表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceTaskoper serviceTaskoper) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody ServiceTaskoper serviceTaskoper) { |
| | | startPage(); |
| | | List<ServiceTaskoper> list = serviceTaskoperService.selectServiceTaskoperList(serviceTaskoper); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:export')") |
| | | @Log(title = "模板科室关联", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceTaskoper serviceTaskoper) |
| | | { |
| | | public void export(HttpServletResponse response, ServiceTaskoper serviceTaskoper) { |
| | | List<ServiceTaskoper> list = serviceTaskoperService.selectServiceTaskoperList(serviceTaskoper); |
| | | ExcelUtil<ServiceTaskoper> util = new ExcelUtil<ServiceTaskoper>(ServiceTaskoper.class); |
| | | util.exportExcel(response, list, "模板科室关联数据"); |
| | |
| | | @ApiOperation("获取模板科室关联详细信息") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(serviceTaskoperService.selectServiceTaskoperById(id)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("新增模板科室关联") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:add')") |
| | | @Log(title = "模板科室关联", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody ServiceTaskoper serviceTaskoper) |
| | | { |
| | | public AjaxResult add(@RequestBody ServiceTaskoper serviceTaskoper) { |
| | | return toAjax(serviceTaskoperService.insertServiceTaskoper(serviceTaskoper)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("修改模板科室关联") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:edit')") |
| | | @Log(title = "模板科室关联", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody ServiceTaskoper serviceTaskoper) |
| | | { |
| | | public AjaxResult edit(@RequestBody ServiceTaskoper serviceTaskoper) { |
| | | return toAjax(serviceTaskoperService.updateServiceTaskoper(serviceTaskoper)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("删除模板科室关联") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:remove')") |
| | | @Log(title = "模板科室关联", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{id}") |
| | | public AjaxResult remove(@PathVariable Long id) |
| | | { |
| | | @GetMapping("/remove/{id}") |
| | | public AjaxResult remove(@PathVariable Long id) { |
| | | return toAjax(serviceTaskoperService.deleteServiceTaskoperById(id)); |
| | | } |
| | | } |