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");