From eb86ab3d3d7fffb4ffba221d215ccbff8f60c696 Mon Sep 17 00:00:00 2001
From: zengwh <81383286@qq.com>
Date: Tue, 7 Jul 2020 17:21:55 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E5=8A=A0=E8=BD=BDwebService=E8=BF=9E?=
=?UTF-8?q?=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/emr/controller/WebServiceLoad.java | 45 +++++++++++++++++++
src/main/webapp/WEB-INF/web.xml | 4 +-
.../recordManage/commomSearch/commomListqf.js | 4 +-
3 files changed, 50 insertions(+), 3 deletions(-)
create mode 100644 src/main/java/com/emr/controller/WebServiceLoad.java
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();
//权限控制按钮