|
|
@@ -82,9 +82,17 @@ public class EmrControlRuleSever {
|
|
|
String date = DateUtil.formatDate(param.getApplicationTime(), df);
|
|
|
|
|
|
String description = StrFormatter.format("<div class=\"gray\">{}</div> <div class=\"normal\">理由:{}</div><div class=\"highlight\">解锁:【{}】</div>", date, param.getRequestRemarks(), param.getUnlockJson());
|
|
|
- String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwf0b23c8b36012b34&redirect_uri=" + other.getMobileAddress() + "/login?page=unlockemr" + "&response_type=code&scope=snsapi_privateinfo&state=STATE&agentid=1000051#wechat_redirect";
|
|
|
+ JSONObject js = getMessageJson(data, description);
|
|
|
|
|
|
- JSONObject js = new JSONObject() {{
|
|
|
+ mobileService.post("/wecom/sendMsg")
|
|
|
+ .addBody(js)
|
|
|
+ .execute();
|
|
|
+ }
|
|
|
+
|
|
|
+ private @NotNull JSONObject getMessageJson(String data, String description) {
|
|
|
+ String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwf0b23c8b36012b34&redirect_uri=" + other.getMobileAddress() + "/login?page=unlockemr" + "&response_type=code&scope=snsapi_privateinfo&state=STATE&agentid=" + other.getMobileAgentid() + "#wechat_redirect";
|
|
|
+
|
|
|
+ return new JSONObject() {{
|
|
|
put("touser", data);
|
|
|
put("msgtype", "textcard");
|
|
|
put("enable_id_trans", 0);
|
|
|
@@ -97,15 +105,11 @@ public class EmrControlRuleSever {
|
|
|
put("url", url);
|
|
|
}});
|
|
|
}};
|
|
|
- dao.getYiWuBuUser();
|
|
|
- mobileService.post("/wecom/sendMsg")
|
|
|
- .addBody(js)
|
|
|
- .execute();
|
|
|
}
|
|
|
|
|
|
public ResultVo<IPage<EmrLimitUnlock>> getApplicationData(SelectUnlockParam param) {
|
|
|
if (publicServer.noNeedRule(38)) {
|
|
|
- return ResultVoUtil.success(new Page<>(1, 1));
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NO_PERMISSION_TO_VIEW);
|
|
|
}
|
|
|
IPage<EmrLimitUnlock> iPage = new Page<>(param.getCurrentPage(), param.getPageSize(), param.getTotal() == 0);
|
|
|
QueryWrapper<EmrLimitUnlock> qw = getEmrLimitUnlockQueryWrapper(param);
|
|
|
@@ -157,7 +161,7 @@ public class EmrControlRuleSever {
|
|
|
|
|
|
public ResultVo<String> reviewMedicalRecordsToUnlock(EmrLimitUnlock param) {
|
|
|
if (publicServer.noNeedRule(38)) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "您没有审核权限。");
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.UNAUTHORIZED_OPERATION);
|
|
|
}
|
|
|
EmrLimitUnlock emrLimitUnlock = dao.selectUnlockById(param.getId());
|
|
|
if (emrLimitUnlock.getState().equals(3)) {
|