浏览代码

bug修改

Zhaops 6 年之前
父节点
当前提交
b5b1e976e9
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      icss-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

+ 3 - 0
icss-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

@@ -52,6 +52,9 @@ public class TreatmentFacade {
         if (disease == null) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "诊断不存在");
         }
+        if (treatmentMap.size() == 0) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "未找到治疗方案");
+        }
         if (!treatmentMap.containsKey(disease.getTagName())) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "诊断名称和id不匹配");
         }