| | |
| | | //通过任务ID拿到患者信息 |
| | | ServiceSubtaskVO ivrTaskcall = new ServiceSubtaskVO(); |
| | | ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | ivrTaskcall.setSendstate(1L); |
| | | ivrTaskcall.setSendstate(2L); |
| | | List<ServiceSubtask> selectServiceSubtaskList = ivrTaskcallMapper.selectServiceSubtaskList(ivrTaskcall); |
| | | if (descByCode.equals("电话")) { |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | |
| | | |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | //先判断一下,subIds是否为空,如果不为空,只执行subIds里的患者 |
| | | log.info("-----subIds的值为:{}", subIds); |
| | | if (CollectionUtils.isNotEmpty(subIds)) { |
| | | boolean contains = subIds.contains(serviceSubtask.getId()); |
| | | //如果contains不为true,说明当前的患者已经发送成功,直接循环下一个人就行 |
| | |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); |
| | | //转成16进制 |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | ; |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/sf?p=" + format); |
| | | sendMagParam.setContent("您好,邀请您填写出院随访调查表,请点击" + sendMagParam.getUrl() + " 填写。感谢您配合!"); |
| | | log.info("888888888888:{}", sendMagParam); |
| | | } else if (type == 2) { |
| | | //问券(问题) |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/wt?p=" + format); |
| | | sendMagParam.setContent("您好,邀请您填写出院调查表,请点击" + sendMagParam.getUrl() + " 填写。感谢您配合!"); |
| | | log.info("您好,邀请您填写出院调查表,请点击,{}",sendMagParam.getUrl()); |
| | | log.info("您好,邀请您填写出院调查表,请点击,{}", sendMagParam.getUrl()); |
| | | } else if (type == 3) { |
| | | //宣教 |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/xj?p=" + format); |
| | | sendMagParam.setContent("您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!"); |
| | | log.info("-----------sendMagParam的值为:{}", sendMagParam); |
| | | } |
| | | //短信还需要模板 |
| | | // Map<String, String> req = new HashMap<>(); |
| | |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddhhmmsszzz"); // 输出日期格式 |
| | | strb.append("&send_time=" + dateFormat.format(new Date())); |
| | | String isSuccess = HttpUtil.postFormRequest(xhsmsPath, strb.toString()); |
| | | log.info("-----------sisSuccess的值为:{}", isSuccess); |
| | | if (StringUtils.isNotEmpty(isSuccess) && isSuccess.contains("200")) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |