| | |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.ruoyi.quartz.service.ICollectHISService; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.common.LSHospTokenUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.HeLibraryMapper; |
| | |
| | | @Autowired |
| | | private ICollectHISService ichService; |
| | | |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | |
| | | @Value("${localIP}") |
| | | private String localIP; |
| | | |
| | | @Value("${xhsmsPath}") |
| | | private String xhsmsPath; |
| | | |
| | | @Value("${xhsmsAccount}") |
| | | private String xhsmsAccount; |
| | | |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | |
| | | req.put("content", sendMagParam.getContent()); |
| | | isSuccess = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | } else if (visitHosp == 2) { |
| | | String url = configService.selectConfigByKey("token.360",serviceSubtask.getOrgid()); |
| | | //丽水的短信发送方式 |
| | | Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid()); |
| | | String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid()); |
| | | String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid(),url); |
| | | if (ObjectUtils.isNotEmpty(map) && StringUtils.isEmpty(map.get("address"))) { |
| | | ServiceSubtask ss = new ServiceSubtask(); |
| | | ss.setResult("error"); |
| | |
| | | if (code.equals("0")) { |
| | | isSuccess = "true"; |
| | | } |
| | | }else if (visitHosp == 3) {//市一医院 |
| | | String content=sendMagParam.getContent().replace("【新华医院】",""); |
| | | smsUtils.sendSms(xhsmsPath,xhsmsAccount,xhsmsPwd,sendMagParam.getPhone(),content); |
| | | } |
| | | //任务发送记录 |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | |
| | | serviceSubtaskMapper.updateServiceSubtask(ss); |
| | | continue; |
| | | } |
| | | String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), patArchive.getTelcode(), serviceSubtask.getSendname(), patArchive.getPatidHis(), wxqqxx); |
| | | |
| | | 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"; |
| | | HttpUtils.sendGet(urlTemp); |
| | | }else{ |
| | | wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), patArchive.getTelcode(), serviceSubtask.getSendname(), patArchive.getPatidHis(), wxqqxx); |
| | | } |
| | | Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); |
| | | //任务发送记录 |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |