| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.ServiceSubTaskAnswerReq; |
| | | import com.smartor.domain.ServiceSubTaskCacheReq; |
| | | import com.smartor.domain.ServiceSubTaskDetailReq; |
| | | import com.smartor.domain.ServiceSubtaskAnswer; |
| | | import com.smartor.service.IServiceSubtaskAnswerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-07-18 |
| | | */ |
| | | @Slf4j |
| | | @Api(description = "任务问卷问题选项") |
| | | @RestController |
| | | @RequestMapping("/smartor/subtaskAnswer") |
| | | public class ServiceSubtaskAnswerController extends BaseController { |
| | |
| | | * 查询任务问卷问题选项列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:list')") |
| | | @ApiOperation("查询任务问卷问题选项列表") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceSubtaskAnswer serviceSubtaskAnswer) { |
| | | startPage(); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:export')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.EXPORT) |
| | | @ApiOperation("任务问卷问题选项") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceSubtaskAnswer serviceSubtaskAnswer) { |
| | | List<ServiceSubtaskAnswer> list = serviceSubtaskAnswerService.selectServiceSubtaskAnswerList(serviceSubtaskAnswer); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | @ApiOperation("获取任务问卷问题选项详细信息") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(serviceSubtaskAnswerService.selectServiceSubtaskAnswerById(id)); |
| | | } |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:add')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.INSERT) |
| | | @ApiOperation("新增任务问卷问题选项") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody ServiceSubtaskAnswer serviceSubtaskAnswer) { |
| | | return toAjax(serviceSubtaskAnswerService.insertServiceSubtaskAnswer(serviceSubtaskAnswer)); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:edit')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("修改任务问卷问题选项") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody ServiceSubtaskAnswer serviceSubtaskAnswer) { |
| | | return toAjax(serviceSubtaskAnswerService.updateServiceSubtaskAnswer(serviceSubtaskAnswer)); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:remove')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.DELETE) |
| | | @ApiOperation("删除任务问卷问题选项") |
| | | @DeleteMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceSubtaskAnswerService.deleteServiceSubtaskAnswerByIds(ids)); |
| | | } |
| | | |
| | | @ApiOperation("患者问题结果记录(外链)") |
| | | @PostMapping("/saveQuestionAnswer") |
| | | public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) { |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq)); |
| | | } |
| | | |
| | | @ApiOperation("患者问题结果记录缓存(外链)") |
| | | @PostMapping("/saveQuestionCache") |
| | | public AjaxResult saveQuestionCache(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) { |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionCache(serviceSubTaskCacheReq)); |
| | | } |
| | | } |