Zhaops 6 gadi atpakaļ
vecāks
revīzija
b5b1e976e9

+ 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不匹配");
         }