From 7df2bfd72ffd390233395f6a2e3fbbd2964bd0a8 Mon Sep 17 00:00:00 2001 From: wzqgit <568275241@qq.com> Date: Thu, 6 May 2021 11:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=80=E8=B0=83=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=9C=B0=E5=9D=80=E5=88=B0=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=205/6=20wzq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emr/controller/lastVerifyController.java | 73 ++++++++++++++++--- src/main/resources/config/jdbc.properties | 38 ++++++---- 2 files changed, 88 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/emr/controller/lastVerifyController.java b/src/main/java/com/emr/controller/lastVerifyController.java index 8fb47697..53734749 100644 --- a/src/main/java/com/emr/controller/lastVerifyController.java +++ b/src/main/java/com/emr/controller/lastVerifyController.java @@ -14,12 +14,14 @@ import com.emr.webservice.MedicalRecordShowBackContent.MR_FILE_CALLBACK_RECORD; import com.emr.webservice.MedicalRecordShowBackContent.MR_FILE_INDEX_CALLBACK; import org.apache.axis.client.Call; import org.apache.axis.client.Service; +import org.apache.axis.encoding.XMLType; import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; import org.apache.shiro.SecurityUtils; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.Model; @@ -29,10 +31,13 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.namespace.QName; +import javax.xml.rpc.ParameterMode; +import javax.xml.rpc.ServiceException; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; +import java.rmi.RemoteException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; @@ -56,6 +61,12 @@ public class lastVerifyController { @Autowired(required = false) private Archive_Master_FollowingService archive_master_followingService; + @Value("${EMRQualityControl}") + private String EMRQualityControl; + + @Value("${EMRQualityControlParamName}") + private String EMRQualityControlParamName; + @RequestMapping(value = "/lastVerifys") public String faults(Model model) { return "lastVerifyDir/lastVerifyList"; @@ -397,16 +408,60 @@ public class lastVerifyController { MR_FILE_CALLBACK_RECORD = XMLUtil.convertToXml(inputParam1); MR_FILE_INDEX_CALLBACK = XMLUtil.convertToXml(inputParam2); - String endpoint = "http://10.6.1.152:8037/SignWebService.asmx?WSDL"; - String method = "MedicalRecordRepair"; + StringBuffer sb = new StringBuffer("\n\n"); + sb.append(MR_FILE_CALLBACK_RECORD); + sb.append("\n"); + sb.append(MR_FILE_INDEX_CALLBACK); + sb.append("\n"); + sb.append(""); + + String result=""; + try { + String endpoint = EMRQualityControl; + String[] subStrs = endpoint.split("="); + String url = ""; + String subStr =""; + url = subStrs[0]; + if(subStrs.length>1){ + subStr = getURLEncoderString(subStrs[1]); + } + endpoint = url+"="+subStr; + Service service = new Service(); + Call call = null; + try { + call = (Call) service.createCall(); + } catch (ServiceException e) { + + } + call.setTargetEndpointAddress(endpoint); + call.setOperationName(new QName("http://bjgoodwillcis.com", "XMLMessageServer")); + call.addParameter(EMRQualityControlParamName, XMLType.XSD_STRING, ParameterMode.IN);//接口的参数 + call.setReturnType(XMLType.XSD_STRING);//设置返回类型 + try { + result = (String) call.invoke(new Object[]{sb.toString()}); + //System.err.println(result); + } catch (RemoteException e) { + e.printStackTrace(); + result = e.getMessage(); + System.err.println(result); + } + } catch (Exception e) { + System.err.println(e.toString()); + } + return result; + } - JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(); - Client client = factory.createClient(endpoint); - Object[] res = null; - res = client.invoke(method,MR_FILE_CALLBACK_RECORD,MR_FILE_INDEX_CALLBACK); - //String xml = (String) res[0]; - //System.err.println("@@@@@@@@@@@@@@@@@" + xml); - return (String) res[0]; + public static String getURLEncoderString(String str) { + String result = ""; + if (null == str) { + return ""; + } + try { + result = java.net.URLEncoder.encode(str, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return result; } } diff --git a/src/main/resources/config/jdbc.properties b/src/main/resources/config/jdbc.properties index 0ed0dd40..c063da53 100644 --- a/src/main/resources/config/jdbc.properties +++ b/src/main/resources/config/jdbc.properties @@ -12,35 +12,45 @@ hibernate.hbm2ddl.auto=update hibernate.current_session_context_class=thread hibernate.jdbc.batch_size=50 hibernate.enable_lazy_load_no_trans=true -#ͼƬַ +#ͼƬ��ַ pictureUrl=D:\\test\\uploadImage -#ԶPDFַD:\tesst\autoPdf +#�����Զ�����PDF��ַD:\tesst\autoPdf autoPdfUrl=D:/test/autoPdf -#ϴPDFַ +#�����ϴ�PDF��ַ pdfUrl=D:\\test\\loadPdf -#PDFļڻбַ +#PDF�ļ������ڻ����б��ַ pdfErrorUrl=D:\\test\\error\\ -# +#�������� expired=7 -# +#������������ deathExpired=7 -#ʱգÿ4㴥0 0 4 * * ?:ԶPDFַautoPdfUrlPDFļڻбַ +#��ʱ��գ�ÿ��4�㴥��0 0 4 * * ?��:�����Զ�����PDF��ַautoPdfUrl��PDF�ļ������ڻ����б��ַ fileDelay=0 0 4 * * ? -#ʱϢ :ÿ3㴥0 0 3 * * ?,ÿ1ִһ0/1 * * * * ? +#��ʱ������������Ϣ :ÿ��3�㴥��0 0 3 * * ?,ÿ1��ִ��һ��0/1 * * * * ? fixedDelay=0 0 3 * * ? -#powerUrl=http://127.0.0.1:8080/power/font/getMenusByUserIdAndSysFlag -#POWER_URLHEAD=http://127.0.0.1:8080/power -#POWER_JSP=http://127.0.0.1:8080/power -#recallReason=ҽԺҪĵ -#HomepageDictionary=http://127.0.0.1:8080/WholeCheckInterface/services/HomepageDictionary?wsdl +powerUrl=http://127.0.0.1:8080/power/font/getMenusByUserIdAndSysFlag +POWER_URLHEAD=http://127.0.0.1:8080/power +POWER_JSP=http://127.0.0.1:8080/power +recallReason=医院需要这份文档 +HomepageDictionary=http://127.0.0.1:8080/WholeCheckInterface/services/HomepageDictionary?wsdl +HomepageMethod=CheckData +powerGetUserList=http://127.0.0.1:8080/power/font/getUserList?userName=admin +EMRQualityControl=http://10.6.0.170:57772/csp/healthshare/jhipnew/JHIPLIB.SOAP.BS.XmlService.cls?CfgItem=JH5003MRAtoEMR +EMRQualityControlParamName=Message + +#powerUrl=http://127.0.0.1:9999/power/font/getMenusByUserIdAndSysFlag +#POWER_URLHEAD=http://127.0.0.1:9999/power +#POWER_JSP=http://127.0.0.1:9999/power +#recallReason=医院需要这份文档 +#HomepageDictionary=http://127.0.0.1:9999/WholeCheckInterface/services/HomepageDictionary?wsdl #HomepageMethod=CheckData #powerGetUserList=http://127.0.0.1:8080/power/font/getUserList?userName=admin powerUrl=http://127.0.0.1:9999/power/font/getMenusByUserIdAndSysFlag POWER_URLHEAD=http://127.0.0.1:9999/power POWER_JSP=http://127.0.0.1:9999/power -recallReason=ҽԺҪĵ +recallReason=ҽԺ��Ҫ����ĵ� HomepageDictionary=http://127.0.0.1:9999/WholeCheckInterface/services/HomepageDictionary?wsdl HomepageMethod=CheckData powerGetUserList=http://127.0.0.1:9999/power/font/getUserList?userName=admin