Browse Source

代码优化

gaodm 5 years atrás
parent
commit
cccb461ca6
1 changed files with 12 additions and 2 deletions
  1. 12 2
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

+ 12 - 2
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -359,7 +359,12 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         //  调用质控接口
         Response<OutputInfo> response = qcServiceClient.extract(queryVo);
         if (response == null || response.getData() == null) {
-            throw new CommonException(CommonErrorCode.RPC_ERROR, "远程质控接口没有返回数据!【" + analyzeVO.getBehospitalCode() + "】");
+            if (null == response) {
+                throw new CommonException(CommonErrorCode.RPC_ERROR, "远程质控接口没有返回数据!【" + analyzeVO.getBehospitalCode() + "】");
+            } else {
+                throw new CommonException(CommonErrorCode.RPC_ERROR,
+                        "远程质控接口没有返回数据!【" + analyzeVO.getBehospitalCode() + "】错误原因:" + response.getMsg());
+            }
         }
         OutputInfo outputInfo = response.getData();
         //根据质控结果获取质控条目
@@ -845,7 +850,12 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         //  调用质控接口
         Response<OutputInfo> response = qcServiceClient.extract(queryVo);
         if (response == null || response.getData() == null) {
-            throw new CommonException(CommonErrorCode.RPC_ERROR, "远程质控接口没有返回数据!");
+            if (null == response) {
+                throw new CommonException(CommonErrorCode.RPC_ERROR, "远程质控接口没有返回数据!【" + analyzeVO.getBehospitalCode() + "】");
+            } else {
+                throw new CommonException(CommonErrorCode.RPC_ERROR,
+                        "远程质控接口没有返回数据!【" + analyzeVO.getBehospitalCode() + "】错误原因:" + response.getMsg());
+            }
         }
         OutputInfo outputInfo = response.getData();
         //根据质控结果获取质控条目