| | |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | |
| | | } else if (descByCode.equals("短信")) { |
| | | log.info("----active的值为:{}", active); |
| | | //短信 |
| | | //对url中两个参数加密 |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | |
| | | //如果type是语音随访的话(说明补偿发送方式中有电话随访的方式,这里的外链就地址只能用/sf) |
| | | if (serviceSubtask.getType().equals("1")) |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/sf?p=" + format); |
| | | if (active.equals("ls") || active.equals("ssltd")) { |
| | | if (active.equals("ls") || active.equals("sltd")) { |
| | | sendMagParam.setContent("您好,邀请您填写出院调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!"); |
| | | } else if (active.equals("xh")) { |
| | | sendMagParam.setContent("【新华医院】您好,邀请您填写出院调查表,请点击" + sendMagParam.getUrl() + "填写。感谢您配合!"); |
| | |
| | | } else if (active.equals("xh")) { |
| | | sendMagParam.setContent("【新华医院】您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!"); |
| | | } |
| | | } else { |
| | | } else if (heLibrary.getHetype().equals("2")) { |
| | | //通知 |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setContent(heLibrary.getPreachcontent()); |
| | |
| | | throw new BaseException("短信发送失败"); |
| | | } |
| | | } else if (active.equals("sltd")) { |
| | | log.info("-------进来了不??"); |
| | | //省立同德的短信发送方式 |
| | | JSONObject data = MessageSend.sendMsg(sendMagParam.getContent(), "2", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | String code = data.get("code").toString(); |
| | | if (StringUtils.isNotEmpty(code) && code.equals("00000")) { |
| | | String data = MessageSend.sendMsg(sendMagParam.getContent(), "2", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | if (StringUtils.isNotEmpty(data) && data.contains("result=0")) { |
| | | s = "true"; |
| | | } else { |
| | | setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败", "5"); |
| | | setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败: " + data, "5"); |
| | | throw new BaseException("短信发送失败"); |
| | | } |
| | | } |
| | |
| | | serviceSubtaskPreachform.setOrgid(serviceSubtask.getOrgid()); |
| | | //获取该患者的发送方式总数 |
| | | List<ServiceSubtaskPreachform> spSize = serviceSubtaskPreachformMapper.selectServiceSubtaskPreachformList(serviceSubtaskPreachform); |
| | | |
| | | log.error("-------spSize的值为:{}", spSize); |
| | | serviceSubtaskPreachform.setPreachform(preachform); |
| | | //1:未发送状态 |
| | | serviceSubtaskPreachform.setSendstate("1"); |
| | | log.error("---serviceSubtaskPreachform入参为:{}", serviceSubtaskPreachform); |
| | | List<ServiceSubtaskPreachform> serviceSubtaskPreachforms = serviceSubtaskPreachformMapper.selectServiceSubtaskPreachformList(serviceSubtaskPreachform); |
| | | //电话的未发送状态,需要查2,因为,数据可能卡在队列里了(也有可能没有拉取,sendstate=1,所以如果是电话状态判断serviceSubtaskPreachforms是不是为空) |
| | | if (preachform.equals("3") && CollectionUtils.isEmpty(serviceSubtaskPreachforms)) { |