修改issuelog29,39,41条和打印扫描报表初始化查询不带条件
parent
ee829c89b0
commit
53e542bd99
@ -0,0 +1,40 @@
|
||||
package com.emr.controller;
|
||||
|
||||
import com.emr.util.PropertiesUtils;
|
||||
import org.apache.cxf.endpoint.Client;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* @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 {
|
||||
@PostConstruct
|
||||
public void contextInitialized() {
|
||||
new Thread(() -> {
|
||||
String token = "11";
|
||||
String POWER_URLHEAD = PropertiesUtils.getProperty("POWER_JSP");
|
||||
//创建连接工厂
|
||||
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
|
||||
//创建客户端
|
||||
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
|
||||
try {
|
||||
//动态调用getInfosByUserId方法
|
||||
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.emr.util;
|
||||
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Properties;
|
||||
|
||||
public class PropertiesUtils {
|
||||
private static String fileName = "\\config\\jdbc.properties";
|
||||
private static Properties props;
|
||||
|
||||
synchronized static private void loadProps(){
|
||||
if (props==null) {
|
||||
props = new Properties();
|
||||
ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||
try {
|
||||
props.load(loader.getResourceAsStream(fileName));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getProperty(String key){
|
||||
if(null == props) {
|
||||
loadProps();
|
||||
}
|
||||
return props.getProperty(key);
|
||||
}
|
||||
|
||||
public static String getProperty(String key, String defaultValue) {
|
||||
if (null == props) {
|
||||
loadProps();
|
||||
}
|
||||
return props.getProperty(key, defaultValue);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue