| | |
| | | package com.ruoyi.project.controller; |
| | | 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.poi.ExcelUtil; |
| | | import com.ruoyi.project.domain.ServiceEthicalreviewopinions; |
| | | import com.ruoyi.project.domain.vo.EthicalReviewVO; |
| | | import com.ruoyi.project.service.IServiceEthicalreviewopinionsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.project.domain.vo.EthicalReviewVO; |
| | | 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.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.project.domain.ServiceEthicalreviewopinions; |
| | | import com.ruoyi.project.service.IServiceEthicalreviewopinionsService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 伦理审查专家意见Controller |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2021-11-23 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/project/ethicalreviewopinions") |
| | | public class ServiceEthicalreviewopinionsController extends BaseController |
| | | { |
| | | public class ServiceEthicalreviewopinionsController extends BaseController { |
| | | @Autowired |
| | | private IServiceEthicalreviewopinionsService serviceEthicalreviewopinionsService; |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceEthicalreviewopinions serviceEthicalreviewopinions) |
| | | { |
| | | public TableDataInfo list(ServiceEthicalreviewopinions serviceEthicalreviewopinions) { |
| | | startPage(); |
| | | List<ServiceEthicalreviewopinions> list = serviceEthicalreviewopinionsService.queryList(serviceEthicalreviewopinions); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @GetMapping("/listnew") |
| | | public TableDataInfo listnew (EthicalReviewVO ethicalReviewVO) |
| | | { |
| | | public TableDataInfo listnew(EthicalReviewVO ethicalReviewVO) { |
| | | startPage(); |
| | | List<EthicalReviewVO> list = serviceEthicalreviewopinionsService.selectVOList(ethicalReviewVO); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:export')") |
| | | @Log(title = "伦理审查专家意见", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceEthicalreviewopinions serviceEthicalreviewopinions) |
| | | { |
| | | public AjaxResult export(ServiceEthicalreviewopinions serviceEthicalreviewopinions) { |
| | | List<ServiceEthicalreviewopinions> list = serviceEthicalreviewopinionsService.queryList(serviceEthicalreviewopinions); |
| | | ExcelUtil<ServiceEthicalreviewopinions> util = new ExcelUtil<ServiceEthicalreviewopinions>(ServiceEthicalreviewopinions.class); |
| | | return util.exportExcel(list, "伦理审查专家意见数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceEthicalreviewopinionsService.getById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:add')") |
| | | @Log(title = "伦理审查专家意见", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceEthicalreviewopinions serviceEthicalreviewopinions) |
| | | { |
| | | return toAjax(serviceEthicalreviewopinionsService.save(serviceEthicalreviewopinions)); |
| | | @PostMapping("/add") |
| | | // @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceEthicalreviewopinions serviceEthicalreviewopinions) { |
| | | boolean save = serviceEthicalreviewopinionsService.save(serviceEthicalreviewopinions); |
| | | return AjaxResult.success(serviceEthicalreviewopinions); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:edit')") |
| | | @Log(title = "伦理审查专家意见", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceEthicalreviewopinions serviceEthicalreviewopinions) |
| | | { |
| | | @PostMapping("/edit") |
| | | // @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceEthicalreviewopinions serviceEthicalreviewopinions) { |
| | | return toAjax(serviceEthicalreviewopinionsService.updateById(serviceEthicalreviewopinions)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:remove')") |
| | | @Log(title = "伦理审查专家意见", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceEthicalreviewopinionsService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | } |