From 188431723abfd0f7f8bc567532ba28f952b0a995 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Fri, 8 Aug 2025 09:32:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/SystemApiController.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/api/controller/SystemApiController.java b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/api/controller/SystemApiController.java index f7d807d..f709268 100644 --- a/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/api/controller/SystemApiController.java +++ b/nursing-unit-system/nu-system-biz/src/main/java/org/jeecg/modules/api/controller/SystemApiController.java @@ -1129,4 +1129,32 @@ public class SystemApiController { } } } + + /** + * 获取机构对应媒体资源访问地址 + */ + @GetMapping("/getMediaUrlByOrgCode") + public Result getMediaUrlByOrgCode(@RequestParam("orgCode") String orgCode) { + Map result = Maps.newHashMap(); + //查询源数据平台的接口api地址 + { + //各平台api地址都存在管理系统中 管理系统api地址在系统参数配置中 “ope_open_url” + JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url"); + String opeApiAddress = opeOpenUrl.getString("configValue"); + if (opeApiAddress.endsWith("/")) { + opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1); + } + String bizApiAddress = opeApiAddress + "/api/baseInfo/getMediaUrlByOrgCode?orgCode=" + orgCode; + + try { + String res = HttpRequestUtil.doGet(bizApiAddress, HttpRequestUtil.createDefaultHeaders()); + JSONObject jsonResponse = JSON.parseObject(res); + JSONObject result_ = jsonResponse.getJSONObject("result"); + result.put("mediaUrl", result_.getString("mediaUrl")); + return Result.ok(result); + } catch (Exception e) { + return Result.ok(result); + } + } + } }