浏览代码

治疗方案没有药品推荐不展示

zhaops 5 年之前
父节点
当前提交
83ff126658
共有 1 个文件被更改,包括 6 次插入14 次删除
  1. 6 14
      aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

+ 6 - 14
aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

@@ -74,7 +74,8 @@ public class TreatmentFacade {
         List<AdverseReaction> adverseReactionList = treat.getAdverseEvent();
         List<AdverseReaction> adverseReactionList = treat.getAdverseEvent();
 
 
         if (ListUtil.isNotEmpty(treatmentPlanList)) {
         if (ListUtil.isNotEmpty(treatmentPlanList)) {
-            for (TreatmentPlan treatmentPlan : treatmentPlanList) {
+            for (int index = 0; index < treatmentPlanList.size(); index++) {
+                TreatmentPlan treatmentPlan = treatmentPlanList.get(index);
                 List<MeditionDetail> meditionDetailList = treatmentPlan.getMeditionDetails();
                 List<MeditionDetail> meditionDetailList = treatmentPlan.getMeditionDetails();
                 if (ListUtil.isNotEmpty(meditionDetailList)) {
                 if (ListUtil.isNotEmpty(meditionDetailList)) {
                     for (MeditionDetail meditionDetail : meditionDetailList) {
                     for (MeditionDetail meditionDetail : meditionDetailList) {
@@ -107,23 +108,14 @@ public class TreatmentFacade {
                                     .collect(Collectors.toList());
                                     .collect(Collectors.toList());
                             conceptNameList.addAll(drugNameList);
                             conceptNameList.addAll(drugNameList);
                         } else {
                         } else {
-                            if(StringUtil.isBlank(meditionDetail.getDescription())) {
-                                meditionDetailList.remove(meditionDetail);
-                                meditionDetailList.size();
-                                if (meditionDetailList.size() == 0) {
-                                    break;
-                                }
+                            if (StringUtil.isBlank(meditionDetail.getDescription())) {
+                                treatmentPlanList.remove(index);
+                                index--;
+                                break;
                             }
                             }
                         }
                         }
                     }
                     }
                 }
                 }
-                if (ListUtil.isEmpty(meditionDetailList)) {
-                    treatmentPlanList.remove(treatmentPlan);
-                    treatmentPlanList.size();
-                    if (treatmentPlanList.size() == 0) {
-                        break;
-                    }
-                }
             }
             }
         }
         }
         if (ListUtil.isNotEmpty(adverseReactionList)) {
         if (ListUtil.isNotEmpty(adverseReactionList)) {