| | |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLDecoder; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | | |
| | | @Autowired |
| | | private RSAPublicKeyExample rsaPublicKeyExample; |
| | | |
| | | /** |
| | | * 查询语音任务列表 |
| | | */ |
| | |
| | | |
| | | if (CollectionUtils.isNotEmpty(serviceTaskVOS)) { |
| | | for (ServiceTaskVO ServiceTaskVO : serviceTaskVOS) { |
| | | ServiceSubtask ServiceTaskcall = new ServiceSubtask(); |
| | | ServiceSubtaskVO ServiceTaskcall = new ServiceSubtaskVO(); |
| | | ServiceTaskcall.setTaskid(ServiceTaskVO.getTaskid()); |
| | | List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(ServiceTaskcall); |
| | | if (CollectionUtils.isNotEmpty(ServiceTaskcalls)) { |
| | |
| | | @ApiOperation("删除任务(包括它对应的患者信息)") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:remove')") |
| | | @Log(title = "语音任务", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{removeTask}") |
| | | public AjaxResult removeTask(@PathVariable Long taskId) { |
| | | return toAjax(serviceTaskService.deleteServiceTaskByTaskid(taskId)); |
| | | @GetMapping("/remove/{taskId}") |
| | | public AjaxResult removeTask(@PathVariable("taskId") String taskId) { |
| | | if (StringUtils.isEmpty(taskId)) { |
| | | AjaxResult.error("入参不能为空"); |
| | | } |
| | | Long tid = Long.valueOf(taskId); |
| | | return toAjax(serviceTaskService.deleteServiceTaskByTaskid(tid)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiOperation("通过任务ID和患者ID获取单个人的题目信息") |
| | | @PostMapping("/getScriptInfoByCondition") |
| | | public TableDataInfo getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues serviceTaskScriptQues) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key)); |
| | | public AjaxResult getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues serviceTaskScriptQues) { |
| | | Long tid = null; |
| | | Long pid = null; |
| | | log.info("getScriptInfoByCondition入参为:{}", serviceTaskScriptQues); |
| | | try { |
| | | // tid = Long.valueOf(rsaPublicKeyExample.decryptedData(URLDecoder.decode(serviceTaskScriptQues.getParam1(), "UTF-8"), pri_key)); |
| | | // pid = Long.valueOf(rsaPublicKeyExample.decryptedData(URLDecoder.decode(serviceTaskScriptQues.getParam2(), "UTF-8"), pri_key)); |
| | | tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key)); |
| | | pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key)); |
| | | } catch (Exception e) { |
| | | log.error("getScriptInfoByCondition报错了:{}", e.getMessage()); |
| | | } |
| | | |
| | | log.info("tid和pid的值为:{},{}", tid, pid); |
| | | return getDataTable(serviceTaskService.getScriptInfoByCondition(tid, pid)); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid)); |
| | | } |
| | | |
| | | } |