hzp 8 anni fa
parent
commit
9586ea92da

+ 40 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/GuahaoXMService.java

@ -95,6 +95,10 @@ public class GuahaoXMService implements IGuahaoService {
                // 调用失败
                throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
            }
            else if (StringUtils.startsWith(xml, "Error")) {
                // 调用失败
                throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
            }
            Document document = DocumentHelper.parseText(xml);
            Element root = document.getRootElement();
            List<?> child = root.elements();
@ -137,6 +141,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
        List<?> child = root.elements();
@ -192,6 +200,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
        List<?> child = root.elements();
@ -285,6 +297,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
        List<?> child = root.elements();
@ -375,6 +391,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
        List<?> child = root.elements();
@ -548,6 +568,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        if (xml.toLowerCase().startsWith("ok")) {
            return true;
        } else {
@ -589,6 +613,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
        List<?> child = root.elements();
@ -685,6 +713,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
@ -764,6 +796,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
        List<?> child = root.elements();
@ -872,6 +908,10 @@ public class GuahaoXMService implements IGuahaoService {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        else if (StringUtils.startsWith(xml, "Error")) {
            // 调用失败
            throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
        }
        Document document = DocumentHelper.parseText(xml);
        Element root = document.getRootElement();
        List<?> child = root.elements();

+ 3 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/archives/PatientArchivesController.java

@ -193,6 +193,9 @@ public class PatientArchivesController extends WeixinBaseController {
            if (result != null) {
                url = result.get("fileUrl").toString().replaceAll("\"", "");
            }
            else{
                return write(-1, "图片上传失败!");
            }
            return write(200, "图片上传成功!","url", url);
        } catch (Exception e) {