| | |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.smartor.domain.PatImportInfoVO; |
| | | import com.smartor.domain.SvyLibTopicRes; |
| | | import com.smartor.domain.SvyTopicReq; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.smartor.domain.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.smartor.domain.SvyLibTopic; |
| | | import com.smartor.service.ISvyLibTopicService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | |
| | | /** |
| | | * 查询问卷题目列表 |
| | | */ |
| | | @ApiOperation("查询问卷题目列表") |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytopic:list')") |
| | | @PostMapping("/list") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody SvyLibTopic svyLibTopic) { |
| | | startPage(); |
| | | PageUtils.startPageByPost(svyLibTopic.getPageNum(), svyLibTopic.getPageSize()); |
| | | List<SvyLibTopic> list = svyLibTopicService.selectSvyLibTopicList(svyLibTopic); |
| | | return getDataTable(list); |
| | | } |
| | |
| | | util.exportExcel(response, list, "问卷题目数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取问卷题目详细信息 |
| | | */ |
| | | @ApiOperation("获取问卷题目详细信息") |
| | | @PreAuthorize("@ss.hasPermi('smartor:svytopic:query')") |
| | | @GetMapping(value = "/{topicid}") |
| | | public AjaxResult getInfo(@PathVariable("topicid") Long topicid) { |
| | | return success(svyLibTopicService.selectSvyLibTopicByTopicid(topicid)); |
| | | } |
| | | // /** |
| | | // * 获取问卷题目详细信息 |
| | | // */ |
| | | // @ApiOperation("获取问卷题目详细信息") |
| | | // @PreAuthorize("@ss.hasPermi('smartor:svytopic:query')") |
| | | // @GetMapping(value = "/getInfo/{topicid}") |
| | | // public AjaxResult getInfo(@PathVariable("topicid") Long topicid) { |
| | | // return success(svyLibTopicService.selectSvyLibTopicByTopicid(topicid)); |
| | | // } |
| | | |
| | | /** |
| | | * 新增问卷题目 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改问卷详情信息 |
| | | */ |
| | | @ApiOperation("新增或修改问卷详情信息") |
| | | @PreAuthorize("@ss.hasPermi('system:script:list')") |
| | | @PostMapping("/saveOrUpdateTopic") |
| | | public AjaxResult saveOrUpdateTopic(@RequestBody SvyLibTopic svyLibTopic) { |
| | | if (ObjectUtils.isEmpty(svyLibTopic)) { |
| | | throw new BaseException("入参为空,请检查入参"); |
| | | } |
| | | return success(svyLibTopicService.saveOrUpdateTopic(svyLibTopic)); |
| | | } |
| | | |
| | | /** |
| | | * 修改问卷题目 |
| | | */ |
| | | @ApiOperation("修改问卷题目") |