归档不现实签章内容

master
linjj 1 year ago
parent fdc2052965
commit 69452f4568

@ -38,7 +38,7 @@ public class TestController {
long start = System.currentTimeMillis();
caSignService.caSignByMasterId(masterId);
long end = System.currentTimeMillis();
System.out.println("执行后:" + (end - start));
// System.out.println("执行后:" + (end - start));
return "完成";
}
@ -69,7 +69,7 @@ public class TestController {
File[] files = file.listFiles();
for(File file1 : files){
String absolutePath = file1.getAbsolutePath();
System.out.println(absolutePath);
// System.out.println(absolutePath);
}
}
}

@ -158,7 +158,7 @@ public class beHospitaledController {
String result2="";
String result3="";
String MID = emrFaultDetail.getArchiveDetailId();
System.out.println("病案号"+MID);
// System.out.println("病案号"+MID);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<ArchiveOtherExt> archiveOtherExts = archiveOtherExtService.selectExtTime(MID);
if (!CollectionUtils.isEmpty(archiveOtherExts)) {

@ -930,7 +930,7 @@ public class inHospitalController {
fw.close();
file.delete();
}
System.out.println("文件已经被成功删除");
// System.out.println("文件已经被成功删除");
detail.setPdfPath("");
}
}

@ -1,35 +1,15 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 14:39
* Description:
*/
package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.emr.annotation.OptionalLog;
import com.emr.dto.PushStorageDto;
import com.emr.entity.*;
import com.emr.service.*;
import com.emr.util.Logger;
import com.emr.util.ThreadExcelUtils;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpRequest;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
@ -39,28 +19,23 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import static com.emr.controller.signListController.sendGet;
import static com.emr.util.HttpClientTool.doPost;
import static com.emr.util.HttpClientUtils.doPostJson;
import static com.emr.util.HttpClientUtils.httpPost;
@PropertySource(value = "classpath:config/jdbc.properties", encoding = "UTF-8")
@Controller
@RequestMapping("/storage")
public class storageController {
@Autowired
private Emr_Fault_DetailService emrFaultDetailService;
private static Logger logger = new Logger();
@Autowired
private Emr_DictionaryService emrDictionaryService;
@ -77,6 +52,9 @@ public class storageController {
@Value("${MedicalRecordSealingUrl}")
private String MedicalRecordUrl;
@Value("${MedicalRecordSealingName}")
private String MedicalRecordSealingName;
@ResponseBody
@ -183,7 +161,7 @@ public class storageController {
pushStorageDto.setPATIENT_NAME(emrFaultDetail.getName());
pushStorageDto.setOPERATOR(handleName);
pushStorageDto.setOPERATOR_ID(username);
pushStorageDto.setSEQUESTRATION_RESION(nowTime);
pushStorageDto.setOperationTime(nowTime);
pushStorageDto.setSEQUESTRATION_RESION(emrFaultDetail.getRecallReason());
pushStorage(pushStorageDto);
} else if (archiveMaster.getArchivestate().equals("已归档")) {// if (archiveMaster.getArchivestate().equals("已归档"))
@ -196,14 +174,14 @@ public class storageController {
archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason());
bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing);
//向电子病历发送取消封存消息
pushStorageDto.setPATIENT_STATUS(2);
pushStorageDto.setPATIENT_STATUS(0);
pushStorageDto.setINP_NO(emrFaultDetail.getInpNo());
pushStorageDto.setPATIENT_ID(emrFaultDetail.getPatientId());
pushStorageDto.setVISIT_ID(Integer.parseInt(emrFaultDetail.getVisitId()));
pushStorageDto.setPATIENT_NAME(emrFaultDetail.getName());
pushStorageDto.setOPERATOR(handleName);
pushStorageDto.setOPERATOR_ID(username);
pushStorageDto.setSEQUESTRATION_RESION(nowTime);
pushStorageDto.setOperationTime(nowTime);
pushStorageDto.setSEQUESTRATION_RESION(emrFaultDetail.getRecallReason());
pushStorage(pushStorageDto);
}
@ -232,29 +210,35 @@ public class storageController {
//向电子病历推送封存消息
private void pushStorage(PushStorageDto pushStorageDto) {
try {
logger.log("开始封存:"+1);
//组织xml参数
String xmlContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<REQUEST>" +
"<PATIENT_STATUS>" + pushStorageDto.getPATIENT_STATUS() + "</PATIENT_STATUS>" +
"<INP_NO>" + pushStorageDto.getINP_NO() + "</INP_NO>" +
"<PATIENT_ID>" + pushStorageDto.getPATIENT_ID() + "</PATIENT_ID>" +
"< VISIT_ID >" + pushStorageDto.getVISIT_ID() + " </VISIT_ID >"+
"<PATIENT_NAME>" + pushStorageDto.getPATIENT_NAME() + "</PATIENT_NAME>"+
"<OPERATOR>" + pushStorageDto.getOPERATOR() + "</OPERATOR>"+
"<OPERATOR_ID>" + pushStorageDto.getOPERATOR_ID() + "</OPERATOR_ID>"+
"<OperationTime>" + pushStorageDto.getOperationTime() + "</OperationTime>"+
"<SEQUESTRATION_RESION>" + pushStorageDto.getSEQUESTRATION_RESION() + "</SEQUESTRATION_RESION>"+
String xmlContent =
// "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<REQUEST>"+
"<PATIENT_STATUS>"+pushStorageDto.getPATIENT_STATUS()+"</PATIENT_STATUS>" +
"<INP_NO>"+pushStorageDto.getINP_NO()+"</INP_NO>" +
"<PATIENT_ID>"+pushStorageDto.getPATIENT_ID()+"</PATIENT_ID>" +
"<VISIT_ID>"+pushStorageDto.getVISIT_ID()+"</VISIT_ID>"+
"<PATIENT_NAME>"+pushStorageDto.getPATIENT_NAME()+"</PATIENT_NAME>"+
"<OPERATOR>"+pushStorageDto.getOPERATOR()+"</OPERATOR>"+
"<OPERATOR_ID>"+pushStorageDto.getOPERATOR_ID()+"</OPERATOR_ID>"+
"<OperationTime>"+pushStorageDto.getOperationTime()+"</OperationTime>"+
"<SEQUESTRATION_RESION>"+pushStorageDto.getSEQUESTRATION_RESION()+"</SEQUESTRATION_RESION>"+
"</REQUEST>";
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpPost httpPost = new HttpPost(MedicalRecordUrl);
httpPost.setHeader("Content-Type", "application/xml");
StringEntity entity = new StringEntity(xmlContent);
httpPost.setEntity(entity);
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
EntityUtils.consume(response.getEntity());
}
String endpoint = MedicalRecordUrl;
String method = MedicalRecordSealingName;
logger.log("endpoint:"+endpoint);
logger.log("method:"+method);
logger.log("xmlContent:"+xmlContent);
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(endpoint);
Object[] res = null;
res = client.invoke(method, xmlContent);
logger.log("封存返回:"+res);
} catch (Exception e) {
e.printStackTrace();
logger.log("异常处理:"+e.getMessage()+e);
}
}

@ -247,16 +247,16 @@ public class CaSignServiceImpl {
// 获取页面的宽度和高度
float width = pageSize.getWidth();
float height = pageSize.getHeight();
System.out.println("pdf尺寸width:" + width + "height:" + height);
// System.out.println("pdf尺寸width:" + width + "height:" + height);
bean.setLeft(Float.valueOf(width - caReqParam.getSignLeft()));
bean.setTop(Float.valueOf(caReqParam.getSignTop()));
bean.setRight(Float.valueOf(width));
bean.setBottom(Float.valueOf(caReqParam.getSignBottom()));
System.out.println("左:" + bean.getLeft() + ",上:" + bean.getTop() + ",右:" + bean.getRight() + ",下:" + bean.getBottom());
// System.out.println("左:" + bean.getLeft() + ",上:" + bean.getTop() + ",右:" + bean.getRight() + ",下:" + bean.getBottom());
message = anySignClientTool.pdfSignByParam(pdfBty, signNo, bean);
if ("200".equals(message.getStatusCode())) {//成功
ClientUtil.writeByteArrayToFile(new File(newpdfPath), message.getBody());
System.out.println("签章成功");
// System.out.println("签章成功");
} else {
String statusCode = message.getStatusCode();
String statusInfo = message.getStatusInfo();

@ -11,7 +11,7 @@ public class Logger {
public void log(String info) {
SimpleDateFormat dateFormat = new SimpleDateFormat ("yyyy-MM-dd");
String format = dateFormat.format (new Date());
File file = new File ("D:\\export\\logs\\"+format);
File file = new File ("D:\\emr_medical_record\\logs\\"+format);
if(!file.isDirectory ()){
file.mkdirs ();
}

@ -88,4 +88,5 @@ waterTifToJpgPath = D:/jiashi/tifToJpgLoad/
#\u5bfc\u51fa\u4fe1\u606f\u683c\u5f0f\u9700\u8981\u4e3aunicode\u683c\u5f0f\u4e0d\u7136\u4f1a\u4e71\u7801
export_pdf_hospital_info = \u5e7f\u4e1c\u7701_\u5e7f\u4e1c\u533b\u79d1\u5927\u5b66\u9644\u5c5e\u533b\u9662
MedicalRecordSealingUrl=http://10.6.0.151:8099/JHNewIEService/JHNewIEService/JHEmrSynchroPatPage
MedicalRecordSealingUrl=http://10.6.0.151:8099/JHNewIEService/JHNewIEService
MedicalRecordSealingName=JHEmrSynchroPatPage

@ -184,7 +184,7 @@
<if test="title != null and title != ''">
and t.title like '%'+#{title,jdbcType=VARCHAR}+'%'
</if>
ORDER BY t.UpLoadDateTime
ORDER BY t.Title
</select>
<!-- <select id="detailWithChildByClo" resultMap="BaseResultMap2" parameterType="com.emr.entity.Archive_Detail_Vo">-->

@ -681,7 +681,7 @@
WHERE
1 = 1
AND patindex( '%B%', m.inp_no ) IN ( 0, 1 )
AND m.ArchiveState NOT IN ( '作废', '已封存' )
AND m.ArchiveState NOT IN ( '作废')
AND m.Is_Valid != 1
AND inp_no NOT LIKE 'LG%'
<if test="printNum != null and printNum != ''">

@ -113,21 +113,8 @@
<label>召回人:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="creater" id="creater" title="请输入召回人"
data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" data-none-results-text="没找到相应记录{0}">
<%--<option value="--">全部</option>--%>
<%--<option value="02852">aaaa 02852</option>
<option value="00643">aaaa 00643</option>--%>
</select>
<%--<input type="text" class="input-sm form-control" id="creater" placeholder="请输入召回人">--%>
</div>
<%--<div class="form-group divCss8">
<label for="state">召回状态 :</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选"
data-none-results-text="没找到相应记录{0}" name="state" id="state" title="请输入召回状态">
&lt;%&ndash; <option value="">全部</option>&ndash;%&gt;
<option value="已召回">已召回</option>
<option value="未召回">未召回</option>
</select>
</div>--%>
<div class="form-group divCss">
<label>召回日期:</label>
<div class="input-daterange input-group" id="datepicker">

@ -3703,6 +3703,7 @@
//查询
$('#searchBtn').click(function () {
if (tipLoad == 0) {
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
} else {

@ -0,0 +1,42 @@
import com.emr.dto.ThreeDaysFileDto;
import com.emr.service.StatementService;
import com.emr.vo.ThreeDaysFileVo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.io.File;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
/**
* @ClassName text
* @Description
* @Author linjj
* @Date 2024/1/15 9:36
* @Version 1.0
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:config/applicationContext.xml"})
public class text {
@Autowired
StatementService statementService;
@Test
public void text(){
}
@Test
public void text1(){
int pollingNum = (int) Math.floor((double) 387 / (double) 50);
for (int i=0;i<=pollingNum;i++){
System.out.println(i);
}
}
}
Loading…
Cancel
Save