master
ALW 3 years ago
parent 46bf79d480
commit 914c1fb806

@ -24,7 +24,7 @@
<!--<spring.version>3.2.2.RELEASE</spring.version>-->
<shiro.version>1.2.5</shiro.version>
<jstl.version>1.2</jstl.version>
<spring.version>5.0.2.RELEASE</spring.version>
<spring.version>5.0.3.RELEASE</spring.version>
<mybatis.version>3.2.8</mybatis.version>
<mybatis.spring.version>1.2.2</mybatis.spring.version>
<slf4j.version>1.6.4</slf4j.version>

@ -11,10 +11,7 @@ import com.emr.service.ipml.*;
import com.emr.util.DateUtil;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import com.emr.vo.ArchiveFlowInfoVo;
import com.emr.vo.ArchiveOtherExtVo;
import com.emr.vo.EsbPublicVo;
import com.emr.vo.SecureloginVo;
import com.emr.vo.*;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
@ -897,7 +894,7 @@ public class FontController {
}
/*
/* *//*
* <Request>
<Header>
<SourceSystem>HIS</SourceSystem>
@ -910,8 +907,8 @@ public class FontController {
</Body>
</Request>
* */
public static String createXml(String patientId1){
String strXML =null;
public static String createXml(String patientId1) {
String strXML = null;
try {
// Document document = DocumentHelper.createDocument();
// org.dom4j.Element request = document.addElement("Request");
@ -950,8 +947,8 @@ public class FontController {
createTime.addText(df.format(new Date()));
methodName.addText("Get360PatientId");
patientIdEle.addText(patientId1);
strXML = document.asXML();
System.out.println("strXML:::::"+strXML);
strXML = document.asXML();
System.out.println("strXML:::::" + strXML);
} catch (Exception e) {
System.out.println("生成rssNew.xml失败");
}
@ -1016,4 +1013,57 @@ public class FontController {
}
}
/**
*
* @return
* @throws
*/
@RequestMapping(value="getQRcode")
@ResponseBody
public void getQRcode(QRcode qRcode, HttpServletRequest request) {
// 获得Http客户端
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// 创建Post请求
HttpPost httpPost = new HttpPost("https://zh.fstth.cn");
qRcode.setType(3);
qRcode.setProjectUid("cloudkey-fstth");
qRcode.setApplicationId("fstth-wzh");
//json格式转换
String jsonString = JSON.toJSONString(qRcode);
StringEntity entity = new StringEntity(jsonString, "UTF-8");
// post请求是将参数放在请求体里面传过去的;这里将entity放入post请求体中
httpPost.setEntity(entity);
httpPost.setHeader("Content-Type", "application/json;charset=utf8");
// 响应模型
CloseableHttpResponse response = null;
try {
// 由客户端执行(发送)Post请求
response = httpClient.execute(httpPost);
// 从响应模型中获取响应实体
HttpEntity responseEntity = response.getEntity();
System.out.println("responseEntity::::" + responseEntity);
System.out.println("响应状态为:" + response.getStatusLine());
if (responseEntity != null) {
System.out.println("响应内容长度为:" + responseEntity.getContentLength());
System.out.println("响应内容为:" + EntityUtils.toString(responseEntity));
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
// 释放资源
if (httpClient != null) {
httpClient.close();
}
if (response != null) {
response.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

@ -0,0 +1,40 @@
package com.emr.vo;
public class QRcode {
private int loginTypeBitValue;
private int type;
private String projectUid;
private String applicationId;
public int getLoginTypeBitValue() {
return loginTypeBitValue;
}
public void setLoginTypeBitValue(int loginTypeBitValue) {
this.loginTypeBitValue = loginTypeBitValue;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getProjectUid() {
return projectUid;
}
public void setProjectUid(String projectUid) {
this.projectUid = projectUid;
}
public String getApplicationId() {
return applicationId;
}
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
}
Loading…
Cancel
Save