|
@@ -188,51 +188,52 @@ public class WeixinApiController extends ApiController {
|
|
// Report reports = Report.dao.findById(reportId);
|
|
// Report reports = Report.dao.findById(reportId);
|
|
// Exams exams = Exams.dao.findById(reports.getExamId());
|
|
// Exams exams = Exams.dao.findById(reports.getExamId());
|
|
// Institution institution = Institution.dao.findById(exams.getInstitutionId());
|
|
// Institution institution = Institution.dao.findById(exams.getInstitutionId());
|
|
- String iname="中世康恺电子胶片平台";
|
|
|
|
- String appId;
|
|
|
|
- switch (iname) {
|
|
|
|
- case "中世康恺电子胶片平台":
|
|
|
|
- appId = PropKit.get("appId_zskk");
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case "黑龙江省电子胶片平台":
|
|
|
|
- appId = PropKit.get("appId_hlj");
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case "辽宁省电子胶片平台":
|
|
|
|
- appId = PropKit.get("appId_ln");
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case "河南省电子胶片平台":
|
|
|
|
- appId = PropKit.get("appId_hn");
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- default:
|
|
|
|
- appId = PropKit.get("appId_zskk");
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
|
|
+// String iname="中世康恺电子胶片平台";
|
|
|
|
+// String appId;
|
|
|
|
+// switch (iname) {
|
|
|
|
+// case "中世康恺电子胶片平台":
|
|
|
|
+// appId = PropKit.get("appId_zskk");
|
|
|
|
+// break;
|
|
|
|
+//
|
|
|
|
+// case "黑龙江省电子胶片平台":
|
|
|
|
+// appId = PropKit.get("appId_hlj");
|
|
|
|
+// break;
|
|
|
|
+//
|
|
|
|
+// case "辽宁省电子胶片平台":
|
|
|
|
+// appId = PropKit.get("appId_ln");
|
|
|
|
+// break;
|
|
|
|
+//
|
|
|
|
+// case "河南省电子胶片平台":
|
|
|
|
+// appId = PropKit.get("appId_hn");
|
|
|
|
+// break;
|
|
|
|
+//
|
|
|
|
+// default:
|
|
|
|
+// appId = PropKit.get("appId_zskk");
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
// redirect("http://wechat.pacsonline.cn/wx_patient/api/getQrcode?appId=" + appId + "&reportId=" + reportId);
|
|
// redirect("http://wechat.pacsonline.cn/wx_patient/api/getQrcode?appId=" + appId + "&reportId=" + reportId);
|
|
// ApiConfigKit.setThreadLocalAppId(appId);
|
|
// ApiConfigKit.setThreadLocalAppId(appId);
|
|
String urlString = "";
|
|
String urlString = "";
|
|
Report reports = Report.dao.findById(reportId);
|
|
Report reports = Report.dao.findById(reportId);
|
|
if (reportId == null || reports == null) {
|
|
if (reportId == null || reports == null) {
|
|
// renderNull();
|
|
// renderNull();
|
|
- urlString=null;
|
|
|
|
- renderNull();
|
|
|
|
|
|
+// urlString=null;
|
|
|
|
+ renderText("error");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
// if (reports.getQrCode() == null || reports.getQrCode().isEmpty()) {
|
|
// if (reports.getQrCode() == null || reports.getQrCode().isEmpty()) {
|
|
String str = "{\"expire_seconds\": 2592000, \"action_name\": \"QR_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"ReportQR_"
|
|
String str = "{\"expire_seconds\": 2592000, \"action_name\": \"QR_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"ReportQR_"
|
|
+ reportId + "\"}}}";
|
|
+ reportId + "\"}}}";
|
|
ApiResult apiResult = QrcodeApi.create(str);
|
|
ApiResult apiResult = QrcodeApi.create(str);
|
|
- String url = apiResult.getStr("url");
|
|
|
|
- urlString = url;
|
|
|
|
- reports.setQrCode(url);
|
|
|
|
- reports.update();
|
|
|
|
- if (urlString==null) {
|
|
|
|
- renderNull();
|
|
|
|
- }
|
|
|
|
- renderText(urlString);
|
|
|
|
|
|
+ renderJson(apiResult);
|
|
|
|
+// String url = apiResult.getStr("url");
|
|
|
|
+// urlString = url;
|
|
|
|
+// reports.setQrCode(url);
|
|
|
|
+// reports.update();
|
|
|
|
+// if (urlString==null) {
|
|
|
|
+// renderNull();
|
|
|
|
+// }
|
|
|
|
+// renderText(urlString);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|