From e6dbca7432f73ab3707f3ae626662858bc457d84 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Oct 2022 23:10:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=BB=E4=BA=A1=20=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=20=E6=98=AF=E9=94=99=E8=AF=AF=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/utils/YtHsResUtils.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YtHsResUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YtHsResUtils.java index 9a4ac14de1..9010c9b84a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YtHsResUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YtHsResUtils.java @@ -63,7 +63,7 @@ public class YtHsResUtils { } } } catch (Exception e) { - log.error(String.format("烟台核酸检测结果查询异常cardNo:%s,异常信息:%s", cardNo, e.getMessage())); + log.error(String.format("烟台核酸检测结果查询异常cardNo:%s", cardNo), e); } YtHscyResDTO resultResult = new YtHscyResDTO(); resultResult.setData(new ArrayList<>()); @@ -106,7 +106,7 @@ public class YtHsResUtils { } } catch (Exception e) { - log.error(String.format("烟台核酸检测结果查询异常cardNo:%s,异常信息:%s", cardNo, e.getMessage())); + log.error(String.format("烟台核酸检测结果查询异常cardNo:%s", cardNo), e); } YtHsjcResDTO resultResult = new YtHsjcResDTO(); resultResult.setData(new ArrayList<>()); @@ -154,7 +154,7 @@ public class YtHsResUtils { //第一层 JSONObject secondData = JSON.parseObject(firstData.getString("data")); Object thirdData = ""; - if (secondData != null && secondData.getJSONArray("data") != null) { + if (secondData != null && secondData.getJSONArray("data") != null && secondData.getJSONArray("data").size() >0 ) { //第二层 data thirdData = secondData.getJSONArray("data").get(0); } @@ -166,7 +166,7 @@ public class YtHsResUtils { log.warn("siWang 调用蓝图接口败"); } } catch (Exception e) { - log.error(String.format("烟台siWang结果查询异常cardNo:%s,异常信息:%s", cardNo, e.getMessage())); + log.error(String.format("烟台siWang结果查询异常cardNo:%s", cardNo), e); } return new YtDataSyncResDTO(); } @@ -221,15 +221,15 @@ public class YtHsResUtils { } } catch (Exception e) { - log.error(String.format("烟台canji结果查询异常cardNo:%s,异常信息:%s", idCard, e.getMessage())); + log.error(String.format("烟台canji结果查询异常cardNo:%s,异常信息:%s", idCard), e); } return failResult; } public static void main(String[] args) { - YtDataSyncResDTO canji = canji("123", "123"); - System.out.println("残疾结果:" + JSON.toJSON(canji)); + //YtDataSyncResDTO canji = canji("123", "123"); + //System.out.println("残疾结果:" + JSON.toJSON(canji)); YtDataSyncResDTO siwang = siWang("1213", "!23");