陈昶聿
4 天以前 2cfa20c70ea84fa3435f3fd1e653c5ae60a3fc1e
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -11,6 +11,7 @@
import com.ruoyi.common.enums.MsgLSEnum;
import com.ruoyi.common.enums.ServiceFromEnum;
import com.ruoyi.common.enums.WxGZHEnum;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.HttpUtil;
import com.ruoyi.common.utils.OkHttpExample;
import com.ruoyi.common.utils.RSAPublicKeyExample;
@@ -698,7 +699,7 @@
                        log.info("-----------map的值为:{}", msgInfo);
                        String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid(), msgInfo.get("tokenUrl"));
                        if (ObjectUtils.isNotEmpty(msgInfo) && StringUtils.isEmpty(msgInfo.get("address"))) {
                            setSuccessPreachForm(serviceSubtask, sendPreachform, "短信发送失败,该机构没有配置短信地址, 时间:" + now , "5");
                            setSuccessPreachForm(serviceSubtask, sendPreachform, "短信发送失败,该机构没有配置短信地址, 时间:" + now, "5");
                            return;
                        }
                        log.info("【sfHandlle】丽水短信发送,地址:{},参数:{},机构ID:{}", msgInfo.get("address"), sendMagParam, serviceSubtask.getOrgid());
@@ -714,8 +715,13 @@
                        log.info("sltd进来了吗?{}   ,---sendMagParam.getContent()的参数为:{}", active, sendMagParam.getContent());
                        //省立同德的短信发送方式
                        String data = MessageSend.sendMsg(sendMagParam.getContent(), "6", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
                        if (StringUtils.isNotEmpty(data) && data.contains("result=0")) {
                            isSuccess = "true";
                        if (StringUtils.isNotEmpty(data)) {
                            ObjectMapper mapper = new ObjectMapper();
                            JsonNode root = mapper.readTree(data);
                            String status = root.get("result").get(0).get("status").asText();
                            if (status.equals("00000")) {
                                isSuccess = "true";
                            }
                        }
                    } else if (active.equals("hzszlyy")) {//市一医院
                        String content = sendMagParam.getContent().replace("【新华医院】", "");
@@ -770,6 +776,8 @@
                    //获取微信公众号请求信息根据机构ID
                    List<String> wxqqxx = WxGZHEnum.getDescByCode(patArchive.getOrgid());
                    //市一医院 不校验
                    if (CollectionUtils.isEmpty(wxqqxx) || wxqqxx.size() < 4) {
                        setSuccessPreachForm(serviceSubtask, sendPreachform, "【公众号】该机构的公众号配置信息不全,无法通过公众号发送", "4");
                        return;
@@ -780,9 +788,10 @@
                        return;
                    }
                    String wxCode = "";
                    if (active.equals("hzszlyy")) {//市一医院
                    //市一医院
                    if (active.equals("hzszlyy")) {
                        //处理中文乱码问题
                        String title = URLEncoder.encode("您好,邀请您填写出院调查表,请点击填写。", StandardCharsets.UTF_8.toString());
                        /**String title = URLEncoder.encode("您好,邀请您填写出院调查表,请点击填写。", StandardCharsets.UTF_8.toString());
                        String content = URLEncoder.encode("您好,邀请您填写出院调查表,请点击填写。", StandardCharsets.UTF_8.toString());
                        String encodedUrl = URLEncoder.encode(url, StandardCharsets.UTF_8.toString());
                        String urlTemp = "http://192.200.54.14:5003/sfjk/SendMessage?sfzh=" + serviceSubtask.getSfzh() +
@@ -792,7 +801,13 @@
                                "&url=" + encodedUrl +
                                "&key=ff76f8904f5f32b5ee1739e8ea46e60g";
//                        HttpUtils.sendGet(urlTemp);
                        HttpUtils.sendPost(urlTemp);
                        String sendMsg = "";
                        sendMsg = HttpUtils.sendPost(urlTemp);
                        log.info(sendMsg); **/
                        wxCode = smsUtils.sendChat(url, patArchive.getTelcode(), serviceSubtask.getSfzh());
                        log.info(wxCode);
                    } else {
                        wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), patArchive.getTelcode(), serviceSubtask.getSendname(), patArchive.getPatidHis(), wxqqxx);
                    }