You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
482 lines
24 KiB
482 lines
24 KiB
package com.ynxbd.wx.wxfactory;
|
|
|
|
import com.ynxbd.common.helper.common.RepeatKeyHelper;
|
|
import com.ynxbd.wx.config.HospConfigEnum;
|
|
import com.ynxbd.wx.config.WeChatConfig;
|
|
import com.ynxbd.wx.config.WxEventEnum;
|
|
import com.ynxbd.wx.wxfactory.base.passivemsg.event.WxEvent;
|
|
import com.ynxbd.wx.wxfactory.base.passivemsg.models.XMLNewsMsg;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 微信被动回复推送
|
|
*/
|
|
@Slf4j
|
|
public class WxPassiveReplyHelper {
|
|
public static final String SUCCESS = "success";
|
|
|
|
private static RepeatKeyHelper EXPIRE_KEYS; // 重复通知过滤
|
|
|
|
private synchronized static void createExpireKey() {
|
|
if (EXPIRE_KEYS == null) {
|
|
EXPIRE_KEYS = new RepeatKeyHelper(60);
|
|
}
|
|
}
|
|
|
|
// 消息通知过滤
|
|
public static boolean isRepeat(String key) {
|
|
if (EXPIRE_KEYS == null) {
|
|
createExpireKey();
|
|
}
|
|
return EXPIRE_KEYS.isContainsKey(key);
|
|
}
|
|
|
|
/**
|
|
* 关注
|
|
*
|
|
* @param response
|
|
* @param content
|
|
* @param msgType
|
|
* @param fromUserName
|
|
* @param toUserName
|
|
* @return
|
|
*/
|
|
public static boolean subscribeCommon(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String event) {
|
|
log.info("event={}", event);
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.CODE.equals(event)) {
|
|
String webUrl = WeChatConfig.getWebReqURL();
|
|
return createNewsMsg(response, fromUserName, toUserName, "清廉承诺", msgType, content,
|
|
(webUrl + "wx-subscribe.html"),
|
|
(webUrl + "images/message/subscribe.png"));
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* 回复图文消息
|
|
*
|
|
* @param response
|
|
* @param fromUserName
|
|
* @param toUserName
|
|
* @param title
|
|
* @param msgType
|
|
* @param userText
|
|
* @param link
|
|
* @param imageUrl
|
|
* @return
|
|
*/
|
|
public static boolean createNewsMsg(HttpServletResponse response, String fromUserName, String toUserName, String title, String msgType, String userText, String link, String imageUrl) {
|
|
if (!WxEventEnum.MSG_TYPE_TEXT.isEvent(msgType)) { // 消息类型不为文本
|
|
return false;
|
|
}
|
|
|
|
if (ObjectUtils.isEmpty(userText)) { // 不存在
|
|
return false;
|
|
}
|
|
WxFactory.Base.PassiveMsg().createXmlNewsMsg(response, fromUserName, toUserName,
|
|
new XMLNewsMsg.Article(title, null, link, imageUrl));
|
|
|
|
// List<XMLNewsMessage.Article> articleList = new ArrayList<>();
|
|
// XMLNewsMessage.Article article;
|
|
//
|
|
// article = new XMLNewsMessage.Article();
|
|
// article.setTitle(title);
|
|
// article.setUrl(link);
|
|
// article.setPicUrl(imageUrl);
|
|
// articleList.add(article);
|
|
// XMLNewsMessage xmlNewsMessage = new XMLNewsMessage(fromUserName, toUserName, articleList);
|
|
// xmlNewsMessage.outputStreamWrite(getOutputStream(response));
|
|
return true;
|
|
}
|
|
|
|
|
|
/**
|
|
* 文字匹配
|
|
*/
|
|
public static boolean textCommon(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName) {
|
|
String webUrl = WeChatConfig.getWebReqURL();
|
|
|
|
if (Arrays.asList(new String[]{"缓存"}).contains(content)) {
|
|
return createNewsMsg(response, fromUserName, toUserName, "公众号用不了(缓存清理)", msgType, content,
|
|
(webUrl + "wx-cache.html"),
|
|
(webUrl + "images/message/cache.png"));
|
|
}
|
|
|
|
if (Arrays.asList(new String[]{"微官网"}).contains(content)) {
|
|
return createNewsMsg(response, fromUserName, toUserName, "微官网链接", msgType, content,
|
|
(webUrl + "app.html"),
|
|
(webUrl + "images/message/hospital.png"));
|
|
}
|
|
|
|
if (Arrays.asList(new String[]{"挂号", "预约"}).contains(content)) {
|
|
return createNewsMsg(response, fromUserName, toUserName, "预约挂号", msgType, content,
|
|
(webUrl + "reg-reserve.html"),
|
|
(webUrl + "images/message/report.png"));
|
|
}
|
|
|
|
if (Arrays.asList(new String[]{"查", "报告"}).contains(content)) {
|
|
return createNewsMsg(response, fromUserName, toUserName, "报告单查询", msgType, content,
|
|
(webUrl + "all-result.html"),
|
|
(webUrl + "images/message/report.png"));
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// 根据医院appId回复
|
|
public static Boolean hospReply(HttpServletResponse response, WxEvent wxEvent, String msgId, String fromUserName, String toUserName) {
|
|
String event = wxEvent.getEvent();
|
|
String eventKey = wxEvent.getEventKey();
|
|
String msgType = wxEvent.getMsgType();
|
|
String reqContent = wxEvent.getContent();
|
|
if (reqContent != null) {
|
|
reqContent = reqContent.trim().toUpperCase();
|
|
}
|
|
|
|
WxPassiveReplyHelper.textCommon(response, reqContent, msgType, fromUserName, toUserName);
|
|
|
|
HospConfigEnum hospConfigEnum = HospConfigEnum.findEnumByWxAppId();
|
|
if (hospConfigEnum == null) {
|
|
return false;
|
|
}
|
|
switch (hospConfigEnum) {
|
|
case 红河州第一人民医院:
|
|
return WxPassiveReplyHelper.红河州第一人民医院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
case 蒙自市妇幼保健院:
|
|
return WxPassiveReplyHelper.蒙自市妇幼保健院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
case 德宏州妇幼保健院:
|
|
return WxPassiveReplyHelper.德宏州妇幼保健院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
case 武定忠爱医院:
|
|
return WxPassiveReplyHelper.武定忠爱医院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
case 华坪县人民医院:
|
|
return WxPassiveReplyHelper.华坪县人民医院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
case 巍山县人民医院:
|
|
return WxPassiveReplyHelper.巍山县人民医院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
case 芒市人民医院:
|
|
return WxPassiveReplyHelper.芒市人民医院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
case 玉龙县人民医院:
|
|
return WxPassiveReplyHelper.玉龙县人民医院(response, reqContent, msgType, fromUserName, toUserName, eventKey, event);
|
|
|
|
default:
|
|
break;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private static Boolean 武定忠爱医院(HttpServletResponse response, String reqContent, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
if (WxEventEnum.MSG_TYPE_EVENT.CODE.equals(msgType)) {
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.CODE.equals(event)) {
|
|
String content = "欢迎关注武定忠爱医院!" +
|
|
"\n\uD83D\uDD17 <a href='" + WeChatConfig.getWebReqURL() + "reg-today.html" + "'>今日挂号</a>" +
|
|
"\n\uD83D\uDD17 <a href='" + WeChatConfig.getWebReqURL() + "reg-reserve.html" + "'>预约挂号</a>";
|
|
WxFactory.Base.PassiveMsg().createXmlTextMsg(response, fromUserName, toUserName, content);
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
public static boolean 芒市人民医院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
|
|
if (WxEventEnum.MSG_TYPE_EVENT.CODE.equals(msgType)) {
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.CODE.equals(event)) {
|
|
XMLNewsMsg.Article article = new XMLNewsMsg.Article();
|
|
article.setTitle("微信预约挂号开通喽,大家快快用起来!");
|
|
article.setUrl("https://mp.weixin.qq.com/s/rJF1qBo1-mV5CUdRsi4Z5g");
|
|
article.setPicUrl("https://mmbiz.qpic.cn/mmbiz_jpg/RUm4m8SVypy7nVubUuo6KgdlibcduK8l4tWnXrz7VfTO5EYOeDc9hZxR70wTQgX1sYhRR7SeND6426uczdpf1BA/0?wx_fmt=jpeg");
|
|
WxFactory.Base.PassiveMsg().createXmlNewsMsg(response, fromUserName, toUserName, article);
|
|
}
|
|
}
|
|
|
|
String respContent;
|
|
|
|
if (content != null) {
|
|
if (content.contains("放射") || content.contains("影像") || content.contains("CT") || content.contains("核磁")) {
|
|
respContent = "放射科:2116611、18869202310(值班)";
|
|
|
|
} else if (content.contains("B超")) {
|
|
respContent = "B超室:2121651、18869202311(值班)";
|
|
|
|
} else if (content.contains("检验") || content.contains("化验") || content.contains("生化") || content.contains("免疫")) {
|
|
respContent = "检验科:2130240";
|
|
|
|
} else if (content.contains("口 腔")) {
|
|
respContent = "口腔科:2139404";
|
|
|
|
} else if (content.contains("皮肤")) {
|
|
respContent = "皮肤科:2129260";
|
|
|
|
} else if (content.contains("急诊")) {
|
|
respContent = "急诊科:2103068(护士站)";
|
|
|
|
} else if (content.contains("外三") || content.contains("泌尿")) {
|
|
respContent = "外三科(泌尿):2113501(护士站)";
|
|
|
|
} else if (content.contains("麻醉")) {
|
|
respContent = "麻醉科:18869202309";
|
|
|
|
} else if (content.contains("妇产") || content.contains("产科") || content.contains("妇科")) {
|
|
respContent = "妇产科:2113504(护士站)";
|
|
|
|
} else if (content.contains("感染") || content.contains("传染")) {
|
|
respContent = "感染科:2116031";
|
|
|
|
} else if (content.contains("内二")) {
|
|
respContent = "内二科:2113503(护士站)";
|
|
|
|
} else if (content.contains("内一")) {
|
|
respContent = "内一科:2113500(护士站)";
|
|
|
|
} else if (content.contains("外二") || content.contains("骨科")) {
|
|
respContent = "外二科(骨 科):2122450(护士站) ";
|
|
|
|
} else if (content.contains("儿") || content.contains("儿科")) {
|
|
respContent = "儿科:2122381(护士站)";
|
|
|
|
} else if (content.contains("康复")) {
|
|
respContent = "康复科:2116167(护士站)";
|
|
|
|
} else if (content.contains("体检")) {
|
|
respContent = "体检科:2917280、18288102873";
|
|
|
|
} else if (content.contains("120") || content.contains("急救")) {
|
|
respContent = "120急救中心:2107120";
|
|
|
|
} else if (content.contains("外一") || content.contains("普外")) {
|
|
respContent = "外一科(普外):2133720";
|
|
|
|
} else {
|
|
respContent = "办公室:2122460\n" +
|
|
"行政值班:18869202307\n" +
|
|
"放射科:2116611、18869202310(值班)\n\n" +
|
|
"B超室:2121651、 18869202311(值班)\n\n" +
|
|
"儿 科:2122381(护士站)\n" +
|
|
"康复科:2116167(护士站)\n" +
|
|
"检验科:2130240\n" +
|
|
"口腔科:2139404\n" +
|
|
"皮肤科:2129260\n" +
|
|
"麻醉科:18869202309\n" +
|
|
"感染科:2116031,\n" +
|
|
"急诊科:2103068(护士站)\n" +
|
|
"妇产科:2113504(护士站)\n" +
|
|
"内二科:2113503(护士站)\n" +
|
|
"内一科:2113500(护士站)\n" +
|
|
"外二科(骨 科):2122450(护士站)\n" +
|
|
"外三科(泌 尿):2113501(护士站)\n\n" +
|
|
"体检科:2917280、18288102873\n" +
|
|
"120急救中心:2107120,\n" +
|
|
"外一科(普外):2133720";
|
|
}
|
|
WxFactory.Base.PassiveMsg().createXmlTextMsg(response, fromUserName, toUserName, respContent);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static boolean 华坪县人民医院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
List<XMLNewsMsg.Article> articleList = new ArrayList<>();
|
|
XMLNewsMsg.Article article;
|
|
|
|
if (content != null) {
|
|
String webUrl = WeChatConfig.getWebReqURL();
|
|
if (content.equals("支付") || content.equals("微信支付") || content.contains("费")) {
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("微信支付");
|
|
article.setPicUrl("http://mmbiz.qpic.cn/mmbiz/0jg8QrIOHOydg7liaUzXoa7otFCiavYozxARcpnrxt5ibQ7Y8BewUOtKJPWRUATkaskjvHeeqmicDbovRwZic7BTSng/0?wx_fmt=jpeg");
|
|
article.setDescription("请点这里进入支付页面,支付您的账单,不用再去排队缴费。如需查看检查结果,请输入“检查”。如需查看化验结果,请输入“化验”。");
|
|
article.setUrl(webUrl + "pay-info.html");
|
|
articleList.add(article);
|
|
|
|
} else if (content.equals("检查") || content.equals("检验") || content.equals("化验")) {
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("查看检查结果");
|
|
article.setPicUrl("http://mmbiz.qpic.cn/mmbiz/0jg8QrIOHOydg7liaUzXoa7otFCiavYozxARcpnrxt5ibQ7Y8BewUOtKJPWRUATkaskjvHeeqmicDbovRwZic7BTSng/0?wx_fmt=jpeg");
|
|
article.setDescription("请点这里查看您的检查结果,如要查看化验结果,请输入“化验”或“检验”。如需缴费,请输入“支付”。");
|
|
article.setUrl(webUrl + "all-result.html");
|
|
articleList.add(article);
|
|
}
|
|
}
|
|
|
|
if (WxEventEnum.MSG_TYPE_EVENT.CODE.equals(msgType)) {
|
|
if (eventKey.equals("MYDDC")) {
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("华坪县人民医院患者满意度调查");
|
|
article.setUrl("http://mp.weixin.qq.com/s/MCswklxDHdmYr3sFP70Xdw");
|
|
article.setPicUrl("https://mmbiz.qpic.cn/mmbiz_jpg/0jg8QrIOHOwYlpPRQDFKpbFQsN2ibtZqcS9H9pqX4nOCzdaAHNiciaZubLF9jiayZJBV8ADxAqL6XdbpdqolJuwJIQ/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1");
|
|
articleList.add(article);
|
|
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("患者满意度调查");
|
|
article.setUrl("http://mp.weixin.qq.com/s/7l2YsE2Y-XSTWEXN7BJlIQ");
|
|
article.setPicUrl("https://mmbiz.qpic.cn/mmbiz_jpg/0jg8QrIOHOzYGDMbzzyKicXD9QlRA5MdmpGgicibSdY0A4kmgV94qibuKylgRXbMgPb4zGNw9BvWqDXiby1XyFCFCaQ/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1");
|
|
articleList.add(article);
|
|
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("员工满意度调查");
|
|
article.setUrl("http://mp.weixin.qq.com/s/VyoOCM8FoEZ53ZQC3yX-Yw");
|
|
article.setPicUrl("https://mmbiz.qpic.cn/mmbiz_jpg/0jg8QrIOHOzYGDMbzzyKicXD9QlRA5MdmpF19PW1oFibvCDj60twgfGC556fY3wThlAhIYJsHykiaDIU8h3Igh8Dw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1");
|
|
articleList.add(article);
|
|
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.CODE.equals(event)) {
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("微信支付使用流程!");
|
|
article.setPicUrl("http://mmbiz.qpic.cn/mmbiz/0jg8QrIOHOydg7liaUzXoa7otFCiavYozxARcpnrxt5ibQ7Y8BewUOtKJPWRUATkaskjvHeeqmicDbovRwZic7BTSng/0?wx_fmt=jpeg");
|
|
article.setDescription("首先关注微信公众号“华坪县人民医院”,其次打开公众号,点击“微信支付”,首次需进行身份绑定,按要求输入相关内容,获取账单;最多可以绑定除本人外加4个人,在身份绑定页面,点“添加绑定”");
|
|
|
|
articleList.add(article);
|
|
}
|
|
}
|
|
}
|
|
|
|
return WxFactory.Base.PassiveMsg().createXmlNewsMsg(response, fromUserName, toUserName, articleList);
|
|
}
|
|
|
|
public static boolean 巍山县人民医院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
List<XMLNewsMsg.Article> articleList = new ArrayList<>();
|
|
XMLNewsMsg.Article article;
|
|
|
|
if (WxEventEnum.MSG_TYPE_EVENT.CODE.equals(msgType)) {
|
|
// 满意度
|
|
if (eventKey.equals("MYDDC")) {
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("巍山县人民医院患者满意度调查");
|
|
article.setUrl("https://mp.weixin.qq.com/s/R-tX9YtRRM9Hpw2rMmw2iQ");
|
|
article.setPicUrl("https://mmbiz.qpic.cn/mmbiz_jpg/5kpYU2jcMVicvMfVRATtAKOEjh4A4VvtHmCMKgD9vAfr741FDDEwiccNdj2ZTicBibeeQZfwp6zbaYMI5ubib1TaaeA/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1");
|
|
articleList.add(article);
|
|
|
|
}
|
|
// 关注
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.CODE.equals(event)) {
|
|
article = new XMLNewsMsg.Article();
|
|
article.setTitle("微信预约挂号开通喽,大家快快用起来!");
|
|
article.setUrl("http://mp.weixin.qq.com/s/gl_NitQTP6_ZzoV8pwxOcw");
|
|
article.setPicUrl("http://mmbiz.qpic.cn/mmbiz_jpg/5kpYU2jcMVicNybruqia0dn6kBqiakDlrTgDkweiafibyRl9uK6bkKoiaXib0xktJIywqTDzfe9fHcq5x0gggKkurDicpg/0?wx_fmt=jpeg");
|
|
articleList.add(article);
|
|
}
|
|
}
|
|
return WxFactory.Base.PassiveMsg().createXmlNewsMsg(response, fromUserName, toUserName, articleList);
|
|
}
|
|
|
|
|
|
public static boolean 红河州第一人民医院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
if (content == null) {
|
|
return false;
|
|
}
|
|
|
|
if (content.contains("食堂")) {
|
|
String webUrl = WeChatConfig.getWebReqURL();
|
|
return createNewsMsg(response, fromUserName, toUserName, "食堂充值(温馨提示:第一次使用请进行电话号码绑定)", msgType, content,
|
|
("https://passport.whdc2002.com/"),
|
|
(webUrl + "images/message/food.png"));
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static boolean 玉龙县人民医院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
if (content == null) {
|
|
return false;
|
|
}
|
|
|
|
String respInfo;
|
|
if (content.contains("核酸")) {
|
|
respInfo = " 您好,玉龙县人民医院自助核酸检测需要点击微信挂号—自助核算检测进行具体操作。核酸检测报告电子版可在云南健康码查询," +
|
|
"纸质版可到门诊楼一楼自助打印,如标本检测有异常的,报告出具时间将延迟,如到时间后未查询到结果或有其他疑问可拨打0888-5180762进行咨询。";
|
|
|
|
} else if (content.contains("投诉")) {
|
|
respInfo = "您好,您可以拨打投诉电话:0888-5112778或行政值班电话:0888-5115602进行投诉";
|
|
|
|
} else if (content.contains("电话")) {
|
|
respInfo =
|
|
"玉龙县人民医院行政值班电话:0888-5115602\n" +
|
|
"神经内科、内分泌科、血液内科、风湿免疫科(内一科):0888-5123615\n" +
|
|
"心血管内科、心电图室(内二科):0888-5163257\n" +
|
|
"消化内科、肿瘤科(内三科):0888-5179785\n" +
|
|
"感染性疾病科(内四科):0888-5102655\n" +
|
|
"呼吸与危重症医学科(内五科):0888-5390632\n" +
|
|
"泌尿外科(外一科):0888-5156546\n" +
|
|
"普通外科(外二科):0888-5172791\n" +
|
|
"骨科、神经外科(外三科):0888-5129570\n" +
|
|
"胸外科、心脏大血管外科、乳腺外科(外四科):0888-5172632\n" +
|
|
"急诊医学科:0888-5186934\n" +
|
|
"麻醉科、手术室(手术麻醉科):0888-5186925\n" +
|
|
"妇产科:0888-5180763\n" +
|
|
"儿科:0888-5110667\n" +
|
|
"眼科、耳鼻咽喉科:0888-5186747\n" +
|
|
"口腔科(门诊):0888-5179715\n" +
|
|
"健康体检管理中心咨询电话:0888-5182024\n" +
|
|
"中医科:0888-5110125\n" +
|
|
"康复医学科(高压氧治疗室):0888-5169002\n" +
|
|
"重症医学科:0888-5108252\n" +
|
|
"老年医学科、肾内科:0888-5169002\n" +
|
|
"医学检验科:0888-5180762\n" +
|
|
"临床营养科:0888-5135525\n" +
|
|
"病理科:0888-5127597\n" +
|
|
"医学影像科:0888-5187393\n" +
|
|
"超声医学科:0888-5116254\n" +
|
|
"内镜中心:0888-5304137\n" +
|
|
"药剂科:0888-5122672\n" +
|
|
"党委办公室:0888-5110767\n" +
|
|
"行政办公室:0888-5112778\n" +
|
|
"医疗事务部:0888-5109120\n" +
|
|
"护理部:0888-5122871\n" +
|
|
"感染管理部:0888-5115466\n" +
|
|
"采购管理部:0888-5307952\n" +
|
|
"后勤保障部:0888-5107111";
|
|
|
|
} else if (content.contains("体检")) {
|
|
respInfo = "您好,您可以拨打体检科电话:0888-5182024进行详细咨询";
|
|
|
|
} else if (content.contains("退")) {
|
|
respInfo = "您好,退费需要持身份证到医院门诊楼一楼收费窗口办理";
|
|
|
|
} else if (content.contains("上班")) {
|
|
respInfo = "玉龙县人民医院上班时间:8:00—12:00 13:00—17:00";
|
|
|
|
} else {
|
|
respInfo = null;
|
|
}
|
|
|
|
if (respInfo == null) {
|
|
return false;
|
|
}
|
|
WxFactory.Base.PassiveMsg().createXmlTextMsg(response, fromUserName, toUserName, respInfo);
|
|
return true;
|
|
}
|
|
|
|
public static boolean 德宏州妇幼保健院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
if (WxEventEnum.MSG_TYPE_EVENT.isEvent(msgType)) { // 事件
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.isEvent(event)) { // 关注
|
|
String respContent = "您好!欢迎关注德宏州妇幼保健院!如有疑问请拨打 24小时值班电话:15368666599";
|
|
return WxFactory.Base.PassiveMsg().createXmlTextMsg(response, fromUserName, toUserName, respContent);
|
|
}
|
|
}
|
|
String mediaId = "w-XoPbF-UEDfuGAOkMm24hOecA4Al2zZLf0WETLDXAm9nNhacFNJlZTEe3MlX1xG"; // 图片ID
|
|
return WxFactory.Base.PassiveMsg().createXmlImageMsg(response, fromUserName, toUserName, mediaId);
|
|
}
|
|
|
|
public static boolean 蒙自市妇幼保健院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) {
|
|
String mediaId = "iJoe834_vhMOnlrUUCQF5jyeRvOTJ0sF-ly_vZrsGzPqEFY0kvdzr_p410e-lG0K"; //医院科室对应电话列表图片
|
|
if (WxEventEnum.MSG_TYPE_EVENT.CODE.equals(msgType)) {
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.CODE.equals(event)) {
|
|
return WxFactory.Base.PassiveMsg().createXmlImageMsg(response, fromUserName, toUserName, mediaId);
|
|
}
|
|
}
|
|
if (content == null) {
|
|
return false;
|
|
}
|
|
return WxFactory.Base.PassiveMsg().createXmlImageMsg(response, fromUserName, toUserName, mediaId);
|
|
}
|
|
|
|
|
|
}
|
|
|