| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.service.ISvyTaskService; |
| | | import com.smartor.service.ISvyTaskSingleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | * @author ruoyi |
| | | * @date 2024-06-12 |
| | | */ |
| | | @Slf4j |
| | | @Api(description = " 问卷任务(任务)") |
| | | @RestController |
| | | @RequestMapping("/smartor/svytask") |
| | | public class SvyTaskController extends BaseController { |
| | | @Autowired |
| | | private ISvyTaskService svyTaskService; |
| | | |
| | | @Autowired |
| | | private ISvyTaskSingleService iSvyTaskSingleService; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | | |
| | | /** |
| | | * 查询问卷任务(任务)列表 |
| | |
| | | public AjaxResult remove(@PathVariable Long[] taskids) { |
| | | return toAjax(svyTaskService.deleteSvyTaskByTaskids(taskids)); |
| | | } |
| | | |
| | | /** |
| | | * 通过任务ID和患者ID获取单个人的题目信息 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("通过任务ID和患者ID获取单个人的题目信息") |
| | | @PostMapping("/getSvyScriptInfoByCondition") |
| | | public TableDataInfo getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues ivrTaskScriptQues) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskScriptQues.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskScriptQues.getParam2(), pri_key)); |
| | | log.info("tid和pid的值为:{},{}", tid, pid); |
| | | return getDataTable(svyTaskService.getScriptInfoByCondition(tid, pid)); |
| | | } |
| | | } |