Index: forgon-core/src/main/java/com/forgon/Constants.java =================================================================== diff -u -r16431 -r16433 --- forgon-core/src/main/java/com/forgon/Constants.java (.../Constants.java) (revision 16431) +++ forgon-core/src/main/java/com/forgon/Constants.java (.../Constants.java) (revision 16433) @@ -33,10 +33,14 @@ public final static String DATEFORMAT_YYYYMMDDHHMMSS = "yyyy-MM-dd HH:mm:ss"; + public final static SimpleDateFormat SIMPLEDATEFORMATNOSPLIT_YYYYMMDDHHMMSS = new SimpleDateFormat( + "yyyyMMddHHmmss"); public final static SimpleDateFormat SIMPLEDATEFORMAT_YYYYMMDDHHMMSS = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss"); public final static SimpleDateFormat SIMPLEDATEFORMAT_YYYYMMDDHHMM = new SimpleDateFormat( "yyyy-MM-dd HH:mm"); + public final static SimpleDateFormat SIMPLEDATEFORMATNOSPLIT_YYYYMMDD = new SimpleDateFormat( + "yyyyMMdd"); public final static SimpleDateFormat SIMPLEDATEFORMAT_YYYYMMDD = new SimpleDateFormat( "yyyy-MM-dd"); public final static FastDateFormat FASTDATEFORMAT_YYYYMMDD = FastDateFormat Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js =================================================================== diff -u -r16032 -r16433 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 16032) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 16433) @@ -236,6 +236,9 @@ top.Ext.getCmp('circuitNurse').setValue(patientInfo.circuitNurse); top.Ext.getCmp('washHandNurse').setValue(patientInfo.washHandNurse); top.Ext.getCmp('specialInfection').setValue(patientInfo.specialInfection); + if(patientInfo.hospitalNumber){ + top.Ext.getCmp('hospitalNum').setValue(patientInfo.hospitalNumber); + } } // 获取扫描的物品所有条码 Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/service/DataSynchronizationManagerImpl.java =================================================================== diff -u -r16368 -r16433 --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/service/DataSynchronizationManagerImpl.java (.../DataSynchronizationManagerImpl.java) (revision 16368) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/service/DataSynchronizationManagerImpl.java (.../DataSynchronizationManagerImpl.java) (revision 16433) @@ -111,10 +111,18 @@ if(findPatientInfoByHospitalNumDao == null){ return null; } + //条码腕带住院号前缀,扫描时去掉条码腕带住院号前缀,然后补上调岱嘉平台接口的前辍 + String wristBandHospitalNumberPrefix = CssdUtils.getSystemSetConfigByName("wristBandHospitalNumberPrefix"); + if(StringUtils.isNotBlank(hospitalNum) && StringUtils.isNotBlank(wristBandHospitalNumberPrefix) + && hospitalNum.startsWith(wristBandHospitalNumberPrefix)){ + hospitalNum = hospitalNum.replaceFirst(wristBandHospitalNumberPrefix, ""); + } + //住院号前缀,中大附一住院号有前缀 String hospitalNumberPrefix = CssdUtils.getSystemSetConfigByName("hospitalNumberPrefix"); - if(StringUtils.isNotBlank(hospitalNum) && StringUtils.isNotBlank(hospitalNumberPrefix) && hospitalNum.startsWith(hospitalNumberPrefix)){ - hospitalNum = hospitalNum.replaceFirst(hospitalNumberPrefix, ""); + if(StringUtils.isNotBlank(hospitalNum) && StringUtils.isNotBlank(hospitalNumberPrefix) + && !(hospitalNum.startsWith(hospitalNumberPrefix))){ + hospitalNum = hospitalNumberPrefix + hospitalNum; } return findPatientInfoByHospitalNumDao.findPatientInfoByHospitalNum(hospitalNum); } Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoapStub.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoapStub.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoapStub.java (revision 16433) @@ -0,0 +1,243 @@ +/** + * MessageRouteServiceSoapStub.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public class MessageRouteServiceSoapStub extends org.apache.axis.client.Stub implements MessageRouteServiceSoap { + private java.util.Vector cachedSerClasses = new java.util.Vector(); + private java.util.Vector cachedSerQNames = new java.util.Vector(); + private java.util.Vector cachedSerFactories = new java.util.Vector(); + private java.util.Vector cachedDeserFactories = new java.util.Vector(); + + static org.apache.axis.description.OperationDesc [] _operations; + + static { + _operations = new org.apache.axis.description.OperationDesc[2]; + _initOperationDesc1(); + } + + private static void _initOperationDesc1(){ + org.apache.axis.description.OperationDesc oper; + org.apache.axis.description.ParameterDesc param; + oper = new org.apache.axis.description.OperationDesc(); + oper.setName("sendMessageSync"); + param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "req"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Request"), Request.class, false, false); + param.setOmittable(true); + oper.addParameter(param); + oper.setReturnType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Response")); + oper.setReturnClass(Response.class); + oper.setReturnQName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "sendMessageSyncResult")); + oper.setStyle(org.apache.axis.constants.Style.WRAPPED); + oper.setUse(org.apache.axis.constants.Use.LITERAL); + _operations[0] = oper; + + oper = new org.apache.axis.description.OperationDesc(); + oper.setName("sendMessageAsync"); + param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "req"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Request"), Request.class, false, false); + param.setOmittable(true); + oper.addParameter(param); + oper.setReturnType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Response")); + oper.setReturnClass(Response.class); + oper.setReturnQName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "sendMessageAsyncResult")); + oper.setStyle(org.apache.axis.constants.Style.WRAPPED); + oper.setUse(org.apache.axis.constants.Use.LITERAL); + _operations[1] = oper; + + } + + public MessageRouteServiceSoapStub() throws org.apache.axis.AxisFault { + this(null); + } + + public MessageRouteServiceSoapStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { + this(service); + super.cachedEndpoint = endpointURL; + } + + public MessageRouteServiceSoapStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { + if (service == null) { + super.service = new org.apache.axis.client.Service(); + } else { + super.service = service; + } + ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); + java.lang.Class cls; + javax.xml.namespace.QName qName; + javax.xml.namespace.QName qName2; + java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; + java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; + java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; + java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; + java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; + java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; + java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; + java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; + java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; + java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; + qName = new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Request"); + cachedSerQNames.add(qName); + cls = Request.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "RequestHeader"); + cachedSerQNames.add(qName); + cls = RequestHeader.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Response"); + cachedSerQNames.add(qName); + cls = Response.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "ResponseHeader"); + cachedSerQNames.add(qName); + cls = ResponseHeader.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + } + + protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { + try { + org.apache.axis.client.Call _call = super._createCall(); + if (super.maintainSessionSet) { + _call.setMaintainSession(super.maintainSession); + } + if (super.cachedUsername != null) { + _call.setUsername(super.cachedUsername); + } + if (super.cachedPassword != null) { + _call.setPassword(super.cachedPassword); + } + if (super.cachedEndpoint != null) { + _call.setTargetEndpointAddress(super.cachedEndpoint); + } + if (super.cachedTimeout != null) { + _call.setTimeout(super.cachedTimeout); + } + if (super.cachedPortName != null) { + _call.setPortName(super.cachedPortName); + } + java.util.Enumeration keys = super.cachedProperties.keys(); + while (keys.hasMoreElements()) { + java.lang.String key = (java.lang.String) keys.nextElement(); + _call.setProperty(key, super.cachedProperties.get(key)); + } + // All the type mapping information is registered + // when the first call is made. + // The type mapping information is actually registered in + // the TypeMappingRegistry of the service, which + // is the reason why registration is only needed for the first call. + synchronized (this) { + if (firstCall()) { + // must set encoding style before registering serializers + _call.setEncodingStyle(null); + for (int i = 0; i < cachedSerFactories.size(); ++i) { + java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); + javax.xml.namespace.QName qName = + (javax.xml.namespace.QName) cachedSerQNames.get(i); + java.lang.Object x = cachedSerFactories.get(i); + if (x instanceof Class) { + java.lang.Class sf = (java.lang.Class) + cachedSerFactories.get(i); + java.lang.Class df = (java.lang.Class) + cachedDeserFactories.get(i); + _call.registerTypeMapping(cls, qName, sf, df, false); + } + else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) { + org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory) + cachedSerFactories.get(i); + org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory) + cachedDeserFactories.get(i); + _call.registerTypeMapping(cls, qName, sf, df, false); + } + } + } + } + return _call; + } + catch (java.lang.Throwable _t) { + throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); + } + } + + public Response sendMessageSync(Request req) throws java.rmi.RemoteException { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[0]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.gzsums.net//esb/sendMessageSync"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "sendMessageSync")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {req}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (Response) _resp; + } catch (java.lang.Exception _exception) { + return (Response) org.apache.axis.utils.JavaUtils.convert(_resp, Response.class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + throw axisFaultException; +} + } + + public Response sendMessageAsync(Request req) throws java.rmi.RemoteException { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[1]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.gzsums.net//esb/sendMessageAsync"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "sendMessageAsync")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {req}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (Response) _resp; + } catch (java.lang.Exception _exception) { + return (Response) org.apache.axis.utils.JavaUtils.convert(_resp, Response.class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + throw axisFaultException; +} + } + +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/ResponseHeader.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/ResponseHeader.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/ResponseHeader.java (revision 16433) @@ -0,0 +1,416 @@ +/** + * ResponseHeader.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public class ResponseHeader implements java.io.Serializable { + private java.lang.String sender; + + private java.lang.String receiver; + + private java.lang.String responseTime; + + private java.lang.String msgType; + + private java.lang.String msgId; + + private java.lang.String errCode; + + private java.lang.String errMessage; + + private java.lang.String msgPriority; + + private java.lang.String msgVersion; + + public ResponseHeader() { + } + + public ResponseHeader( + java.lang.String sender, + java.lang.String receiver, + java.lang.String responseTime, + java.lang.String msgType, + java.lang.String msgId, + java.lang.String errCode, + java.lang.String errMessage, + java.lang.String msgPriority, + java.lang.String msgVersion) { + this.sender = sender; + this.receiver = receiver; + this.responseTime = responseTime; + this.msgType = msgType; + this.msgId = msgId; + this.errCode = errCode; + this.errMessage = errMessage; + this.msgPriority = msgPriority; + this.msgVersion = msgVersion; + } + + + /** + * Gets the sender value for this ResponseHeader. + * + * @return sender + */ + public java.lang.String getSender() { + return sender; + } + + + /** + * Sets the sender value for this ResponseHeader. + * + * @param sender + */ + public void setSender(java.lang.String sender) { + this.sender = sender; + } + + + /** + * Gets the receiver value for this ResponseHeader. + * + * @return receiver + */ + public java.lang.String getReceiver() { + return receiver; + } + + + /** + * Sets the receiver value for this ResponseHeader. + * + * @param receiver + */ + public void setReceiver(java.lang.String receiver) { + this.receiver = receiver; + } + + + /** + * Gets the responseTime value for this ResponseHeader. + * + * @return responseTime + */ + public java.lang.String getResponseTime() { + return responseTime; + } + + + /** + * Sets the responseTime value for this ResponseHeader. + * + * @param responseTime + */ + public void setResponseTime(java.lang.String responseTime) { + this.responseTime = responseTime; + } + + + /** + * Gets the msgType value for this ResponseHeader. + * + * @return msgType + */ + public java.lang.String getMsgType() { + return msgType; + } + + + /** + * Sets the msgType value for this ResponseHeader. + * + * @param msgType + */ + public void setMsgType(java.lang.String msgType) { + this.msgType = msgType; + } + + + /** + * Gets the msgId value for this ResponseHeader. + * + * @return msgId + */ + public java.lang.String getMsgId() { + return msgId; + } + + + /** + * Sets the msgId value for this ResponseHeader. + * + * @param msgId + */ + public void setMsgId(java.lang.String msgId) { + this.msgId = msgId; + } + + + /** + * Gets the errCode value for this ResponseHeader. + * + * @return errCode + */ + public java.lang.String getErrCode() { + return errCode; + } + + + /** + * Sets the errCode value for this ResponseHeader. + * + * @param errCode + */ + public void setErrCode(java.lang.String errCode) { + this.errCode = errCode; + } + + + /** + * Gets the errMessage value for this ResponseHeader. + * + * @return errMessage + */ + public java.lang.String getErrMessage() { + return errMessage; + } + + + /** + * Sets the errMessage value for this ResponseHeader. + * + * @param errMessage + */ + public void setErrMessage(java.lang.String errMessage) { + this.errMessage = errMessage; + } + + + /** + * Gets the msgPriority value for this ResponseHeader. + * + * @return msgPriority + */ + public java.lang.String getMsgPriority() { + return msgPriority; + } + + + /** + * Sets the msgPriority value for this ResponseHeader. + * + * @param msgPriority + */ + public void setMsgPriority(java.lang.String msgPriority) { + this.msgPriority = msgPriority; + } + + + /** + * Gets the msgVersion value for this ResponseHeader. + * + * @return msgVersion + */ + public java.lang.String getMsgVersion() { + return msgVersion; + } + + + /** + * Sets the msgVersion value for this ResponseHeader. + * + * @param msgVersion + */ + public void setMsgVersion(java.lang.String msgVersion) { + this.msgVersion = msgVersion; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof ResponseHeader)) return false; + ResponseHeader other = (ResponseHeader) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.sender==null && other.getSender()==null) || + (this.sender!=null && + this.sender.equals(other.getSender()))) && + ((this.receiver==null && other.getReceiver()==null) || + (this.receiver!=null && + this.receiver.equals(other.getReceiver()))) && + ((this.responseTime==null && other.getResponseTime()==null) || + (this.responseTime!=null && + this.responseTime.equals(other.getResponseTime()))) && + ((this.msgType==null && other.getMsgType()==null) || + (this.msgType!=null && + this.msgType.equals(other.getMsgType()))) && + ((this.msgId==null && other.getMsgId()==null) || + (this.msgId!=null && + this.msgId.equals(other.getMsgId()))) && + ((this.errCode==null && other.getErrCode()==null) || + (this.errCode!=null && + this.errCode.equals(other.getErrCode()))) && + ((this.errMessage==null && other.getErrMessage()==null) || + (this.errMessage!=null && + this.errMessage.equals(other.getErrMessage()))) && + ((this.msgPriority==null && other.getMsgPriority()==null) || + (this.msgPriority!=null && + this.msgPriority.equals(other.getMsgPriority()))) && + ((this.msgVersion==null && other.getMsgVersion()==null) || + (this.msgVersion!=null && + this.msgVersion.equals(other.getMsgVersion()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getSender() != null) { + _hashCode += getSender().hashCode(); + } + if (getReceiver() != null) { + _hashCode += getReceiver().hashCode(); + } + if (getResponseTime() != null) { + _hashCode += getResponseTime().hashCode(); + } + if (getMsgType() != null) { + _hashCode += getMsgType().hashCode(); + } + if (getMsgId() != null) { + _hashCode += getMsgId().hashCode(); + } + if (getErrCode() != null) { + _hashCode += getErrCode().hashCode(); + } + if (getErrMessage() != null) { + _hashCode += getErrMessage().hashCode(); + } + if (getMsgPriority() != null) { + _hashCode += getMsgPriority().hashCode(); + } + if (getMsgVersion() != null) { + _hashCode += getMsgVersion().hashCode(); + } + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(ResponseHeader.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "ResponseHeader")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("sender"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "sender")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("receiver"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "receiver")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("responseTime"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "responseTime")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgType"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgType")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgId"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgId")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("errCode"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "errCode")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("errMessage"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "errMessage")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgPriority"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgPriority")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgVersion"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgVersion")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + } + + /** + * Return type metadata object + */ + public static org.apache.axis.description.TypeDesc getTypeDesc() { + return typeDesc; + } + + /** + * Get Custom Serializer + */ + public static org.apache.axis.encoding.Serializer getSerializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanSerializer( + _javaType, _xmlType, typeDesc); + } + + /** + * Get Custom Deserializer + */ + public static org.apache.axis.encoding.Deserializer getDeserializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanDeserializer( + _javaType, _xmlType, typeDesc); + } + +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/Response.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/Response.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/Response.java (revision 16433) @@ -0,0 +1,157 @@ +/** + * Response.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public class Response implements java.io.Serializable { + private ResponseHeader responseHeader; + + private java.lang.String responseBody; + + public Response() { + } + + public Response( + ResponseHeader responseHeader, + java.lang.String responseBody) { + this.responseHeader = responseHeader; + this.responseBody = responseBody; + } + + + /** + * Gets the responseHeader value for this Response. + * + * @return responseHeader + */ + public ResponseHeader getResponseHeader() { + return responseHeader; + } + + + /** + * Sets the responseHeader value for this Response. + * + * @param responseHeader + */ + public void setResponseHeader(ResponseHeader responseHeader) { + this.responseHeader = responseHeader; + } + + + /** + * Gets the responseBody value for this Response. + * + * @return responseBody + */ + public java.lang.String getResponseBody() { + return responseBody; + } + + + /** + * Sets the responseBody value for this Response. + * + * @param responseBody + */ + public void setResponseBody(java.lang.String responseBody) { + this.responseBody = responseBody; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof Response)) return false; + Response other = (Response) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.responseHeader==null && other.getResponseHeader()==null) || + (this.responseHeader!=null && + this.responseHeader.equals(other.getResponseHeader()))) && + ((this.responseBody==null && other.getResponseBody()==null) || + (this.responseBody!=null && + this.responseBody.equals(other.getResponseBody()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getResponseHeader() != null) { + _hashCode += getResponseHeader().hashCode(); + } + if (getResponseBody() != null) { + _hashCode += getResponseBody().hashCode(); + } + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(Response.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Response")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("responseHeader"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "responseHeader")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "ResponseHeader")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("responseBody"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "responseBody")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + } + + /** + * Return type metadata object + */ + public static org.apache.axis.description.TypeDesc getTypeDesc() { + return typeDesc; + } + + /** + * Get Custom Serializer + */ + public static org.apache.axis.encoding.Serializer getSerializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanSerializer( + _javaType, _xmlType, typeDesc); + } + + /** + * Get Custom Deserializer + */ + public static org.apache.axis.encoding.Deserializer getDeserializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanDeserializer( + _javaType, _xmlType, typeDesc); + } + +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoapProxy.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoapProxy.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoapProxy.java (revision 16433) @@ -0,0 +1,60 @@ +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public class MessageRouteServiceSoapProxy implements MessageRouteServiceSoap { + private String _endpoint = null; + private MessageRouteServiceSoap messageRouteServiceSoap = null; + + public MessageRouteServiceSoapProxy() { + _initMessageRouteServiceSoapProxy(); + } + + public MessageRouteServiceSoapProxy(String endpoint) { + _endpoint = endpoint; + _initMessageRouteServiceSoapProxy(); + } + + private void _initMessageRouteServiceSoapProxy() { + try { + messageRouteServiceSoap = (new MessageRouteServiceLocator()).getMessageRouteServiceSoap(); + if (messageRouteServiceSoap != null) { + if (_endpoint != null) + ((javax.xml.rpc.Stub)messageRouteServiceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); + else + _endpoint = (String)((javax.xml.rpc.Stub)messageRouteServiceSoap)._getProperty("javax.xml.rpc.service.endpoint.address"); + } + + } + catch (javax.xml.rpc.ServiceException serviceException) {} + } + + public String getEndpoint() { + return _endpoint; + } + + public void setEndpoint(String endpoint) { + _endpoint = endpoint; + if (messageRouteServiceSoap != null) + ((javax.xml.rpc.Stub)messageRouteServiceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); + + } + + public MessageRouteServiceSoap getMessageRouteServiceSoap() { + if (messageRouteServiceSoap == null) + _initMessageRouteServiceSoapProxy(); + return messageRouteServiceSoap; + } + + public Response sendMessageSync(Request req) throws java.rmi.RemoteException{ + if (messageRouteServiceSoap == null) + _initMessageRouteServiceSoapProxy(); + return messageRouteServiceSoap.sendMessageSync(req); + } + + public Response sendMessageAsync(Request req) throws java.rmi.RemoteException{ + if (messageRouteServiceSoap == null) + _initMessageRouteServiceSoapProxy(); + return messageRouteServiceSoap.sendMessageAsync(req); + } + + +} \ No newline at end of file Index: ssts-web/src/main/resources/spring/projects/zsyy/his.xml =================================================================== diff -u -r15114 -r16433 --- ssts-web/src/main/resources/spring/projects/zsyy/his.xml (.../his.xml) (revision 15114) +++ ssts-web/src/main/resources/spring/projects/zsyy/his.xml (.../his.xml) (revision 16433) @@ -47,15 +47,15 @@ class="com.forgon.disinfectsystem.datasynchronization.dwr.DataSynchronizationTableManager"> - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED + + + + + + + + + + + + + + + \ No newline at end of file Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/FindPatientInfoByTreatmentNumDaoImpl.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/FindPatientInfoByTreatmentNumDaoImpl.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/FindPatientInfoByTreatmentNumDaoImpl.java (revision 16433) @@ -0,0 +1,37 @@ +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy; + +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; + +import org.apache.log4j.Logger; + +import com.forgon.disinfectsystem.common.CssdUtils; +import com.forgon.disinfectsystem.datasynchronization.dao.FindPatientInfoByTreatmentNumDao; +import com.forgon.disinfectsystem.datasynchronization.model.PatientInfoVO; +import com.forgon.tools.Constants; + +/** + * 根据诊疗号查询病人信息(南山附幼) + * @author shuyongfu + * + */ +public class FindPatientInfoByTreatmentNumDaoImpl implements + FindPatientInfoByTreatmentNumDao { + + Logger logger = Logger.getLogger(FindPatientInfoByTreatmentNumDaoImpl.class); + + /** + * 根据诊疗号查询病人信息 + */ + @Override + public PatientInfoVO[] findPatientInfoByTreatmentNum(String treatmentNum) { + PatientInfoVO[] patientInfoVOArray = null; + try{ + patientInfoVOArray = WebServiceClientHelper.queryPatient(PatientInfoVO.TYPE_CLINIC, treatmentNum); + }catch(Exception e){ + logger.error("根据诊疗号查询病人信息失败" + e); + } + return patientInfoVOArray; + } + +} Index: ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js =================================================================== diff -u -r15715 -r16433 --- ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 15715) +++ ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 16433) @@ -53,8 +53,16 @@ }, //公司名称 "dingxiang"显示主页显示丁香的logo,不配置或者配为"forgon",显示孚峻的logo companyName : "dingxiang", - //住院号前缀 - hospitalNumberPrefix:"1,ZY01", - //诊疗号前缀 - clinicNumberPrefix:"1,ZY01" + //条码腕带住院号前缀(PDA录使用记录时扫到的住院号前辍) + wristBandHospitalNumberPrefix:"1,ZY01", + //条码腕带诊疗号前缀(PDA录使用记录时扫到的诊疗号前辍) + clinicNumberPrefix:"", + //岱嘉接口住院号前缀 + hospitalNumberPrefix:"ZY01", + //岱嘉接口诊疗号前缀 + clinicNumberPrefix:"", + //巡回护士是否允许为空 + useRecordCircuitNurseAllowBlank:true, + //洗手护士是否允许为空 + useRecordWashHandNurseAllowBlank:true } \ No newline at end of file Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoap.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoap.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceSoap.java (revision 16433) @@ -0,0 +1,13 @@ +/** + * MessageRouteServiceSoap.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public interface MessageRouteServiceSoap extends java.rmi.Remote { + public Response sendMessageSync(Request req) throws java.rmi.RemoteException; + public Response sendMessageAsync(Request req) throws java.rmi.RemoteException; +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteService.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteService.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteService.java (revision 16433) @@ -0,0 +1,16 @@ +/** + * MessageRouteService.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public interface MessageRouteService extends javax.xml.rpc.Service { + public java.lang.String getMessageRouteServiceSoapAddress(); + + public MessageRouteServiceSoap getMessageRouteServiceSoap() throws javax.xml.rpc.ServiceException; + + public MessageRouteServiceSoap getMessageRouteServiceSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/WebServiceClientHelper.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/WebServiceClientHelper.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/WebServiceClientHelper.java (revision 16433) @@ -0,0 +1,282 @@ +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy; + + +import java.net.URL; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +import javax.xml.namespace.QName; + +import net.sf.json.JSON; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import net.sf.json.xml.XMLSerializer; + +import org.apache.axis.AxisFault; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; + +import com.forgon.Constants; +import com.forgon.disinfectsystem.common.CssdUtils; +import com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb.MessageRouteServiceSoapStub; +import com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb.Request; +import com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb.RequestHeader; +import com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb.Response; +import com.forgon.disinfectsystem.datasynchronization.model.PatientInfoVO; +import com.forgon.disinfectsystem.entity.useRecord.OperationSchedule; +import com.forgon.tools.date.DateTools; + +/** + * 中大附一webservice帮助类 + * @author shuyongfu + * + */ +public class WebServiceClientHelper { + + private final static Logger logger = Logger.getLogger(WebServiceClientHelper.class); + + /** + * 性别编码 + */ + public static String setM = "M"; + public static String setF = "F"; + //性别的处理 + public static JSONObject sexJsonObject = new JSONObject(); + static{ + sexJsonObject.put(setM, "男"); + sexJsonObject.put(setF, "女"); + } + + /** + * 床位属性的前辍科室编码长度 + */ + public static int bedNoPrefixDepartCodingLength = 4; + + /** + * 岱嘉平台的消息接口地址 + */ + //public final static String wsUrl = "http://168.168.252.112:9894/notice-server/services/MessageRouteServiceSoap?wsdl"; + public final static String wsUrl = "http://168.168.252.112:9894/notice-server/services/MessageRouteServiceSoap"; + + /** + * 孚峻消毒供应质量追溯管理系统域code + */ + public final static String forgonSystemDomain = "FJXDGYZLZSGLXT"; + + /** + * 孚峻消毒供应质量追溯管理系统域Id + */ + public final static String forgonSystemDomainId = "2.16.840.1.113883.4.487.2.1.34"; + + public static PatientInfoVO[] queryPatient1(String type , String patientNumber){ + PatientInfoVO[] patientInfoVO = null; + String soap = "" + +" " + +" " + +" " + +" " + +" " + +" " + +" " + +" 2.16.840.1.113883.4.487.2.1.10 " + +" " + +" 2.16.840.1.113883.4.487.2.1.4 " + +" " + +" 20140909130101 " + +" " + +"OutPatientInfo " + +" " + +" MN20140909000009 " + +" " + +" Normal " + +" " + +" 1.0.0 " + +" " + +" " + +" " + +" 0021453778 " + +" ]]> " + +" " ++" " + +" " + +" " + +""; + try { + String result = CssdUtils.callWebService(wsUrl, soap, com.forgon.tools.Constants.CHARSET_UTF8); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return patientInfoVO; + } + + public static PatientInfoVO[] queryPatient(String type , String patientNumber){ + PatientInfoVO[] patientInfoVO = null; + try { + MessageRouteServiceSoapStub stub = new MessageRouteServiceSoapStub(new URL(wsUrl),new org.apache.axis.client.Service(new QName("http://www.gzsums.net//esb/", "sendMessageSync"))); + Request req = new Request(); + RequestHeader requestHeader = new RequestHeader(); + requestHeader.setMsgId(forgonSystemDomainId + "." + System.currentTimeMillis()); + requestHeader.setMsgPriority("Hight"); + requestHeader.setMsgVersion("1.0.0"); + requestHeader.setReceiver("2.16.840.1.113883.4.487.2.1.8"); + requestHeader.setRequestTime(Constants.SIMPLEDATEFORMATNOSPLIT_YYYYMMDDHHMMSS.format(new Date())); + requestHeader.setSender(forgonSystemDomainId); + + String requestBody = null; + if(PatientInfoVO.TYPE_CLINIC.equals(type)){ + requestHeader.setMsgType("OutPatientInfo"); + requestBody = "" + patientNumber + "2.16.840.1.113883.4.487.2.1.4.1"; + }else if(PatientInfoVO.TYPE_HOSPITAL.equals(type)){ + requestHeader.setMsgType("InPatientMainInfo"); + requestBody = "" + patientNumber + ""; + /*+ "2.16.840.1.113883.4.487.2.1.4.4" + + "病人姓名" + + "科室编码" + + "入院时间开始时间" + + "入院时间结束时间" + + "'状态 1',…,'状态n'";*/ + } + req.setRequestHeader(requestHeader); + req.setRequestBody(requestBody); + Response response = stub.sendMessageSync(req); + + String responseBody = response.getResponseBody(); + XMLSerializer xmlSerializer = new XMLSerializer(); + JSON listObject = xmlSerializer.read(responseBody); + + //返回的结果要根据类型为住院号或诊疗号的不同分开处理 + if(PatientInfoVO.TYPE_HOSPITAL.equals(type)){ + //...... + JSONArray inPatientInfoJsonArray = null; + JSONObject inPatientInfoJsonObject = null; + if(listObject instanceof JSONObject){ + inPatientInfoJsonObject = (JSONObject)listObject; + inPatientInfoJsonArray = new JSONArray(); + inPatientInfoJsonArray.add(inPatientInfoJsonObject.optJSONObject("InPatientMainInfo")); + }else if(listObject instanceof JSONArray){ + inPatientInfoJsonArray = new JSONArray(); + //只取最后一条记录 + JSONArray jsonArray = (JSONArray)listObject; + if(jsonArray.size() > 0){ + inPatientInfoJsonArray.add(jsonArray.optJSONObject(jsonArray.size()-1)); + } + }else{ + throw new RuntimeException("requestBody下级的list参数有误"); + } + + patientInfoVO = new PatientInfoVO[inPatientInfoJsonArray.size()]; + PatientInfoVO vo = null; + for(int i = 0;inPatientInfoJsonArray.size() > 0 && i < inPatientInfoJsonArray.size();i++){ + JSONObject inPatientInfoJson = inPatientInfoJsonArray.optJSONObject(i); + Object hospitalNumber = inPatientInfoJson.opt("PATIENT_NO"); + Object patientName = inPatientInfoJson.opt("NAME"); + Object patientSex = inPatientInfoJson.opt("SEX_CODE"); + Object doctorName = inPatientInfoJson.opt("CHARGE_DOC_NAME"); + Object patientArea = inPatientInfoJson.opt("NURSE_CELL_NAME"); + Object bedNumber = inPatientInfoJson.opt("BED_NO"); + Object inTimes = inPatientInfoJson.opt("IN_TIMES"); + Object ascriptionDepartment = inPatientInfoJson.opt("DEPT_NAME"); + Object birthday = inPatientInfoJson.opt("BIRTHDATE"); + + vo = new PatientInfoVO(); + vo.setPatientNumber(hospitalNumber instanceof String ? (String)hospitalNumber : ""); + vo.setHospitalNumber(hospitalNumber instanceof String ? (String)hospitalNumber : ""); + + vo.setPatientName(patientName instanceof String ? (String)patientName : ""); + if(patientSex != null){ + vo.setPatientSex(sexJsonObject.optString((String)patientSex, (String)patientSex)); + } + + vo.setPatientArea(patientArea instanceof String ? (String)patientArea : ""); + vo.setDoctorName(doctorName instanceof String ? (String)doctorName : ""); + vo.setVisitId(inTimes instanceof String ? Long.valueOf((String)inTimes) : null); + vo.setBedNumber(bedNumber instanceof String ? (String)bedNumber : ""); + if(StringUtils.isNotBlank(vo.getBedNumber()) && vo.getBedNumber().length() > 4){ + vo.setBedNumber(vo.getBedNumber().substring(bedNoPrefixDepartCodingLength)); + } + vo.setAscriptionDepartment(ascriptionDepartment instanceof String ? (String)ascriptionDepartment : ""); + + Date birthdayDate = null; + if(birthday instanceof String){ + birthdayDate = DateTools.parseDateIfNotEmpty((String)birthday, Constants.SIMPLEDATEFORMATNOSPLIT_YYYYMMDDHHMMSS, null); + if(birthdayDate == null){ + birthdayDate = DateTools.parseDateIfNotEmpty((String)birthday, Constants.SIMPLEDATEFORMATNOSPLIT_YYYYMMDD, null); + } + + } + if(birthdayDate != null){ + vo.setPatientAge(String.valueOf(DateTools.getCompareDate(Constants.SIMPLEDATEFORMAT_YYYYMMDD.format(birthdayDate), + Constants.SIMPLEDATEFORMAT_YYYYMMDD.format(new Date()), Constants.DATEFORMAT_YYYYMMDD)/365)); + } + patientInfoVO[i] = vo; + } + }else if(PatientInfoVO.TYPE_CLINIC.equals(type)){ + // + JSONArray outPatientInfoJsonArray = null; + JSONObject outPatientInfoJsonObject = null; + if(listObject instanceof JSONObject){ + outPatientInfoJsonObject = (JSONObject)listObject; + outPatientInfoJsonArray = new JSONArray(); + outPatientInfoJsonArray.add(outPatientInfoJsonObject.optJSONObject("OutPatientInfo")); + }else if(listObject instanceof JSONArray){ + outPatientInfoJsonArray = new JSONArray(); + //只取最后一条记录 + JSONArray jsonArray = (JSONArray)listObject; + if(jsonArray.size() > 0){ + outPatientInfoJsonArray.add(jsonArray.optJSONObject(jsonArray.size()-1)); + } + }else{ + throw new RuntimeException("requestBody下级的list参数有误"); + } + + patientInfoVO = new PatientInfoVO[outPatientInfoJsonArray.size()]; + PatientInfoVO vo = null; + for(int i = 0;outPatientInfoJsonArray.size() > 0 && i < outPatientInfoJsonArray.size();i++){ + JSONObject outPatientInfoJson = outPatientInfoJsonArray.optJSONObject(i); + Object clinicNumber = outPatientInfoJson.opt("MZH"); + Object patientName = outPatientInfoJson.opt("XM"); + Object patientIDCard = outPatientInfoJson.opt("SFZ"); + Object patientSex = outPatientInfoJson.opt("XB"); + Object doctorName = outPatientInfoJson.opt("YSXM"); + Object ascriptionDepartment = outPatientInfoJson.opt("KSM"); + Object birthday = outPatientInfoJson.opt("CSRQ"); + + vo = new PatientInfoVO(); + vo.setPatientNumber(clinicNumber instanceof String ? (String)clinicNumber : ""); + vo.setClinicNumber(clinicNumber instanceof String ? (String)clinicNumber : ""); + vo.setPatientName(patientName instanceof String ? (String)patientName : ""); + if(patientSex != null){ + vo.setPatientSex(sexJsonObject.optString((String)patientSex, (String)patientSex)); + } + vo.setPatientIDCard(patientIDCard instanceof String ? (String)patientIDCard : ""); + vo.setDoctorName(doctorName instanceof String ? (String)doctorName : ""); + vo.setAscriptionDepartment(ascriptionDepartment instanceof String ? (String)ascriptionDepartment : ""); + + Date birthdayDate = null; + if(birthday instanceof String){ + birthdayDate = DateTools.parseDateIfNotEmpty((String)birthday, Constants.SIMPLEDATEFORMATNOSPLIT_YYYYMMDDHHMMSS, null); + if(birthdayDate == null){ + birthdayDate = DateTools.parseDateIfNotEmpty((String)birthday, Constants.SIMPLEDATEFORMATNOSPLIT_YYYYMMDD, null); + } + + } + if(birthdayDate != null){ + vo.setPatientAge(String.valueOf(DateTools.getCompareDate(Constants.SIMPLEDATEFORMAT_YYYYMMDD.format(birthdayDate), + Constants.SIMPLEDATEFORMAT_YYYYMMDD.format(new Date()), Constants.DATEFORMAT_YYYYMMDD)/365)); + } + patientInfoVO[i] = vo; + } + } + + } catch (AxisFault e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }catch (Exception e) { + // TODO: handle exception + } + return patientInfoVO; + } +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/RequestHeader.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/RequestHeader.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/RequestHeader.java (revision 16433) @@ -0,0 +1,342 @@ +/** + * RequestHeader.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public class RequestHeader implements java.io.Serializable { + private java.lang.String sender; + + private java.lang.String receiver; + + private java.lang.String requestTime; + + private java.lang.String msgType; + + private java.lang.String msgId; + + private java.lang.String msgPriority; + + private java.lang.String msgVersion; + + public RequestHeader() { + } + + public RequestHeader( + java.lang.String sender, + java.lang.String receiver, + java.lang.String requestTime, + java.lang.String msgType, + java.lang.String msgId, + java.lang.String msgPriority, + java.lang.String msgVersion) { + this.sender = sender; + this.receiver = receiver; + this.requestTime = requestTime; + this.msgType = msgType; + this.msgId = msgId; + this.msgPriority = msgPriority; + this.msgVersion = msgVersion; + } + + + /** + * Gets the sender value for this RequestHeader. + * + * @return sender + */ + public java.lang.String getSender() { + return sender; + } + + + /** + * Sets the sender value for this RequestHeader. + * + * @param sender + */ + public void setSender(java.lang.String sender) { + this.sender = sender; + } + + + /** + * Gets the receiver value for this RequestHeader. + * + * @return receiver + */ + public java.lang.String getReceiver() { + return receiver; + } + + + /** + * Sets the receiver value for this RequestHeader. + * + * @param receiver + */ + public void setReceiver(java.lang.String receiver) { + this.receiver = receiver; + } + + + /** + * Gets the requestTime value for this RequestHeader. + * + * @return requestTime + */ + public java.lang.String getRequestTime() { + return requestTime; + } + + + /** + * Sets the requestTime value for this RequestHeader. + * + * @param requestTime + */ + public void setRequestTime(java.lang.String requestTime) { + this.requestTime = requestTime; + } + + + /** + * Gets the msgType value for this RequestHeader. + * + * @return msgType + */ + public java.lang.String getMsgType() { + return msgType; + } + + + /** + * Sets the msgType value for this RequestHeader. + * + * @param msgType + */ + public void setMsgType(java.lang.String msgType) { + this.msgType = msgType; + } + + + /** + * Gets the msgId value for this RequestHeader. + * + * @return msgId + */ + public java.lang.String getMsgId() { + return msgId; + } + + + /** + * Sets the msgId value for this RequestHeader. + * + * @param msgId + */ + public void setMsgId(java.lang.String msgId) { + this.msgId = msgId; + } + + + /** + * Gets the msgPriority value for this RequestHeader. + * + * @return msgPriority + */ + public java.lang.String getMsgPriority() { + return msgPriority; + } + + + /** + * Sets the msgPriority value for this RequestHeader. + * + * @param msgPriority + */ + public void setMsgPriority(java.lang.String msgPriority) { + this.msgPriority = msgPriority; + } + + + /** + * Gets the msgVersion value for this RequestHeader. + * + * @return msgVersion + */ + public java.lang.String getMsgVersion() { + return msgVersion; + } + + + /** + * Sets the msgVersion value for this RequestHeader. + * + * @param msgVersion + */ + public void setMsgVersion(java.lang.String msgVersion) { + this.msgVersion = msgVersion; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof RequestHeader)) return false; + RequestHeader other = (RequestHeader) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.sender==null && other.getSender()==null) || + (this.sender!=null && + this.sender.equals(other.getSender()))) && + ((this.receiver==null && other.getReceiver()==null) || + (this.receiver!=null && + this.receiver.equals(other.getReceiver()))) && + ((this.requestTime==null && other.getRequestTime()==null) || + (this.requestTime!=null && + this.requestTime.equals(other.getRequestTime()))) && + ((this.msgType==null && other.getMsgType()==null) || + (this.msgType!=null && + this.msgType.equals(other.getMsgType()))) && + ((this.msgId==null && other.getMsgId()==null) || + (this.msgId!=null && + this.msgId.equals(other.getMsgId()))) && + ((this.msgPriority==null && other.getMsgPriority()==null) || + (this.msgPriority!=null && + this.msgPriority.equals(other.getMsgPriority()))) && + ((this.msgVersion==null && other.getMsgVersion()==null) || + (this.msgVersion!=null && + this.msgVersion.equals(other.getMsgVersion()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getSender() != null) { + _hashCode += getSender().hashCode(); + } + if (getReceiver() != null) { + _hashCode += getReceiver().hashCode(); + } + if (getRequestTime() != null) { + _hashCode += getRequestTime().hashCode(); + } + if (getMsgType() != null) { + _hashCode += getMsgType().hashCode(); + } + if (getMsgId() != null) { + _hashCode += getMsgId().hashCode(); + } + if (getMsgPriority() != null) { + _hashCode += getMsgPriority().hashCode(); + } + if (getMsgVersion() != null) { + _hashCode += getMsgVersion().hashCode(); + } + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(RequestHeader.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "RequestHeader")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("sender"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "sender")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("receiver"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "receiver")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("requestTime"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "requestTime")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgType"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgType")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgId"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgId")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgPriority"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgPriority")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("msgVersion"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "msgVersion")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + } + + /** + * Return type metadata object + */ + public static org.apache.axis.description.TypeDesc getTypeDesc() { + return typeDesc; + } + + /** + * Get Custom Serializer + */ + public static org.apache.axis.encoding.Serializer getSerializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanSerializer( + _javaType, _xmlType, typeDesc); + } + + /** + * Get Custom Deserializer + */ + public static org.apache.axis.encoding.Deserializer getDeserializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanDeserializer( + _javaType, _xmlType, typeDesc); + } + +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/FindPatientInfoByHospitalNumDaoImpl.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/FindPatientInfoByHospitalNumDaoImpl.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/FindPatientInfoByHospitalNumDaoImpl.java (revision 16433) @@ -0,0 +1,37 @@ +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy; + +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; + +import org.apache.log4j.Logger; + +import com.forgon.disinfectsystem.common.CssdUtils; +import com.forgon.disinfectsystem.datasynchronization.dao.FindPatientInfoByHospitalNumDao; +import com.forgon.disinfectsystem.datasynchronization.model.PatientInfoVO; +import com.forgon.tools.Constants; + +/** + * 根据住院号查询病人信息(东莞东华医院) + * @author shuyongfu + * + */ +public class FindPatientInfoByHospitalNumDaoImpl implements + FindPatientInfoByHospitalNumDao { + + Logger logger = Logger.getLogger(FindPatientInfoByHospitalNumDaoImpl.class); + + /** + * 根据住院号查询病人信息 + */ + @Override + public PatientInfoVO[] findPatientInfoByHospitalNum(String hospitalNum) { + PatientInfoVO[] patientInfoVOArray = null; + try{ + patientInfoVOArray = WebServiceClientHelper.queryPatient(PatientInfoVO.TYPE_HOSPITAL, hospitalNum); + }catch(Exception e){ + logger.error("根据住院号查询病人信息失败" + e); + } + return patientInfoVOArray; + } + +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/Request.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/Request.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/Request.java (revision 16433) @@ -0,0 +1,157 @@ +/** + * Request.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +public class Request implements java.io.Serializable { + private RequestHeader requestHeader; + + private java.lang.String requestBody; + + public Request() { + } + + public Request( + RequestHeader requestHeader, + java.lang.String requestBody) { + this.requestHeader = requestHeader; + this.requestBody = requestBody; + } + + + /** + * Gets the requestHeader value for this Request. + * + * @return requestHeader + */ + public RequestHeader getRequestHeader() { + return requestHeader; + } + + + /** + * Sets the requestHeader value for this Request. + * + * @param requestHeader + */ + public void setRequestHeader(RequestHeader requestHeader) { + this.requestHeader = requestHeader; + } + + + /** + * Gets the requestBody value for this Request. + * + * @return requestBody + */ + public java.lang.String getRequestBody() { + return requestBody; + } + + + /** + * Sets the requestBody value for this Request. + * + * @param requestBody + */ + public void setRequestBody(java.lang.String requestBody) { + this.requestBody = requestBody; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof Request)) return false; + Request other = (Request) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.requestHeader==null && other.getRequestHeader()==null) || + (this.requestHeader!=null && + this.requestHeader.equals(other.getRequestHeader()))) && + ((this.requestBody==null && other.getRequestBody()==null) || + (this.requestBody!=null && + this.requestBody.equals(other.getRequestBody()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getRequestHeader() != null) { + _hashCode += getRequestHeader().hashCode(); + } + if (getRequestBody() != null) { + _hashCode += getRequestBody().hashCode(); + } + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(Request.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "Request")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("requestHeader"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "requestHeader")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "RequestHeader")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("requestBody"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "requestBody")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + } + + /** + * Return type metadata object + */ + public static org.apache.axis.description.TypeDesc getTypeDesc() { + return typeDesc; + } + + /** + * Get Custom Serializer + */ + public static org.apache.axis.encoding.Serializer getSerializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanSerializer( + _javaType, _xmlType, typeDesc); + } + + /** + * Get Custom Deserializer + */ + public static org.apache.axis.encoding.Deserializer getDeserializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanDeserializer( + _javaType, _xmlType, typeDesc); + } + +} Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceLocator.java =================================================================== diff -u --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceLocator.java (revision 0) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/webservice/client/net/gzsums/www/esb/MessageRouteServiceLocator.java (revision 16433) @@ -0,0 +1,145 @@ +/** + * MessageRouteServiceLocator.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package com.forgon.disinfectsystem.datasynchronization.dao.zsyy.webservice.client.net.gzsums.www.esb; + +import com.forgon.disinfectsystem.datasynchronization.dao.zsyy.WebServiceClientHelper; + +public class MessageRouteServiceLocator extends org.apache.axis.client.Service implements MessageRouteService { + + public MessageRouteServiceLocator() { + } + + + public MessageRouteServiceLocator(org.apache.axis.EngineConfiguration config) { + super(config); + } + + public MessageRouteServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { + super(wsdlLoc, sName); + } + + // Use to get a proxy class for MessageRouteServiceSoap + //private java.lang.String MessageRouteServiceSoap_address = "http://localhost:17696/MessageRouteService.asmx"; + private java.lang.String MessageRouteServiceSoap_address = WebServiceClientHelper.wsUrl; + + public java.lang.String getMessageRouteServiceSoapAddress() { + return MessageRouteServiceSoap_address; + } + + // The WSDD service name defaults to the port name. + private java.lang.String MessageRouteServiceSoapWSDDServiceName = "MessageRouteServiceSoap"; + + public java.lang.String getMessageRouteServiceSoapWSDDServiceName() { + return MessageRouteServiceSoapWSDDServiceName; + } + + public void setMessageRouteServiceSoapWSDDServiceName(java.lang.String name) { + MessageRouteServiceSoapWSDDServiceName = name; + } + + public MessageRouteServiceSoap getMessageRouteServiceSoap() throws javax.xml.rpc.ServiceException { + java.net.URL endpoint; + try { + endpoint = new java.net.URL(MessageRouteServiceSoap_address); + } + catch (java.net.MalformedURLException e) { + throw new javax.xml.rpc.ServiceException(e); + } + return getMessageRouteServiceSoap(endpoint); + } + + public MessageRouteServiceSoap getMessageRouteServiceSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { + try { + MessageRouteServiceSoapStub _stub = new MessageRouteServiceSoapStub(portAddress, this); + _stub.setPortName(getMessageRouteServiceSoapWSDDServiceName()); + return _stub; + } + catch (org.apache.axis.AxisFault e) { + return null; + } + } + + public void setMessageRouteServiceSoapEndpointAddress(java.lang.String address) { + MessageRouteServiceSoap_address = address; + } + + /** + * For the given interface, get the stub implementation. + * If this service has no port for the given interface, + * then ServiceException is thrown. + */ + public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { + try { + if (MessageRouteServiceSoap.class.isAssignableFrom(serviceEndpointInterface)) { + MessageRouteServiceSoapStub _stub = new MessageRouteServiceSoapStub(new java.net.URL(MessageRouteServiceSoap_address), this); + _stub.setPortName(getMessageRouteServiceSoapWSDDServiceName()); + return _stub; + } + } + catch (java.lang.Throwable t) { + throw new javax.xml.rpc.ServiceException(t); + } + throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); + } + + /** + * For the given interface, get the stub implementation. + * If this service has no port for the given interface, + * then ServiceException is thrown. + */ + public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { + if (portName == null) { + return getPort(serviceEndpointInterface); + } + java.lang.String inputPortName = portName.getLocalPart(); + if ("MessageRouteServiceSoap".equals(inputPortName)) { + return getMessageRouteServiceSoap(); + } + else { + java.rmi.Remote _stub = getPort(serviceEndpointInterface); + ((org.apache.axis.client.Stub) _stub).setPortName(portName); + return _stub; + } + } + + public javax.xml.namespace.QName getServiceName() { + return new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "MessageRouteService"); + } + + private java.util.HashSet ports = null; + + public java.util.Iterator getPorts() { + if (ports == null) { + ports = new java.util.HashSet(); + ports.add(new javax.xml.namespace.QName("http://www.gzsums.net//esb/", "MessageRouteServiceSoap")); + } + return ports.iterator(); + } + + /** + * Set the endpoint address for the specified port name. + */ + public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { + +if ("MessageRouteServiceSoap".equals(portName)) { + setMessageRouteServiceSoapEndpointAddress(address); + } + else +{ // Unknown Port Name + throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); + } + } + + /** + * Set the endpoint address for the specified port name. + */ + public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { + setEndpointAddress(portName.getLocalPart(), address); + } + +}