| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/svytargetoption") |
| | | public class SvyLibTemplateTargetoptionController extends BaseController |
| | | { |
| | | public class SvyLibTemplateTargetoptionController extends BaseController { |
| | | @Autowired |
| | | private ISvyLibTemplateTargetoptionService svyLibTemplateTargetoptionService; |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SvyLibTemplateTargetoption svyLibTemplateTargetoption) |
| | | { |
| | | public TableDataInfo list(SvyLibTemplateTargetoption svyLibTemplateTargetoption) { |
| | | startPage(); |
| | | List<SvyLibTemplateTargetoption> list = svyLibTemplateTargetoptionService.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:export')") |
| | | @Log(title = "问卷问题指标选项库", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SvyLibTemplateTargetoption svyLibTemplateTargetoption) |
| | | { |
| | | public void export(HttpServletResponse response, SvyLibTemplateTargetoption svyLibTemplateTargetoption) { |
| | | List<SvyLibTemplateTargetoption> list = svyLibTemplateTargetoptionService.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); |
| | | ExcelUtil<SvyLibTemplateTargetoption> util = new ExcelUtil<SvyLibTemplateTargetoption>(SvyLibTemplateTargetoption.class); |
| | | util.exportExcel(response, list, "问卷问题指标选项库数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(svyLibTemplateTargetoptionService.selectSvyLibTemplateTargetoptionById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:add')") |
| | | @Log(title = "问卷问题指标选项库", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody SvyLibTemplateTargetoption svyLibTemplateTargetoption) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SvyLibTemplateTargetoption svyLibTemplateTargetoption) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | svyLibTemplateTargetoption.setOrgid(user.getOrgid()); |
| | | return toAjax(svyLibTemplateTargetoptionService.insertSvyLibTemplateTargetoption(svyLibTemplateTargetoption)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:edit')") |
| | | @Log(title = "问卷问题指标选项库", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody SvyLibTemplateTargetoption svyLibTemplateTargetoption) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyLibTemplateTargetoption svyLibTemplateTargetoption) { |
| | | return toAjax(svyLibTemplateTargetoptionService.updateSvyLibTemplateTargetoption(svyLibTemplateTargetoption)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:remove')") |
| | | @Log(title = "问卷问题指标选项库", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(svyLibTemplateTargetoptionService.deleteSvyLibTemplateTargetoptionByIds(ids)); |
| | | } |
| | | } |