Ver Fonte

删除不用的代码

lihong há 5 meses atrás
pai
commit
bed5727274

+ 0 - 21
src/main/java/cn/hnthyy/thmz/webservice/CriticalWebService.java

@@ -1,21 +0,0 @@
-package cn.hnthyy.thmz.webservice;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-
-/**
- * 危急值信息接收服务
- */
-//使用@WebService注解标注WebServiceI接口
-@WebService
-public interface CriticalWebService {
-    /**
-     * 接收危急值
-     * @param accessToken
-     * @param msg 消息体
-     * @return
-     */
-    @WebMethod
-    String criticalAccept(String accessToken ,String msg);
-}

+ 0 - 95
src/main/java/cn/hnthyy/thmz/webservice/impl/CriticalWebServiceImpl.java

@@ -1,95 +0,0 @@
-package cn.hnthyy.thmz.webservice.impl;
-
-import cn.hnthyy.thmz.Utils.HttpUtil;
-import cn.hnthyy.thmz.mapper.his.zd.ZdDeptAllMapper;
-import cn.hnthyy.thmz.webservice.CriticalWebService;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.json.JSONObject;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.net.URLEncoder;
-import java.util.*;
-
-@Slf4j
-//@WebService
-@Service
-public class CriticalWebServiceImpl implements CriticalWebService {
-    private String token = "oI9#ur02cbBHdop87e6Y728Ax30IIlgd";
-    @SuppressWarnings("all")
-    @Autowired
-    private ZdDeptAllMapper zdDeptAllMapper;
-
-    @Value("${wxPayOrderServiceUrl}")
-    private String wxPayOrderServiceUrl;
-
-    @Override
-    public String criticalAccept(String accessToken, String msg) {
-        log.info("收到危急值信息:----->" + msg + "<-------");
-        Map<String, String> resultMap = new HashMap<>();
-        if (StringUtils.isBlank(accessToken)) {
-            resultMap.put("Code", "false");
-            resultMap.put("Message", "token不能为空");
-            log.error("token不能为空");
-            JSONObject jsonObj = new JSONObject(resultMap);
-            return jsonObj.toString();
-        }
-        if (StringUtils.isBlank(msg)) {
-            resultMap.put("Code", "false");
-            resultMap.put("Message", "msg为空");
-            log.error("msg为空");
-            JSONObject jsonObj = new JSONObject(resultMap);
-            return jsonObj.toString();
-        }
-        if (!token.equals(accessToken)) {
-            resultMap.put("Code", "false");
-            resultMap.put("Message", "token校验失败");
-            log.error("token校验失败");
-            JSONObject jsonObj = new JSONObject(resultMap);
-            return jsonObj.toString();
-        }
-
-        JSONObject myJsonObject = new JSONObject(msg);
-        String targetDeptCode = myJsonObject.getString("TargetDeptCode");
-        if (StringUtils.isBlank(targetDeptCode)) {
-            resultMap.put("Code", "false");
-            resultMap.put("Message", "目标科室为空");
-            log.error("目标科室为空");
-            JSONObject jsonObj = new JSONObject(resultMap);
-            return jsonObj.toString();
-        }
-        String content = myJsonObject.getString("Content");
-        if (StringUtils.isBlank(content)) {
-            resultMap.put("Code", "false");
-            resultMap.put("Message", "消息内容为空");
-            log.error("消息内容为空");
-            JSONObject jsonObj = new JSONObject(resultMap);
-            return jsonObj.toString();
-        }
-        acceptCriticalValues(msg);
-        resultMap.put("Code", "true");
-        resultMap.put("Message", "");
-        JSONObject jsonObj = new JSONObject(resultMap);
-        return jsonObj.toString();
-    }
-
-
-    /**
-     * 向住院系统推送危急值
-     * @param message
-     */
-    private void acceptCriticalValues(String message){
-        if(StringUtils.isBlank(message)){
-            return;
-        }
-        try {
-            HttpUtil.sendHttpGet(wxPayOrderServiceUrl+"/criticalValue/acceptCriticalValues" +
-                    "?message=" + URLEncoder.encode(message, "UTF-8"), "utf-8", 3000);
-        } catch (Exception e) {
-            e.printStackTrace();
-            log.error("向住院系统推送危急值失败!");
-        }
-    }
-}

+ 0 - 111
src/main/java/cn/hnthyy/thmz/webservice/lis/CriticalMessageService.java

@@ -1,111 +0,0 @@
-package cn.hnthyy.thmz.webservice.lis;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebEndpoint;
-import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.Service;
-
-/**
- * This class was generated by Apache CXF 3.3.6
- * 2020-05-25T16:35:58.619+08:00
- * Generated source version: 3.3.6
- *
- */
-@WebServiceClient(name = "CriticalMessageService",
-                  wsdlLocation = "wsdl/CriticalMessageService.wsdl",
-                  targetNamespace = "http://www.hnthyy.cn")
-public class CriticalMessageService extends Service {
-
-    public final static URL WSDL_LOCATION;
-
-    public final static QName SERVICE = new QName("http://www.hnthyy.cn", "CriticalMessageService");
-    public final static QName CriticalMessageServiceSoap12 = new QName("http://www.hnthyy.cn", "CriticalMessageServiceSoap12");
-    public final static QName CriticalMessageServiceSoap = new QName("http://www.hnthyy.cn", "CriticalMessageServiceSoap");
-    static {
-        URL url = null;
-        try {
-            url = new URL("wsdl/CriticalMessageService.wsdl");
-        } catch (MalformedURLException e) {
-            java.util.logging.Logger.getLogger(CriticalMessageService.class.getName())
-                .log(java.util.logging.Level.INFO,
-                     "Can not initialize the default wsdl from {0}", "wsdl/CriticalMessageService.wsdl");
-        }
-        WSDL_LOCATION = url;
-    }
-
-    public CriticalMessageService(URL wsdlLocation) {
-        super(wsdlLocation, SERVICE);
-    }
-
-    public CriticalMessageService(URL wsdlLocation, QName serviceName) {
-        super(wsdlLocation, serviceName);
-    }
-
-    public CriticalMessageService() {
-        super(WSDL_LOCATION, SERVICE);
-    }
-
-    public CriticalMessageService(WebServiceFeature ... features) {
-        super(WSDL_LOCATION, SERVICE, features);
-    }
-
-    public CriticalMessageService(URL wsdlLocation, WebServiceFeature ... features) {
-        super(wsdlLocation, SERVICE, features);
-    }
-
-    public CriticalMessageService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
-        super(wsdlLocation, serviceName, features);
-    }
-
-
-
-
-    /**
-     *
-     * @return
-     *     returns CriticalMessageServiceSoap
-     */
-    @WebEndpoint(name = "CriticalMessageServiceSoap12")
-    public CriticalMessageServiceSoap getCriticalMessageServiceSoap12() {
-        return super.getPort(CriticalMessageServiceSoap12, CriticalMessageServiceSoap.class);
-    }
-
-    /**
-     *
-     * @param features
-     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
-     * @return
-     *     returns CriticalMessageServiceSoap
-     */
-    @WebEndpoint(name = "CriticalMessageServiceSoap12")
-    public CriticalMessageServiceSoap getCriticalMessageServiceSoap12(WebServiceFeature... features) {
-        return super.getPort(CriticalMessageServiceSoap12, CriticalMessageServiceSoap.class, features);
-    }
-
-
-    /**
-     *
-     * @return
-     *     returns CriticalMessageServiceSoap
-     */
-    @WebEndpoint(name = "CriticalMessageServiceSoap")
-    public CriticalMessageServiceSoap getCriticalMessageServiceSoap() {
-        return super.getPort(CriticalMessageServiceSoap, CriticalMessageServiceSoap.class);
-    }
-
-    /**
-     *
-     * @param features
-     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
-     * @return
-     *     returns CriticalMessageServiceSoap
-     */
-    @WebEndpoint(name = "CriticalMessageServiceSoap")
-    public CriticalMessageServiceSoap getCriticalMessageServiceSoap(WebServiceFeature... features) {
-        return super.getPort(CriticalMessageServiceSoap, CriticalMessageServiceSoap.class, features);
-    }
-
-}

+ 0 - 35
src/main/java/cn/hnthyy/thmz/webservice/lis/CriticalMessageServiceSoap.java

@@ -1,35 +0,0 @@
-package cn.hnthyy.thmz.webservice.lis;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-
-/**
- * This class was generated by Apache CXF 3.3.6
- * 2020-05-25T16:35:58.611+08:00
- * Generated source version: 3.3.6
- *
- */
-@WebService(targetNamespace = "http://www.hnthyy.cn", name = "CriticalMessageServiceSoap")
-@XmlSeeAlso({ObjectFactory.class})
-public interface CriticalMessageServiceSoap {
-
-    /**
-     * 消息接收服务
-     */
-    @WebMethod(operationName = "ReceiveMessage", action = "http://www.hnthyy.cn/ReceiveMessage")
-    @RequestWrapper(localName = "ReceiveMessage", targetNamespace = "http://www.hnthyy.cn", className = "cn.hnthyy.ReceiveMessage")
-    @ResponseWrapper(localName = "ReceiveMessageResponse", targetNamespace = "http://www.hnthyy.cn", className = "cn.hnthyy.ReceiveMessageResponse")
-    @WebResult(name = "return", targetNamespace = "http://www.hnthyy.cn")
-    public java.lang.String receiveMessage(
-
-        @WebParam(name = "accessToken", targetNamespace = "http://www.hnthyy.cn")
-        java.lang.String accessToken,
-        @WebParam(name = "msg", targetNamespace = "http://www.hnthyy.cn")
-        java.lang.String msg
-    );
-}

+ 0 - 52
src/main/java/cn/hnthyy/thmz/webservice/lis/CriticalMessageServiceSoap12Impl.java

@@ -1,52 +0,0 @@
-
-/**
- * Please modify this class to meet your needs
- * This class is not complete
- */
-
-package cn.hnthyy.thmz.webservice.lis;
-
-import java.util.logging.Logger;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-
-/**
- * This class was generated by Apache CXF 3.3.6
- * 2020-05-25T16:35:58.557+08:00
- * Generated source version: 3.3.6
- *
- */
-
-@javax.jws.WebService(
-                      serviceName = "CriticalMessageService",
-                      portName = "CriticalMessageServiceSoap12",
-                      targetNamespace = "http://www.hnthyy.cn",
-                      wsdlLocation = "wsdl/CriticalMessageService.wsdl",
-                      endpointInterface = "cn.hnthyy.thmz.webservice.lis.CriticalMessageServiceSoap")
-
-public class CriticalMessageServiceSoap12Impl implements CriticalMessageServiceSoap {
-
-    private static final Logger LOG = Logger.getLogger(CriticalMessageServiceSoap12Impl.class.getName());
-
-    /* (non-Javadoc)
-     * @see cn.hnthyy.CriticalMessageServiceSoap#receiveMessage(java.lang.String accessToken, java.lang.String msg)*
-     */
-    public java.lang.String receiveMessage(java.lang.String accessToken, java.lang.String msg) {
-        LOG.info("Executing operation receiveMessage");
-        System.out.println(accessToken);
-        System.out.println(msg);
-        try {
-            java.lang.String _return = "";
-            return _return;
-        } catch (java.lang.Exception ex) {
-            ex.printStackTrace();
-            throw new RuntimeException(ex);
-        }
-    }
-
-}

+ 0 - 48
src/main/java/cn/hnthyy/thmz/webservice/lis/CriticalMessageServiceSoapImpl.java

@@ -1,48 +0,0 @@
-
-/**
- * Please modify this class to meet your needs
- * This class is not complete
- */
-
-package cn.hnthyy.thmz.webservice.lis;
-
-import cn.hnthyy.thmz.Utils.SpringBeanUtils;
-import cn.hnthyy.thmz.webservice.CriticalWebService;
-import cn.hnthyy.thmz.webservice.impl.CriticalWebServiceImpl;
-
-import java.util.logging.Logger;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-
-/**
- * This class was generated by Apache CXF 3.3.6
- * 2020-05-25T16:35:58.599+08:00
- * Generated source version: 3.3.6
- *
- */
-
-@javax.jws.WebService(
-                      serviceName = "CriticalMessageService",
-                      portName = "CriticalMessageServiceSoap",
-                      targetNamespace = "http://www.hnthyy.cn",
-                      wsdlLocation = "wsdl/CriticalMessageService.wsdl",
-                      endpointInterface = "cn.hnthyy.thmz.webservice.lis.CriticalMessageServiceSoap")
-
-public class CriticalMessageServiceSoapImpl implements CriticalMessageServiceSoap {
-    CriticalWebService criticalWebService =(CriticalWebServiceImpl)SpringBeanUtils.getBean(CriticalWebServiceImpl.class);
-    private static final Logger LOG = Logger.getLogger(CriticalMessageServiceSoapImpl.class.getName());
-
-    /* (non-Javadoc)
-     * @see cn.hnthyy.CriticalMessageServiceSoap#receiveMessage(java.lang.String accessToken, java.lang.String msg)*
-     */
-    public java.lang.String receiveMessage(java.lang.String accessToken, java.lang.String msg) {
-        LOG.info("Executing operation receiveMessage");
-       return criticalWebService.criticalAccept(accessToken,msg);
-    }
-
-}

+ 0 - 48
src/main/java/cn/hnthyy/thmz/webservice/lis/ObjectFactory.java

@@ -1,48 +0,0 @@
-
-package cn.hnthyy.thmz.webservice.lis;
-
-import javax.xml.bind.annotation.XmlRegistry;
-
-
-/**
- * This object contains factory methods for each 
- * Java content interface and Java element interface 
- * generated in the cn.hnthyy package. 
- * <p>An ObjectFactory allows you to programatically 
- * construct new instances of the Java representation 
- * for XML content. The Java representation of XML 
- * content can consist of schema derived interfaces 
- * and classes representing the binding of schema 
- * type definitions, element declarations and model 
- * groups.  Factory methods for each of these are 
- * provided in this class.
- * 
- */
-@XmlRegistry
-public class ObjectFactory {
-
-
-    /**
-     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: cn.hnthyy
-     * 
-     */
-    public ObjectFactory() {
-    }
-
-    /**
-     * Create an instance of {@link ReceiveMessage }
-     * 
-     */
-    public ReceiveMessage createReceiveMessage() {
-        return new ReceiveMessage();
-    }
-
-    /**
-     * Create an instance of {@link ReceiveMessageResponse }
-     * 
-     */
-    public ReceiveMessageResponse createReceiveMessageResponse() {
-        return new ReceiveMessageResponse();
-    }
-
-}

+ 0 - 89
src/main/java/cn/hnthyy/thmz/webservice/lis/ReceiveMessage.java

@@ -1,89 +0,0 @@
-
-package cn.hnthyy.thmz.webservice.lis;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>anonymous complex type�� Java �ࡣ
- * 
- * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
- * 
- * <pre>
- * &lt;complexType&gt;
- *   &lt;complexContent&gt;
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
- *       &lt;sequence&gt;
- *         &lt;element name="accessToken" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
- *         &lt;element name="msg" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
- *       &lt;/sequence&gt;
- *     &lt;/restriction&gt;
- *   &lt;/complexContent&gt;
- * &lt;/complexType&gt;
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
-    "accessToken",
-    "msg"
-})
-@XmlRootElement(name = "ReceiveMessage")
-public class ReceiveMessage {
-
-    protected String accessToken;
-    protected String msg;
-
-    /**
-     * ��ȡaccessToken���Ե�ֵ��
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getAccessToken() {
-        return accessToken;
-    }
-
-    /**
-     * ����accessToken���Ե�ֵ��
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setAccessToken(String value) {
-        this.accessToken = value;
-    }
-
-    /**
-     * ��ȡmsg���Ե�ֵ��
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getMsg() {
-        return msg;
-    }
-
-    /**
-     * ����msg���Ե�ֵ��
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setMsg(String value) {
-        this.msg = value;
-    }
-
-}

+ 0 - 64
src/main/java/cn/hnthyy/thmz/webservice/lis/ReceiveMessageResponse.java

@@ -1,64 +0,0 @@
-
-package cn.hnthyy.thmz.webservice.lis;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>anonymous complex type�� Java �ࡣ
- * 
- * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
- * 
- * <pre>
- * &lt;complexType&gt;
- *   &lt;complexContent&gt;
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
- *       &lt;sequence&gt;
- *         &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
- *       &lt;/sequence&gt;
- *     &lt;/restriction&gt;
- *   &lt;/complexContent&gt;
- * &lt;/complexType&gt;
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
-    "_return"
-})
-@XmlRootElement(name = "ReceiveMessageResponse")
-public class ReceiveMessageResponse {
-
-    @XmlElement(name = "return")
-    protected String _return;
-
-    /**
-     * ��ȡreturn���Ե�ֵ��
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getReturn() {
-        return _return;
-    }
-
-    /**
-     * ����return���Ե�ֵ��
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setReturn(String value) {
-        this._return = value;
-    }
-
-}

+ 0 - 2
src/main/java/cn/hnthyy/thmz/webservice/lis/package-info.java

@@ -1,2 +0,0 @@
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.hnthyy.cn", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package cn.hnthyy.thmz.webservice.lis;