diff --git a/src/main/java/com/emr/controller/WebServiceLoad.java b/src/main/java/com/emr/controller/WebServiceLoad.java new file mode 100644 index 0000000..f755d20 --- /dev/null +++ b/src/main/java/com/emr/controller/WebServiceLoad.java @@ -0,0 +1,45 @@ +package com.emr.controller; + +import com.emr.util.PropertiesUtils; +import org.apache.cxf.endpoint.Client; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.PropertySources; +import org.springframework.stereotype.Component; + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import java.io.FileInputStream; +import java.io.InputStream; +import java.net.URL; +import java.util.Properties; + +/** + * @ProjectName:预加载一次webService + * @Description: + * @Param 传输参数 + * @Return + * @Author: 曾文和 + * @CreateDate: 2020/7/7 16:34 + * @UpdateUser: 曾文和 + * @UpdateDate: 2020/7/7 16:34 + * @UpdateRemark: 更新说明 + * @Version: 1.0 + */ +@Component +public class WebServiceLoad implements ServletContextListener { + @Override + public void contextInitialized(ServletContextEvent sce){ + try { + String token = "11"; + String POWER_URLHEAD = PropertiesUtils.getProperty("POWER_JSP"); + //创建连接工厂 + JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance(); + //创建客户端 + Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl"); + //动态调用getInfosByUserId方法 + Object[] objects = client.invoke("getInfosByUserId", token, "emr_record"); + }catch (Exception e){ + e.printStackTrace(); + } + } +} diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index f609e29..74482ad 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -41,7 +41,9 @@ org.springframework.web.context.ContextLoaderListener - + + com.emr.controller.WebServiceLoad + logbackConfigLocation classpath:config/logback.xml diff --git a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js index 2665c7f..22473a4 100644 --- a/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js +++ b/src/main/webapp/static/js/recordManage/commomSearch/commomListqf.js @@ -16,9 +16,9 @@ $(function () { //加载转归情况 loadDiagStatus(); //加载诊断编码和诊断名称字典 - loadDiag(); + //loadDiag(); //加载手术字典 - loadOperate(); + //loadOperate(); //加载inpatientNo //loadInpatientNo(); //权限控制按钮