| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sign.Md5Utils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.common.LSHospTokenUtil; |
| | |
| | | log.error("获取微信公众号请求信息根据机构ID:{}", patArchive.getOrgid()); |
| | | List<String> wxqqxx = WxGZHEnum.getDescByCode(patArchive.getOrgid()); |
| | | //市一医院 不校验 |
| | | if(active.equals("hzszlyy")){ |
| | | |
| | | }else { |
| | | if (CollectionUtils.isEmpty(wxqqxx) || wxqqxx.size() < 4) { |
| | | serviceSubtask.setCurrentPreachform(sendPreachform); |
| | | serviceSubtask.setVisitTime(getNextVisitTime(serviceSubtask.getId(), serviceSubtask.getTaskid(), serviceSubtask.getVisitTime(), serviceSubtask.getCurrentPreachform())); |
| | |
| | | setFailPreachForm(serviceSubtask, sendPreachform, "该机构的公众号配置信息不全,无法通过公众号发送", "5"); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskName(), patArchive.getTelcode(), patArchive.getName(), patArchive.getPatidHis(), wxqqxx); |
| | | String wxCode = ""; |
| | | if (active.equals("hzszlyy")) { |
| | | wxCode = smsUtils.sendChat(url, patArchive.getTelcode(), serviceSubtask.getSfzh()); |
| | | log.info(wxCode); |
| | | }else { |
| | | wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskName(), patArchive.getTelcode(), patArchive.getName(), patArchive.getPatidHis(), wxqqxx); |
| | | log.error("wxCode的值为:{}", wxCode); |
| | | Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); |
| | | log.error("map的值为:{}", map); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | |
| | | public enum WxGZHEnum { |
| | | ZYY("47231022633110211A2101", "3311000002", "MzMxMTAwMDAwMg==", "http://40.78.1.5:8101/frontend/medical/api"), |
| | | JN("47255004333112711A1001", null, null, null), |
| | | HB("1", "3311000002", "MzMxMTAwMDAwMg==", "http://40.78.1.5:8101/frontend/medical/api"), |
| | | WS("2", "3311000002", "MzMxMTAwMDAwMg==", "http://40.78.1.5:8101/frontend/medical/api"); |
| | | |
| | | |
| | |
| | | //获取微信公众号请求信息根据机构ID |
| | | List<String> wxqqxx = WxGZHEnum.getDescByCode(patArchive.getOrgid()); |
| | | //市一医院 不校验 |
| | | if(active.equals("hzszlyy")){ |
| | | |
| | | }else { |
| | | if (CollectionUtils.isEmpty(wxqqxx) || wxqqxx.size() < 4) { |
| | | setSuccessPreachForm(serviceSubtask, sendPreachform, "【公众号】该机构的公众号配置信息不全,无法通过公众号发送", "4"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(patArchive.getPatidHis())) { |
| | |
| | | sendMsg = HttpUtils.sendPost(urlTemp); |
| | | log.info(sendMsg); **/ |
| | | |
| | | String sendMsg = ""; |
| | | sendMsg = smsUtils.sendChat(url, patArchive.getTelcode(), serviceSubtask.getSfzh()); |
| | | 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); |