|
@@ -17,6 +17,7 @@ import com.jfinal.weixin.sdk.msg.in.speech_recognition.InSpeechRecognitionResult
|
|
|
import com.jfinal.weixin.sdk.msg.out.OutCustomMsg;
|
|
|
import com.jfinal.weixin.sdk.msg.out.OutTextMsg;
|
|
|
import com.zskk.model.Exams;
|
|
|
+import com.zskk.model.Report;
|
|
|
import com.zskk.model.UserWechat;
|
|
|
import com.zskk.model.WechatBind;
|
|
|
import com.zskk.service.ServiceFactory;
|
|
@@ -48,7 +49,7 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
List<Articles> list = new ArrayList<Articles>();
|
|
|
Articles articles1 = new Articles();
|
|
|
articles1.setTitle("【数字影像示例】点击查看本次影像和报告");
|
|
|
- articles1.setDescription("欢迎使用中世康恺PacsOnline!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"我的报告\"中查看本次影像和报告");
|
|
|
+ articles1.setDescription("欢迎使用冠医云-数字影像服务!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"个人中心-我的检查列表\"中查看本次影像和报告");
|
|
|
articles1.setPicurl("http://work.pacsonline.cn/static/img/banner.e8ee043.png");
|
|
|
articles1.setUrl(toUrlString);
|
|
|
list.add(articles1);
|
|
@@ -171,6 +172,7 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
inQrCodeEvent.getFromUserName());
|
|
|
String rid = inQrCodeEvent.getEventKey();
|
|
|
String[] arr = rid.split("_");
|
|
|
+ //DEMO示例
|
|
|
if (arr[2].equals("DEMOCT")) {
|
|
|
if (findUser == null) {
|
|
|
UserService uService = ServiceFactory.getService(UserService.class);
|
|
@@ -190,22 +192,31 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
List<Articles> list = new ArrayList<Articles>();
|
|
|
Articles articles1 = new Articles();
|
|
|
articles1.setTitle("【数字影像示例】点击查看本次影像和报告");
|
|
|
- articles1.setDescription("欢迎使用中世康恺PacsOnline!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"我的报告\"中查看本次影像和报告");
|
|
|
+ articles1.setDescription("欢迎使用冠医云-数字影像服务!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"个人中心-我的检查列表\"中查看本次影像和报告");
|
|
|
articles1.setPicurl("http://work.pacsonline.cn/static/img/banner.e8ee043.png");
|
|
|
articles1.setUrl(toUrlString);
|
|
|
list.add(articles1);
|
|
|
CustomServiceApi.sendNews(inQrCodeEvent.getFromUserName(), list);
|
|
|
return;
|
|
|
}
|
|
|
- CustomServiceApi.sendText(inQrCodeEvent.getFromUserName(), "t");
|
|
|
-
|
|
|
- Exams exams = Exams.dao.findById(arr[2]);
|
|
|
- if (exams == null) {
|
|
|
- return;
|
|
|
+ String toUrlString = "";
|
|
|
+ Exams exams = null;
|
|
|
+ if (arr[1].equals("ReportQR")) {
|
|
|
+ Report reports = Report.dao.findById(arr[2]);
|
|
|
+ exams = Exams.dao.findById(reports.getExamId());
|
|
|
+ toUrlString = String.format(
|
|
|
+ "https://wc4.pacsonline.cn/#/reportInfo/report?report_id=%s&exam_id=%s",
|
|
|
+ arr[2], reports.getExamId());
|
|
|
+ }else {
|
|
|
+ exams = Exams.dao.findById(arr[2]);
|
|
|
+ if (exams == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ toUrlString = String.format(
|
|
|
+ "https://wechatclient3.pacsonline.cn/#/reportInfo/report?openid=%s&exam_id=%s&study_id=%s",
|
|
|
+ inQrCodeEvent.getFromUserName(), exams.getId(), exams.getStudyId());
|
|
|
}
|
|
|
- String toUrlString = String.format(
|
|
|
- "https://wechatclient3.pacsonline.cn/#/reportInfo/report?openid=%s&exam_id=%s&study_id=%s",
|
|
|
- inQrCodeEvent.getFromUserName(), exams.getId(), exams.getStudyId());
|
|
|
+
|
|
|
if (findUser == null) {
|
|
|
UserService uService = ServiceFactory.getService(UserService.class);
|
|
|
UserWechat users = uService.createWxUserByGH(inQrCodeEvent.getFromUserName(),
|
|
@@ -228,7 +239,7 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
List<Articles> list = new ArrayList<Articles>();
|
|
|
Articles articles1 = new Articles();
|
|
|
articles1.setTitle("点击查看本次影像和报告");
|
|
|
- articles1.setDescription("欢迎使用中世康恺PacsOnline!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"我的报告\"中查看本次影像和报告");
|
|
|
+ articles1.setDescription("欢迎使用冠医云-数字影像服务!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"个人中心-我的检查列表\"中查看本次影像和报告");
|
|
|
articles1.setUrl(toUrlString);
|
|
|
articles1.setPicurl("http://work.pacsonline.cn/static/img/banner.e8ee043.png");
|
|
|
list.add(articles1);
|
|
@@ -250,7 +261,7 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
List<Articles> list = new ArrayList<Articles>();
|
|
|
Articles articles1 = new Articles();
|
|
|
articles1.setTitle("点击查看本次影像和报告");
|
|
|
- articles1.setDescription("欢迎使用中世康恺PacsOnline!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"我的报告\"中查看本次影像和报告");
|
|
|
+ articles1.setDescription("欢迎使用冠医云-数字影像服务!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"个人中心-我的检查列表\"中查看本次影像和报告");
|
|
|
articles1.setUrl(toUrlString);
|
|
|
articles1.setPicurl("http://work.pacsonline.cn/static/img/banner.e8ee043.png");
|
|
|
list.add(articles1);
|
|
@@ -261,29 +272,42 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
log.debug("扫码已关注:" + inQrCodeEvent.getFromUserName());
|
|
|
String rid = inQrCodeEvent.getEventKey();
|
|
|
String[] arr = rid.split("_");
|
|
|
-// CustomServiceApi.sendText(inQrCodeEvent.getFromUserName(),
|
|
|
-// rid);
|
|
|
if (arr[1].equals("DEMOCT")) {
|
|
|
CustomServiceApi.sendText(inQrCodeEvent.getFromUserName(),
|
|
|
"【声明】为保证客户数据隐私安全,数字影像示例涉及检查信息、用户信息、医疗机构信息等均已经过数据脱敏处理。\n通过以下途径了解更多或联系我们:\n官方网站:<a href=\"http://www.pacsonline.cn\">点击进入</a>\n咨询热线:010-53675656\n电子邮箱:company@pacsonline.cn\n您即将收到数字影像示例,请点击下方消息查看,谢谢您的使用!");
|
|
|
-
|
|
|
String toUrlString = String.format(
|
|
|
"https://wechatclient3.pacsonline.cn/#/reportInfo/report?openid=%s&exam_id=%s&study_id=%s",
|
|
|
"test", "cnb5089c8jadjdlv", "9427e19e4a5687a811f79eca24e6128d");
|
|
|
-
|
|
|
List<Articles> list = new ArrayList<Articles>();
|
|
|
Articles articles1 = new Articles();
|
|
|
articles1.setTitle("【数字影像示例】点击查看本次影像和报告");
|
|
|
- articles1.setDescription("欢迎使用中世康恺PacsOnline!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"我的报告\"中查看本次影像和报告");
|
|
|
+ articles1.setDescription("欢迎使用冠医云-数字影像服务!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"个人中心-我的检查列表\"中查看本次影像和报告");
|
|
|
articles1.setPicurl("http://work.pacsonline.cn/static/img/banner.e8ee043.png");
|
|
|
articles1.setUrl(toUrlString);
|
|
|
list.add(articles1);
|
|
|
CustomServiceApi.sendNews(inQrCodeEvent.getFromUserName(), list);
|
|
|
renderNull();
|
|
|
return;
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ String toUrlString = "";
|
|
|
+ Exams exams = null;
|
|
|
+ if (arr[0].equals("ReportQR")) {
|
|
|
+ Report reports = Report.dao.findById(arr[1]);
|
|
|
+ exams = Exams.dao.findById(reports.getExamId());
|
|
|
+ toUrlString = String.format(
|
|
|
+ "https://wc4.pacsonline.cn/#/reportInfo/report?report_id=%s&exam_id=%s",
|
|
|
+ arr[1], reports.getExamId());
|
|
|
+ }else {
|
|
|
+ exams = Exams.dao.findById(arr[1]);
|
|
|
+ if (exams == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ toUrlString = String.format(
|
|
|
+ "https://wechatclient3.pacsonline.cn/#/reportInfo/report?openid=%s&exam_id=%s&study_id=%s",
|
|
|
+ inQrCodeEvent.getFromUserName(), exams.getId(), exams.getStudyId());
|
|
|
+ }
|
|
|
+
|
|
|
UserWechat user = UserWechat.dao.findFirst("select * from user_wechat where wx_openid = ?",
|
|
|
inQrCodeEvent.getFromUserName());
|
|
|
|
|
@@ -293,8 +317,6 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
user = uService.createWxUserByGH(inQrCodeEvent.getFromUserName(), inQrCodeEvent.getToUserName());
|
|
|
}
|
|
|
|
|
|
- Exams exams = Exams.dao.findById(arr[1]);
|
|
|
-
|
|
|
WechatBind userBind = WechatBind.dao.findFirst("select * from wechat_bind where user_id=? and exam_id=?",
|
|
|
user.getId(), exams.getId());
|
|
|
|
|
@@ -302,13 +324,10 @@ public class WeixinMsgController extends MsgControllerAdapter {
|
|
|
uService.bindUserReport(user.getId(), exams);
|
|
|
}
|
|
|
|
|
|
- String toUrlString = String.format(
|
|
|
- "https://wechatclient3.pacsonline.cn/#/reportInfo/report?openid=%s&exam_id=%s&study_id=%s",
|
|
|
- inQrCodeEvent.getFromUserName(), exams.getId(), exams.getStudyId());
|
|
|
List<Articles> list = new ArrayList<Articles>();
|
|
|
Articles articles1 = new Articles();
|
|
|
articles1.setTitle("点击查看本次影像和报告");
|
|
|
- articles1.setDescription("欢迎使用中世康恺PacsOnline!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"我的报告\"中查看本次影像和报告");
|
|
|
+ articles1.setDescription("欢迎使用冠医云-数字影像服务!\n点击进入查看详情,您可以分享给家属或医生,日后还可以在\"个人中心-我的检查列表\"中查看本次影像和报告");
|
|
|
articles1.setUrl(toUrlString);
|
|
|
articles1.setPicurl("http://work.pacsonline.cn/static/img/banner.e8ee043.png");
|
|
|
list.add(articles1);
|