diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java index 59e854c..4ab7120 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java @@ -181,7 +181,7 @@ public class SyncController { - //UDI管理系统同步数据中转至阿里健康api平台 + //UDI管理系统转至阿里健康api平台 @RequestMapping("/syncToAliapi/**") public Object syncToAliapi(HttpServletRequest request, HttpServletResponse httpServletResponse) { String uri = uriUtils.parseUri(request.getRequestURL().toString()); @@ -203,6 +203,24 @@ public class SyncController { } + //UDI管理系统转至国家库平台 + @RequestMapping("/syncToUdiDL/**") + public Object syncToUdiDL(HttpServletRequest request, HttpServletResponse httpServletResponse) { + String uri = uriUtils.parseUri(request.getRequestURL().toString()); + String isTopService = systemParamConfigService.selectValueByParamKey("is_udi_dl_service"); + if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) { + uri = uri.replace("syncToUdiDL/", ""); + uri = uri.replace("syncToUdiDL", ""); + } + String upperServerHost = systemParamConfigService.selectValueByParamKey("udi_dl_server_ip"); + if (StrUtil.isNotEmpty(upperServerHost)) { + uri = upperServerHost + "/" + uri; + } + JSONObject jsonObject = redirectNolog(request, uri); + return jsonObject; + } + + //UDI管理系统同步数据中转 @RequestMapping("/directToSpms/**") diff --git a/api-admin/src/main/resources/schemas/schema_v2.1.sql b/api-admin/src/main/resources/schemas/schema_v2.1.sql index f7ee5c5..16ec164 100644 --- a/api-admin/src/main/resources/schemas/schema_v2.1.sql +++ b/api-admin/src/main/resources/schemas/schema_v2.1.sql @@ -5,3 +5,13 @@ CALL Pro_Temp_ColumnWork('basic_export_status', 'receiveStatus', 'varchar(255) ' INSERT ignore INTO `system_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`) VALUES (516, NULL, '是否顶级中继服务', 'is_top_service', '1', 1, 0, '0:否,1:是'); + + +INSERT ignore INTO `system_param_config` (`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`) +VALUES (666, 0, '是否启用阿里健康平台', 'is_top_aliService', '1', 1, 0, '0:否,1:是'); +INSERT ignore INTO `system_param_config` (`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`) +VALUES (668, 0, '阿里健康平台服务地址', 'aliApi_server_ip', 'http://gw.api.taobao.com/router/rest', 1, 0, ''); +INSERT ignore INTO `system_param_config` (`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`) +VALUES (669, 0, '是否启用国家库平台', 'is_udi_dl_service', '1', 1, 0, '0:否,1:是'); +INSERT ignore INTO `system_param_config` (`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`) +VALUES (670, 0, '国家库平台服务地址', 'udi_dl_server_ip', 'https://www.udims.com/UDI_DL_Server_test', 1, 0, '');