소스 검색

检验静态知识套餐和细项通用获取(医院端)

zhaops 4 년 전
부모
커밋
f6291f7919
1개의 변경된 파일30개의 추가작업 그리고 2개의 파일을 삭제
  1. 30 2
      src/main/java/com/diagbot/facade/ConceptInfoFacade.java

+ 30 - 2
src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -382,12 +382,18 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
         List<String> typeNames = ListUtil.newArrayList();
         List<Integer> types = ListUtil.newArrayList();
         types.add(staticKnowledgeHISVO.getType());
+        if (staticKnowledgeHISVO.getType().equals(3)) {
+            types.add(4);
+        } else if (staticKnowledgeHISVO.getType().equals(4)) {
+            types.add(3);
+        }
         if (staticKnowledgeHISVO.getType().equals(5)) {
             types.add(6);
         } else if (staticKnowledgeHISVO.getType().equals(6)) {
             types.add(5);
         }
 
+
         for (Integer type : types) {
             String typeName = dicStaticTypeValNameMap.get(type.toString());
             typeName = convertTypeName(typeName, 1, dicList);
@@ -404,7 +410,28 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
                 .in("name", uniqueNameList)
                 .eq("status", StatusEnum.Enable.getKey())
                 .in("type", typeNames);
-        List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
+        List<ConceptInfo> conceptList = this.list(conceptInfoQueryWrapper);
+        List<ConceptInfo> conceptInfoList = Lists.newLinkedList();
+        if (staticKnowledgeHISVO.getType().equals(3)) {
+            conceptInfoList.addAll(conceptList.stream().filter(i -> i.getType().equals("实验室检查套餐名")).collect(Collectors.toList()));
+            for (ConceptInfo info : conceptList) {
+                if (info.getType().equals("实验室检查名称")
+                        && ListUtil.isEmpty(conceptInfoList.stream().filter(i -> i.getName().equals(info.getName())).collect(Collectors.toList()))) {
+                    conceptInfoList.add(info);
+                }
+            }
+        }
+        if (staticKnowledgeHISVO.getType().equals(4)) {
+            conceptInfoList.addAll(conceptList.stream().filter(i -> i.getType().equals("实验室检查名称")).collect(Collectors.toList()));
+            for (ConceptInfo info : conceptList) {
+                if (info.getType().equals("实验室检查套餐名")
+                        && ListUtil.isEmpty(conceptInfoList.stream().filter(i -> i.getName().equals(info.getName())).collect(Collectors.toList()))) {
+                    conceptInfoList.add(info);
+                }
+            }
+        } else {
+            conceptInfoList.addAll(conceptList);
+        }
 
         List<String> existUniqueNameList = Lists.newLinkedList();
 
@@ -415,7 +442,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
                     .collect(Collectors.toList()));
         }
 
-        //获取上级静态知识
+        //未匹配到静态知识
         List<String> notExistUniqueNameList = Lists.newLinkedList();
         uniqueNameList.forEach(name -> {
             if (!existUniqueNameList.contains(name)) {
@@ -423,6 +450,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
             }
         });
 
+        //获取上级静态知识
         if (ListUtil.isNotEmpty(notExistUniqueNameList)) {
             List<StaticKnowledgeNameVO> paramNames = Lists.newLinkedList();
             List<StaticKnowledgeNameVO> superNames = Lists.newLinkedList();