佛山三院修改

master
ALW 3 years ago
parent f196f3e6d8
commit fa670e2f2f

@ -52,7 +52,6 @@ public class ArchiveOtherExtController {
@RequestMapping("getArchiveExtInfoList")
@ResponseBody
public List<ArchiveOtherExtVo> getArchiveExtInfoList(ArchiveOtherExtVo archiveOtherExtVo, HttpServletRequest request){
System.out.println("1"+archiveOtherExtVo.getJzh());
try {
List<ArchiveOtherExtVo> list = archiveOtherExtService.getArchiveExtInfo(request,archiveOtherExtVo);
return list;
@ -94,7 +93,6 @@ public class ArchiveOtherExtController {
@RequestMapping("submitUpdate1")
@ResponseBody
public Msg submitUpdate1(String ids){
System.out.println("ids+++++"+ids);
archiveOtherExtService.updateSubmit1(ids);
return Msg.success();
}

@ -58,10 +58,10 @@ import java.util.*;
public class FontController {
@Value("${pdfWater}")
private String pdfWater;
@Value("${RoomDetailsUrl}")
private String RoomDetailsUrl;
@Value("${RoomDetailsUrlName}")
private String RoomDetailsUrlName;
// @Value("${RoomDetailsUrl}")
// private String RoomDetailsUrl;
// @Value("${RoomDetailsUrlName}")
// private String RoomDetailsUrlName;
@Value("${allAddortIds}")
private String allAddortIds;
@Value("${POWER_URLHEAD}")
@ -808,262 +808,262 @@ public class FontController {
return map;
}
/**
* patientid
*
* @return
* @throws Exception
*/
@RequestMapping(value = "getRoomDetails")
@ResponseBody
public String selRoomDetails(EsbPublicVo esbPublicVo,SecureloginVo secureloginVo, HttpServletRequest request) throws Exception {
//创建连接工厂
String patientId1 = esbPublicVo.getPatientId();
System.out.println("patientId1:::::"+patientId1);
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
//创建客户端 wsUrl为webService接口地址
Client client = dcf.createClient(RoomDetailsUrl);
String xmlStr = createXml(patientId1);
Object[] objects = client.invoke(RoomDetailsUrlName, xmlStr);
//销毁连接
client.destroy();
//接收结果
String result = objects[0].toString();
System.out.println("result::::::"+result);
String patientId=null;
if (StringUtils.isNotBlank(result)) {
Map<String, String> map = new HashMap<>();
map = parseXml2Map(result, map);
//获取序列号
patientId = map.get("Body.ResultContent.patientid");
}
// 获得Http客户端
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// 创建Post请求
HttpPost httpPost = new HttpPost("http://10.100.12.12:37727/api/account/securelogin");
//json格式转换
JSONObject jsonParam = new JSONObject();
jsonParam.put("idp","NSDP");
jsonParam.put("secret", "Secret");
jsonParam.put("userName","002030");
jsonParam.put("password", "123456");
jsonParam.put("scopes", "openid profile cr-api roles");
jsonParam.put("key", patientId1);
System.out.println(jsonParam);
StringEntity entity = new StringEntity(jsonParam.toString(), "UTF-8");
httpPost.setEntity(entity);
httpPost.setHeader("Content-Type","application/json");
// 响应模型
CloseableHttpResponse response = null;
HttpEntity responseEntity=null;
String token="";
String s ="";
try {
// 由客户端执行(发送)Post请求
response = httpClient.execute(httpPost);
// 从响应模型中获取响应实体
responseEntity=response.getEntity();
System.out.println("响应状态为:" + response.getStatusLine());
if (responseEntity != null) {
Map<String,Object> mapType = JSON.parseObject(EntityUtils.toString(responseEntity),Map.class);
token = mapType.get("token").toString();
System.out.println("token:::"+token);
s = StringUtils.substringAfter(token, " ");
System.out.println("s:::"+s);
}
} 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();
}
}
String pdfUrl="http://10.100.12.3:33600/view/subjects/"+patientId+"/records/"+secureloginVo.getVisitId()+"?token="+s+"&token_type=Bearer";
return pdfUrl;
}
/* *//*
* <Request>
<Header>
<SourceSystem>HIS</SourceSystem>
<MessageId>D561C89A-6320-4b27-83DE-A6169B1D0761</MessageId>
<CreateTime>2021-07-18 11:12:41</CreateTime>
<MethodName>Get360PatientId</MethodName>
</Header>
<Body>
<PatientId>0000623132</PatientId>
</Body>
</Request>
* */
public static String createXml(String patientId1) {
String strXML = null;
try {
// /**
// * 调用第三方接口获取唯一标识patientid
// *
// * @return
// * @throws Exception
// */
// @RequestMapping(value = "getRoomDetails")
// @ResponseBody
// public String selRoomDetails(EsbPublicVo esbPublicVo,SecureloginVo secureloginVo, HttpServletRequest request) throws Exception {
// //创建连接工厂
// String patientId1 = esbPublicVo.getPatientId();
// System.out.println("patientId1:::::"+patientId1);
// JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
// //创建客户端 wsUrl为webService接口地址
// Client client = dcf.createClient(RoomDetailsUrl);
// String xmlStr = createXml(patientId1);
// Object[] objects = client.invoke(RoomDetailsUrlName, xmlStr);
// //销毁连接
// client.destroy();
// //接收结果
// String result = objects[0].toString();
// System.out.println("result::::::"+result);
// String patientId=null;
// if (StringUtils.isNotBlank(result)) {
// Map<String, String> map = new HashMap<>();
// map = parseXml2Map(result, map);
// //获取序列号
// patientId = map.get("Body.ResultContent.patientid");
//
// }
// // 获得Http客户端
// CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// // 创建Post请求
// HttpPost httpPost = new HttpPost("http://10.100.12.12:37727/api/account/securelogin");
// //json格式转换
// JSONObject jsonParam = new JSONObject();
// jsonParam.put("idp","NSDP");
// jsonParam.put("secret", "Secret");
// jsonParam.put("userName","002030");
// jsonParam.put("password", "123456");
// jsonParam.put("scopes", "openid profile cr-api roles");
// jsonParam.put("key", patientId1);
// System.out.println(jsonParam);
// StringEntity entity = new StringEntity(jsonParam.toString(), "UTF-8");
// httpPost.setEntity(entity);
// httpPost.setHeader("Content-Type","application/json");
// // 响应模型
// CloseableHttpResponse response = null;
// HttpEntity responseEntity=null;
// String token="";
// String s ="";
// try {
// // 由客户端执行(发送)Post请求
// response = httpClient.execute(httpPost);
// // 从响应模型中获取响应实体
// responseEntity=response.getEntity();
// System.out.println("响应状态为:" + response.getStatusLine());
// if (responseEntity != null) {
// Map<String,Object> mapType = JSON.parseObject(EntityUtils.toString(responseEntity),Map.class);
// token = mapType.get("token").toString();
// System.out.println("token:::"+token);
// s = StringUtils.substringAfter(token, " ");
// System.out.println("s:::"+s);
// }
// } 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();
// }
// }
// String pdfUrl="http://10.100.12.3:33600/view/subjects/"+patientId+"/records/"+secureloginVo.getVisitId()+"?token="+s+"&token_type=Bearer";
// return pdfUrl;
// }
//
//
// /* *//*
// * <Request>
// <Header>
// <SourceSystem>HIS</SourceSystem>
// <MessageId>D561C89A-6320-4b27-83DE-A6169B1D0761</MessageId>
// <CreateTime>2021-07-18 11:12:41</CreateTime>
// <MethodName>Get360PatientId</MethodName>
// </Header>
// <Body>
// <PatientId>0000623132</PatientId>
// </Body>
//</Request>
// * */
// public static String createXml(String patientId1) {
// String strXML = null;
// try {
//// Document document = DocumentHelper.createDocument();
//// org.dom4j.Element request = document.addElement("Request");
//// org.dom4j.Element header = request.addElement("Header");
//// org.dom4j.Element sourceSystem = header.addElement("SourceSystem");
//// org.dom4j.Element messageId = header.addElement("MessageId");
//// org.dom4j.Element createTime = header.addElement("CreateTime");
//// org.dom4j.Element methodName = header.addElement("MethodName");
//// sourceSystem.setText("record");
//// messageId.setText(UUID.randomUUID().toString().toUpperCase());
//// createTime.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
//// methodName.setText("Get360PatientId");
//// org.dom4j.Element body = request.addElement("Body");
//// Element patientIdEle = body.addElement("PatientId");
//// patientIdEle.setText(patientId);
//// return document.toString();
// Document document = DocumentHelper.createDocument();
// org.dom4j.Element request = document.addElement("Request");
// org.dom4j.Element header = request.addElement("Header");
// org.dom4j.Element sourceSystem = header.addElement("SourceSystem");
// org.dom4j.Element messageId = header.addElement("MessageId");
// org.dom4j.Element createTime = header.addElement("CreateTime");
// org.dom4j.Element methodName = header.addElement("MethodName");
// sourceSystem.setText("record");
// messageId.setText(UUID.randomUUID().toString().toUpperCase());
// createTime.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
// methodName.setText("Get360PatientId");
// org.dom4j.Element body = request.addElement("Body");
// Element patientIdEle = body.addElement("PatientId");
// patientIdEle.setText(patientId);
// return document.toString();
Document document = DocumentHelper.createDocument();
//创建根节点
Element request = document.addElement("Request");
//添加子节点
Element header = request.addElement("Header");
//给Header标签添加子节点
Element sourceSystem = header.addElement("SourceSystem");
Element messageId = header.addElement("MessageId");
Element createTime = header.addElement("CreateTime");
Element methodName = header.addElement("MethodName");
//给Request标签添加子节点
Element body = request.addElement("Body");
//给Body标签添加子节点
Element patientIdEle = body.addElement("PatientId");
//给xml赋值
sourceSystem.addText("CaseSys");
UUID guid = UUID.randomUUID();
messageId.addText(guid.toString());
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
createTime.addText(df.format(new Date()));
methodName.addText("Get360PatientId");
patientIdEle.addText(patientId1);
strXML = document.asXML();
System.out.println("strXML:::::" + strXML);
} catch (Exception e) {
System.out.println("生成rssNew.xml失败");
}
return strXML;
}
/**
* token
* @return
* @throws
*/
@RequestMapping(value="getToken")
@ResponseBody
public void selToken(SecureloginVo secureloginVo, HttpServletRequest request){
System.out.println(secureloginVo.getKey());
// 获得Http客户端
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// 创建Post请求
HttpPost httpPost = new HttpPost("http://10.100.12.12:37727/api/account/securelogin");
secureloginVo.setIDP("NSDP");
secureloginVo.setSecret("Secret");
// Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
// secureloginVo.setUserName(user.getUserName());
secureloginVo.setUserName("002030");
secureloginVo.setPassword("123456");
secureloginVo.setScopes("openid profile cr-api roles");
//json格式转换
String jsonString = JSON.toJSONString(secureloginVo);
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();
}
}
}
/**
*
* @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();
}
}
}
// //创建根节点
// Element request = document.addElement("Request");
// //添加子节点
// Element header = request.addElement("Header");
// //给Header标签添加子节点
// Element sourceSystem = header.addElement("SourceSystem");
// Element messageId = header.addElement("MessageId");
// Element createTime = header.addElement("CreateTime");
// Element methodName = header.addElement("MethodName");
// //给Request标签添加子节点
// Element body = request.addElement("Body");
// //给Body标签添加子节点
// Element patientIdEle = body.addElement("PatientId");
// //给xml赋值
// sourceSystem.addText("CaseSys");
// UUID guid = UUID.randomUUID();
// messageId.addText(guid.toString());
// SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// createTime.addText(df.format(new Date()));
// methodName.addText("Get360PatientId");
// patientIdEle.addText(patientId1);
// strXML = document.asXML();
// System.out.println("strXML:::::" + strXML);
// } catch (Exception e) {
// System.out.println("生成rssNew.xml失败");
// }
// return strXML;
// }
// /**
// * 获取token
// * @return
// * @throws
// */
// @RequestMapping(value="getToken")
// @ResponseBody
// public void selToken(SecureloginVo secureloginVo, HttpServletRequest request){
// System.out.println(secureloginVo.getKey());
// // 获得Http客户端
// CloseableHttpClient httpClient = HttpClientBuilder.create().build();
// // 创建Post请求
// HttpPost httpPost = new HttpPost("http://10.100.12.12:37727/api/account/securelogin");
// secureloginVo.setIDP("NSDP");
// secureloginVo.setSecret("Secret");
//// Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
//// secureloginVo.setUserName(user.getUserName());
// secureloginVo.setUserName("002030");
// secureloginVo.setPassword("123456");
// secureloginVo.setScopes("openid profile cr-api roles");
//
// //json格式转换
// String jsonString = JSON.toJSONString(secureloginVo);
// 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();
// }
// }
// }
//
// /**
// * 获取二维码
// * @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();
// }
// }
// }
}

@ -2,6 +2,7 @@ package com.emr.dao;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExt;
import com.emr.entity.ArchiveOtherExtSubmittime;
import com.emr.vo.ArchiveOtherExtVo;
import org.apache.ibatis.annotations.Param;
@ -26,6 +27,7 @@ public interface ArchiveOtherExtMapper {
int updateSubmit(@Param("ids")String ids);
/**
* ids
* @param ids

@ -150,6 +150,7 @@ public class ArchiveOtherExtService {
}
public void updateSubmit1(String ids){
//定义需要新增的集合
archiveOtherExtMapper.updateSubmit(ids);
}

@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.emr.vo.ArchiveOtherExtVo" >
<id column="ID" property="id" jdbcType="BIGINT" />
<result column="SycTime" property="syctime" jdbcType="TIMESTAMP" />
<result column="createTime" property="createTime" jdbcType="NVARCHAR"></result>
<result column="SycObj" property="sycobj" jdbcType="NVARCHAR" />
<result column="otherID" property="otherid" jdbcType="BIGINT" />
<result column="sysFlag" property="sysflag" jdbcType="INTEGER" />
@ -559,7 +560,7 @@
statusFlagSort
from
archive_other_ext
LEFT JOIN archive_other_ext_submitTime ON archive_other_ext_submitTime.other_ext_id=archive_other_ext.MID
LEFT JOIN archive_other_ext_submitTime ON archive_other_ext_submitTime.other_ext_id=archive_other_ext.id
LEFT JOIN archive_detail ON archive_other_ext.DID = archive_detail.id
LEFT JOIN zd_assort ON archive_detail.AssortID = zd_assort.assort_id
<where>
@ -580,7 +581,7 @@
<!--批量更新statusFlag = 0-->
<update id="updateSubmit">
update archive_other_ext
set statusFlag = 2
set statusFlag = 2,sysUpdateTime=GETDATE()
<where>
<if test="ids != null and ids != ''">
ID in (${ids})

@ -843,7 +843,6 @@
</div>
</div>
<div class="col-sm-12" style="text-align: center;color: red">
同步更新提交后,最近提交时间为红色。同步采集完成后最近提交时间为绿色。
</div>
<!--数据表格-->
<div class="col-sm-12" style="margin-top: 5px">

@ -1234,23 +1234,10 @@ function initTable5(data,sidePagination) {
},
{
title: '最近更新',
field: 'createTime',
field: 'sysupdatetimeStr',
align: 'center',
valign: 'middle',
sortable: true,
formatter: function (value, row, index) {
if(value != null){
var color = '';
if(row.sysflag == 1){
//护理
color = selectTimeColor(value,row.nursingEndTime);
}else{
//非护理
color = selectTimeColor(row.tempTime,row.etimeStr);
}
return '<span style="color: ' + color + '">' + value + '</span>';
}
}
},
{
title: '同步时间',
@ -1279,12 +1266,12 @@ function initTable5(data,sidePagination) {
}
}
},
{
title: '分段',
field: 'assortName',
align: 'center',
valign: 'middle'
},
// {
// title: '分段',
// field: 'assortName',
// align: 'center',
// valign: 'middle'
// },
{
title: '备注',
field: 'presult',
@ -1466,7 +1453,7 @@ function submitUpdate(ids,sysFlagStr) {
consumeTImeSum +=consumeTime
}
toastr.success("同步更新已发送,预计"+consumeTImeSum+"分钟请耐心等待!");
// toastr.success("同步更新已发送,预计"+consumeTImeSum+"分钟请耐心等待!");
//刷新列表
initTable5('','server');
setTimeout(function() {

Loading…
Cancel
Save