From 8fd6e95bab3d82e387c944e891f7221f6541ceba Mon Sep 17 00:00:00 2001 From: qiuyt Date: Wed, 18 Dec 2024 20:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E5=85=A5=E8=8D=AF=E5=93=81=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E7=94=9F=E4=BA=A7=E5=8E=82=E5=AE=B6=E5=AF=B9=E7=85=A7?= =?UTF-8?q?=E6=9F=A5=E4=B8=8D=E5=88=B0=E5=B0=B1=E6=94=B9=E6=8B=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thrsys/ThirdAliDrugController.java | 1 + .../AlihealthKytDrugrescodeResponse.java | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) 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; }