| | |
| | | @ApiOperation("患者问题结果记录缓存(外链)") |
| | | @PostMapping("/saveQuestionCache") |
| | | public AjaxResult saveQuestionCache(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) { |
| | | log.info("保存患者问题结果记录缓存(外链)入参为:{}",serviceSubTaskCacheReq); |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionCache(serviceSubTaskCacheReq, 0L)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("查询患者随访信息") |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | @PostMapping("/patItem") |
| | | public TableDataInfo patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | public Map<String, Object> patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | List<ServiceSubtask> serviceSubtaskList = null; |
| | | if (serviceSubtaskVO != null) { |
| | | PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); |
| | | Integer offset = PageUtils.getOffset(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); |
| | | serviceSubtaskVO.setPageNum(offset); |
| | | serviceSubtaskList = serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | } |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | |
| | | serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | } |
| | | }); |
| | | return getDataTable2(total, list); |
| | | // return getDataTable(serviceSubtaskService.patItem(ivrTaskcall)); |
| | | return getDataTable3(total, list); |
| | | } |
| | | |
| | | /** |
| | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @ApiOperation("查询任务列表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceTask:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceTask serviceTask) { |
| | | PageUtils.startPageByPost(serviceTask.getPageNum(), serviceTask.getPageSize()); |
| | | // List<ServiceTask> list = serviceTaskService.selectServiceTaskList(serviceTask); |
| | | public Map<String, Object> list(@RequestBody ServiceTask serviceTask) { |
| | | Integer offset = PageUtils.getOffset(serviceTask.getPageNum(), serviceTask.getPageSize()); |
| | | serviceTask.setPageNum(offset); |
| | | List<ServiceTask> list = serviceTaskService.selectServiceTaskAndtaskDeptList(serviceTask); |
| | | List<ServiceTaskVO> serviceTaskVOS = DtoConversionUtils.sourceToTarget(list, ServiceTaskVO.class); |
| | | |
| | |
| | | } |
| | | } |
| | | //获取total |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | serviceTask.setPageNum(null); |
| | | serviceTask.setPageSize(null); |
| | | serviceTaskService.selectServiceTaskList(serviceTask); |
| | | } |
| | | }); |
| | | serviceTask.setPageNum(null); |
| | | serviceTask.setPageSize(null); |
| | | List<ServiceTask> serviceTasks = serviceTaskService.selectServiceTaskAndtaskDeptList(serviceTask); |
| | | |
| | | return getDataTable2(total, serviceTaskVOS); |
| | | return getDataTable3(CollectionUtils.isNotEmpty(serviceTasks)?serviceTasks.size():0L, serviceTaskVOS); |
| | | } |
| | | |
| | | return getDataTable2(0, serviceTaskVOS); |
| | | return getDataTable3(0L, serviceTaskVOS); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Test |
| | | public void bb() { |
| | | RSAPublicKeyExample rsaPublicKeyExample=new RSAPublicKeyExample(); |
| | | String s1 = rsaPublicKeyExample.encryptedData("123456", "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ=="); |
| | | |
| | | // String s = rsaPublicKeyExample.decryptedData("J7V6yb5WHW63bQMbMyzxeT07HGesIXJwy9w77zBa6KG4PnWe7uaZh00vX21w%2Bn5FW8%2BjUAAU1HatqRWzFp7fvA%3D%3D", "MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg=="); |
| | | System.out.println(s1); |
| | | // String s1 = rsaPublicKeyExample.encryptedData("123456", "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ=="); |
| | | //System.out.println(s1); |
| | | String s = rsaPublicKeyExample.decryptedData("ZOgme8mSTcnU%2BrrzuvEahqhFwt%2FNmpPmGMpNHKQR0bb3Wk9%2FD2Wr92O53Iz1x9qjox69tVuMfvr26KxgHCAF8Q%3D%3D", "MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg=="); |
| | | System.out.println(s); |
| | | } |
| | | |
| | | public void aa(MultipartFile file) throws IOException { |
| | |
| | | |
| | | import java.beans.PropertyEditorSupport; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 响应请求分页数据 |
| | | */ |
| | | @SuppressWarnings({"rawtypes", "unchecked"}) |
| | | protected Map<String, Object> getDataTable3(long total, List<?> list) { |
| | | Map<String, Object> rspData = new HashMap<>(); |
| | | rspData.put("code", HttpStatus.SUCCESS); |
| | | rspData.put("msg", "查询成功"); |
| | | rspData.put("rows", list); |
| | | rspData.put("total", total); |
| | | return rspData; |
| | | } |
| | | |
| | | /** |
| | | * 返回成功 |
| | | */ |
| | | public AjaxResult success() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 计算偏移量 |
| | | */ |
| | | public static Integer getOffset(Integer pageNum, Integer pageSize) { |
| | | if (pageNum == null || pageNum == 0) pageNum = 1; |
| | | if (pageSize == null) pageSize = 10; |
| | | return (pageNum - 1) * pageSize; |
| | | } |
| | | |
| | | /** |
| | | * 清理分页的线程变量 |
| | | */ |
| | | public static void clearPage() { |
| | |
| | | * @return 语音任务集合 |
| | | */ |
| | | public List<ServiceTask> selectServiceTaskList(ServiceTask ServiceTask); |
| | | |
| | | public List<ServiceTask> selectServiceTaskAndtaskDeptList(ServiceTask serviceTask); |
| | | |
| | | /** |
| | |
| | | String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | log.error("dealOutHospInfo需要处理的出院患者信息:{}", patMedInhosps); |
| | | log.info("dealOutHospInfo需要处理的出院患者信息:{}", CollectionUtils.isNotEmpty(patMedInhosps)?patMedInhosps.size():"0"); |
| | | |
| | | for (PatMedInhosp patMedInhosp1 : patMedInhosps) { |
| | | try { |
| | |
| | | pid = Long.valueOf(serviceSubTaskCacheReq.getParam2()); |
| | | } |
| | | // if (serviceSubTaskCacheReq.getType() != null && serviceSubTaskCacheReq.getType() == 2) { |
| | | log.info("saveQuestionCache---tid的值为:{},saveQuestionCache--pid的值为:{}", tid, pid); |
| | | if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getSvyLibTemplateScriptVOS()) && serviceSubTaskCacheReq.getSvyLibTemplateScriptVOS().size() > 0) { |
| | | //问卷 |
| | | redisCache.deleteObject(pid + "-" + tid + "-WJscriptCache"); |
| | |
| | | List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskVO); |
| | | List<ServiceSubtask> serviceSubtaskList = new ArrayList<>(); |
| | | //获取分数 |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | //计算患者的分数 |
| | | if (serviceSubtask.getScore() == null || BigDecimal.ZERO.equals(serviceSubtask.getScore())) { |
| | | //如果为空的话,去detail里拿到每个题的选项分,如果是作答题,直接拿题目分(前题,该模板是分数类型) |
| | | Map<String, Object> map = getScore(serviceSubtask, serviceSubtaskVO.getDetailResult()); |
| | | serviceSubtask.setScore((BigDecimal) map.get("score")); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | if ((Boolean) map.get("isExist") == true) { |
| | | //测试完删除(应付测试用的) |
| | | serviceSubtaskList.add(serviceSubtask); |
| | | } |
| | | } else { |
| | | //测试完删除(应付测试用的) |
| | | if (!StringUtils.isEmpty(serviceSubtaskVO.getDetailResult())) { |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setSubId(serviceSubtask.getId()); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetails = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | for (ServiceSubtaskDetail ssd : serviceSubtaskDetails) { |
| | | if (ssd.getAsrtext().equals(serviceSubtaskVO.getDetailResult())) { |
| | | serviceSubtaskList.add(serviceSubtask); |
| | | } |
| | | } |
| | | }else { |
| | | serviceSubtaskList.add(serviceSubtask); |
| | | } |
| | | } |
| | | } |
| | | return serviceSubtaskList; |
| | | // for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | // //计算患者的分数 |
| | | // if (serviceSubtask.getScore() == null || BigDecimal.ZERO.equals(serviceSubtask.getScore())) { |
| | | // //如果为空的话,去detail里拿到每个题的选项分,如果是作答题,直接拿题目分(前题,该模板是分数类型) |
| | | // Map<String, Object> map = getScore(serviceSubtask, serviceSubtaskVO.getDetailResult()); |
| | | // serviceSubtask.setScore((BigDecimal) map.get("score")); |
| | | // serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | // if ((Boolean) map.get("isExist") == true) { |
| | | // //测试完删除(应付测试用的) |
| | | // serviceSubtaskList.add(serviceSubtask); |
| | | // } |
| | | // } else { |
| | | // //测试完删除(应付测试用的) |
| | | // if (!StringUtils.isEmpty(serviceSubtaskVO.getDetailResult())) { |
| | | // ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | // serviceSubtaskDetail.setSubId(serviceSubtask.getId()); |
| | | // List<ServiceSubtaskDetail> serviceSubtaskDetails = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | // for (ServiceSubtaskDetail ssd : serviceSubtaskDetails) { |
| | | // if (ssd.getAsrtext().equals(serviceSubtaskVO.getDetailResult())) { |
| | | // serviceSubtaskList.add(serviceSubtask); |
| | | // } |
| | | // } |
| | | // }else { |
| | | // serviceSubtaskList.add(serviceSubtask); |
| | | // } |
| | | // } |
| | | // } |
| | | return selectServiceSubtaskList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | private String getOutPath(String phone, Long tid, String taskName, Long pId, Integer type) { |
| | | log.info("tid的值为:{},pid的值为:{}",tid,pId); |
| | | //对url中两个参数加密 |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(tid.toString(), pub_key); |
| | | String taskId = rsaPublicKeyExample.encryptedData(tid.toString(), pub_key).toString(); |
| | | String outpath = null; |
| | | try { |
| | | String patid = rsaPublicKeyExample.encryptedData(pId.toString(), pub_key); |
| | | String patid = rsaPublicKeyExample.encryptedData(pId.toString(), pub_key).toString(); |
| | | |
| | | log.info("tid加密后的值为:{},pid加密后的值为:{}",taskId,patid); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | if (type == 1) { |
| | |
| | | select id, |
| | | notrequired_flag, |
| | | notrequiredreason, |
| | | patientOverview, |
| | | patient_overview, |
| | | patientno, |
| | | patid_his, |
| | | age_unit, |
| | |
| | | <where> |
| | | a.del_flag = 0 |
| | | AND b.del_flag = 0 |
| | | AND a.idcardno IS NOT NULL |
| | | -- AND a.idcardno IS NOT NULL |
| | | <if test="tagname != null and tagname != ''"> |
| | | AND EXISTS ( |
| | | SELECT 1 |
| | |
| | | inhospid, |
| | | drname, |
| | | excep, |
| | | tagname, |
| | | drcode, |
| | | long_send_time, |
| | | openid, |
| | |
| | | <if test="sort != null and sort==3">order by long_send_time desc</if> |
| | | <if test="sort != null and sort==5">order by admindate asc</if> |
| | | <if test="sort != null and sort==6">order by admindate desc</if> |
| | | |
| | | <!-- order by update_time desc,id desc --> |
| | | <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if> |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | </where> |
| | | order by update_time desc,taskid desc |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectServiceTaskByTaskid" parameterType="Long" resultMap="ServiceTaskResult"> |