浏览代码

Merge remote-tracking branch 'origin/master'

zhoutg 4 年之前
父节点
当前提交
c72002d863

+ 3 - 0
src/main/java/com/diagbot/entity/node/LIS.java

@@ -82,6 +82,9 @@ public class LIS extends BaseNode  {
 
     @Relationship(type="医保ICD-10疾病相关实验室检查", direction = Relationship.INCOMING)
     private Set<Disease> icddis_related_lis = new HashSet<>();
+
+    @Relationship(type="实验室检查套餐相关实验室检查", direction = Relationship.INCOMING)
+    private Set<LISPack> lisPacks_related_lis = new HashSet<>();
 }
 
 

+ 0 - 2
src/main/java/com/diagbot/entity/node/LISCritical.java

@@ -7,8 +7,6 @@ import org.neo4j.ogm.annotation.NodeEntity;
 import org.neo4j.ogm.annotation.Property;
 import org.neo4j.ogm.annotation.Relationship;
 
-import java.math.BigDecimal;
-import java.util.Set;
 
 @Setter
 @Getter

+ 3 - 0
src/main/java/com/diagbot/entity/node/LISPack.java

@@ -25,6 +25,9 @@ public class LISPack extends BaseNode  {
     @Property(name = "单位")
     private String unit;
 
+    @Relationship(type="实验室检查套餐相关实验室检查", direction = Relationship.OUTGOING)
+    private Set<LIS> lisPacks_related_lis = new HashSet<>();
+
     @Relationship(type="实验室检查套餐禁忌性别", direction = Relationship.OUTGOING)
     private Gender gender;
 

+ 2 - 2
src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -216,8 +216,8 @@ public class RetrievalFacade {
             List<LIS> lislt = lisRepository.findByNameLike("*" + inputStr + "*");
             //套餐显示在前
             for (LIS lis : lislt) {
-                if (lis.getLisPacks().size() > 0) {
-                    for (LISPack lisPack : lis.getLisPacks()) {
+                if (lis.getLisPacks_related_lis().size() > 0) {
+                    for (LISPack lisPack : lis.getLisPacks_related_lis()) {
                         StaticKnowledgeIndexDTO staticDTO = new StaticKnowledgeIndexDTO();
                         staticDTO.setRetrievalName(lis.getName());
                         staticDTO.setName(lisPack.getName());

+ 12 - 5
src/main/java/com/diagbot/repository/LisNode.java

@@ -154,12 +154,19 @@ public class LisNode {
 			nodename = lis.getName();
 			lisDetailDTO.setUniqueName(nodename);
 
-			if (lis.getLisPacks().size()>0) {
-				List<LISPack> lispacklist = new ArrayList<>(lis.getLisPacks());
-				lisDetailDTO.setName(lispacklist.get(0).getName());
+			if (lis.getLisPacks_related_lis().size()>0) {
+				List<LISPack> lispacklist = new ArrayList<>(lis.getLisPacks_related_lis());
+				for (LISPack lisPack : lispacklist) {
+					lisDetailDTO = new LisDetailDTO();
+					nodename = lis.getName();
+					lisDetailDTO.setUniqueName(nodename);
+					lisDetailDTO.setName(lisPack.getName());
+					lislist.add(lisDetailDTO);
+				}
+			}
+			else {
+				lislist.add(lisDetailDTO);
 			}
-
-			lislist.add(lisDetailDTO);
 		}