| | |
| | | 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/taskdiag") |
| | | public class ServiceTaskdiagController extends BaseController |
| | | { |
| | | public class ServiceTaskdiagController extends BaseController { |
| | | @Autowired |
| | | private IServiceTaskdiagService serviceTaskdiagService; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("查询模板科室关联列表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceTaskdiag serviceTaskdiag) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody ServiceTaskdiag serviceTaskdiag) { |
| | | startPage(); |
| | | List<ServiceTaskdiag> list = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:export')") |
| | | @Log(title = "模板科室关联", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceTaskdiag serviceTaskdiag) |
| | | { |
| | | public void export(HttpServletResponse response, ServiceTaskdiag serviceTaskdiag) { |
| | | List<ServiceTaskdiag> list = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag); |
| | | ExcelUtil<ServiceTaskdiag> util = new ExcelUtil<ServiceTaskdiag>(ServiceTaskdiag.class); |
| | | util.exportExcel(response, list, "模板科室关联数据"); |
| | |
| | | @ApiOperation("获取模板科室关联详细信息") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(serviceTaskdiagService.selectServiceTaskdiagById(id)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("新增模板科室关联") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:add')") |
| | | @Log(title = "模板科室关联", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody ServiceTaskdiag serviceTaskdiag) |
| | | { |
| | | public AjaxResult add(@RequestBody ServiceTaskdiag serviceTaskdiag) { |
| | | return toAjax(serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("修改模板科室关联") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:edit')") |
| | | @Log(title = "模板科室关联", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody ServiceTaskdiag serviceTaskdiag) |
| | | { |
| | | public AjaxResult edit(@RequestBody ServiceTaskdiag serviceTaskdiag) { |
| | | return toAjax(serviceTaskdiagService.updateServiceTaskdiag(serviceTaskdiag)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("删除模板科室关联") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag: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(serviceTaskdiagService.deleteServiceTaskdiagById(id)); |
| | | } |
| | | } |