|
@ -64,7 +64,9 @@ public class WeiXinEventProcess {
|
|
|
String result2 = tempStr.substring(secondIndex-1);*/
|
|
|
result=tempStr.replace("<ArticleCount>5</ArticleCount>","<ArticleCount>4</ArticleCount>");
|
|
|
}
|
|
|
|
|
|
if(message.get("EventKey").equals("jiankangdangan")){
|
|
|
result = clickEventProcessMenu(message);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@ -165,6 +167,80 @@ public class WeiXinEventProcess {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 菜单点击消息发送
|
|
|
*
|
|
|
* @param message
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
private static String clickEventProcessMenu(Map<String,String> message) throws Exception{
|
|
|
String result = "";
|
|
|
// 配置信息
|
|
|
Properties systemConf = SystemConf.getInstance().getSystemProperties();
|
|
|
// 图文信息
|
|
|
List<Map<String,String>> articles = new ArrayList<>();
|
|
|
//就诊记录
|
|
|
Map<String,String> articleVisit = new HashMap<>();
|
|
|
String visit = systemConf.getProperty("patient_visit_url");
|
|
|
// 图文消息图片URL
|
|
|
String visit_pic = systemConf.getProperty("patient_visit_pic");
|
|
|
// URL设置服务器URL、AppId
|
|
|
visit = visit.replace("{server}", systemConf.getProperty("wechat_base_url"))
|
|
|
.replace("{appId}", systemConf.getProperty("appId"));
|
|
|
//图片地址
|
|
|
visit_pic = visit_pic.replace("{server}", systemConf.getProperty("server_url"));
|
|
|
|
|
|
articleVisit.put("Url",visit);
|
|
|
articleVisit.put("Title", "就诊记录");
|
|
|
articleVisit.put("Description","就诊记录");
|
|
|
articleVisit.put("PicUrl",visit_pic);
|
|
|
articles.add(articleVisit);
|
|
|
|
|
|
//#检查检验
|
|
|
Map<String,String> articleInspect = new HashMap<>();
|
|
|
// 图文URL
|
|
|
String inspect = systemConf.getProperty("patient_inspect_url");
|
|
|
// 图文消息图片URL
|
|
|
String inspect_pic = systemConf.getProperty("patient_inspect_pic");
|
|
|
// URL设置服务器URL、AppId
|
|
|
inspect = inspect.replace("{server}", systemConf.getProperty("wechat_base_url"))
|
|
|
.replace("{appId}", systemConf.getProperty("appId"));
|
|
|
//图片地址
|
|
|
inspect_pic = inspect_pic.replace("{server}", systemConf.getProperty("server_url"));
|
|
|
|
|
|
articleInspect.put("Url",inspect);
|
|
|
articleInspect.put("Title", "检查检验");
|
|
|
articleInspect.put("Description","检查检验");
|
|
|
articleInspect.put("PicUrl",inspect_pic);
|
|
|
articles.add(articleInspect);
|
|
|
|
|
|
Map<String,String> articleExamination = new HashMap<>();
|
|
|
// 图文URL
|
|
|
String examination = systemConf.getProperty("patient_examination_url");
|
|
|
// 图文消息图片URL
|
|
|
String examination_pic = systemConf.getProperty("patient_examination_pic");
|
|
|
// URL设置服务器URL、AppId
|
|
|
examination = examination.replace("{server}", systemConf.getProperty("wechat_base_url"))
|
|
|
.replace("{appId}", systemConf.getProperty("appId"));
|
|
|
//图片地址
|
|
|
examination_pic = examination_pic.replace("{server}", systemConf.getProperty("server_url"));
|
|
|
|
|
|
articleExamination.put("Url",examination);
|
|
|
articleExamination.put("Title", "体征设备管理功能使用说明");
|
|
|
articleExamination.put("Description","功能使用说明");
|
|
|
articleExamination.put("PicUrl",examination_pic);
|
|
|
articles.add(articleExamination);
|
|
|
// 构建回复消息XML
|
|
|
result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"),message.get("ToUserName"),articles);
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 关注事件消息发送
|
|
|
* @param message
|