| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.dx2.MessageSend; |
| | | import com.ruoyi.common.dx.MessageSend; |
| | | import com.ruoyi.common.enums.MsgLSEnum; |
| | | import com.ruoyi.common.enums.ServiceFromEnum; |
| | | import com.ruoyi.common.enums.WxGZHEnum; |
| | |
| | | |
| | | @Value("${req_path}") |
| | | private String req_path; |
| | | |
| | | @Value("${visitHosp}") |
| | | private Integer visitHosp; |
| | | |
| | | @Autowired |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | |
| | | //出院表 |
| | | iPatMedInhospService.dealOutHospInfo(); |
| | | //门诊表 |
| | | if (visitHosp != 1) { |
| | | if (active.equals("xh")) { |
| | | iPatMedOuthospService.dealOutpatientInfo(); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | String isSuccess = null; |
| | | if (visitHosp == 1) { |
| | | if (active.equals("xh")) { |
| | | Map<String, String> req = new HashMap<>(); |
| | | req.put("phone", sendMagParam.getPhone()); |
| | | req.put("content", sendMagParam.getContent()); |
| | | isSuccess = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | } else if (visitHosp == 2) { |
| | | } else if (active.equals("ls")) { |
| | | String url = configService.selectConfigByKey("token.360", serviceSubtask.getOrgid()); |
| | | //丽水的短信发送方式 |
| | | Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid()); |
| | |
| | | if (code.equals("0")) { |
| | | isSuccess = "true"; |
| | | } |
| | | } else if (visitHosp == 4) { |
| | | } else if (active.equals("sltd")) { |
| | | //省立同德的短信发送方式 |
| | | 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")) { |
| | | isSuccess = "true"; |
| | | } |
| | | } else if (visitHosp == 3) {//市一医院 |
| | | } else if (active.equals("hzszlyy")) {//市一医院 |
| | | String content = sendMagParam.getContent().replace("【新华医院】", ""); |
| | | String result = smsUtils.sendSms(xhsmsPath, xhsmsAccount, xhsmsPwd, sendMagParam.getPhone(), content); |
| | | //这里需要根据result返回的值去判断,是否成功,然后将值赋值给isSuccess |
| | |
| | | return; |
| | | } |
| | | String wxCode = ""; |
| | | if (visitHosp == 3) {//市一医院 |
| | | String urlTemp = "http://192.200.54.14:5003/sfjk/SendMessage?sfzh=" + serviceSubtask.getSfzh() |
| | | + "&title=您好,邀请您填写出院调查表,请点击填写。&content=您好,邀请您填写出院调查表,请点击填写。&phone=" + patArchive.getTelcode() |
| | | + "&url=" + url + "&key=ff76f8904f5f32b5ee1739e8ea46e60g"; |
| | | if (active.equals("hzszlyy")) {//市一医院 |
| | | String urlTemp = "http://192.200.54.14:5003/sfjk/SendMessage?sfzh=" + serviceSubtask.getSfzh() + "&title=您好,邀请您填写出院调查表,请点击填写。&content=您好,邀请您填写出院调查表,请点击填写。&phone=" + patArchive.getTelcode() + "&url=" + url + "&key=ff76f8904f5f32b5ee1739e8ea46e60g"; |
| | | HttpUtils.sendGet(urlTemp); |
| | | } else { |
| | | wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), patArchive.getTelcode(), serviceSubtask.getSendname(), patArchive.getPatidHis(), wxqqxx); |