diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThirdAliDrugController.java b/src/main/java/com/glxp/api/controller/thrsys/ThirdAliDrugController.java index ac7e96da..33018c83 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThirdAliDrugController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThirdAliDrugController.java @@ -111,6 +111,7 @@ public class ThirdAliDrugController extends BaseController { } } catch (Exception e) { + e.printStackTrace(); log.info("供应商平台获取阿里和国家库码段信息出现错误===" + e.getMessage()); } diff --git a/src/main/java/com/glxp/api/res/alihealth/AlihealthKytDrugrescodeResponse.java b/src/main/java/com/glxp/api/res/alihealth/AlihealthKytDrugrescodeResponse.java index 45b7b47c..b87e6585 100644 --- a/src/main/java/com/glxp/api/res/alihealth/AlihealthKytDrugrescodeResponse.java +++ b/src/main/java/com/glxp/api/res/alihealth/AlihealthKytDrugrescodeResponse.java @@ -23,17 +23,23 @@ public class AlihealthKytDrugrescodeResponse extends AlihealthKytCommonParameter private Integer page; private Integer page_size; public boolean judgeCall(String manufactory){ - List jsonArray = (List) this.getDrug_table_dto(); boolean bo = false; - if (jsonArray != null && jsonArray.size() > 0) { - for (JSONObject jsonObject : jsonArray) { - String entName = jsonObject.getStr("ent_name"); - if(manufactory.replaceAll("\\(", "(").replace(")", ")") - .equals(entName.replaceAll("\\(", "(").replace(")", ")"))){ - bo = true; + + if(StringUtils.isNotEmpty(manufactory)){ + List jsonArray = (List) this.getDrug_table_dto(); + if (jsonArray != null && jsonArray.size() > 0) { + for (JSONObject jsonObject : jsonArray) { + String entName = jsonObject.getStr("ent_name"); + if(manufactory.replaceAll("\\(", "(").replace(")", ")") + .equals(entName.replaceAll("\\(", "(").replace(")", ")"))){ + bo = true; + } } } + }else { + bo = true; } + if(org.apache.commons.lang.StringUtils.isNotEmpty(this.getMsg_info()) && this.getMsg_info().equals("调用成功") && bo){ return true; }