浏览代码

Merge remote-tracking branch 'origin/dev/KLBstand' into dev/KLBstand

zhoutg 6 年之前
父节点
当前提交
a8faef3776

+ 4 - 4
aipt-service/src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -27,8 +27,8 @@ public class RetrievalDTO {
     private String libTypeName;
     //icss标签type
     private Integer type;
-    //父项子项名称
-    private String parentAndSonName;
-    //父项子项ID
-    private Long parentAndSonId;
+    //公表名称
+    private String uniqueName;
+    //公表ID
+    private Long uniqueId;
 }

+ 13 - 9
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -356,19 +356,23 @@ public class ConceptFacade extends ConceptServiceImpl {
         //获取标签信息
         List<ConceptRetrievalDTO> conceptRetrievalDTOList = this.retrivelConceptInfo(retrievalVO);
         List<RetrievalDTO> staticRetrievalList = new ArrayList<>();
-        List<String> parentAndSonNameList = new ArrayList<>();
+        List<String> uniqueNameList = new ArrayList<>();
         if (ListUtil.isNotEmpty(conceptRetrievalDTOList)) {
             //封装
             for (ConceptRetrievalDTO conceptRetrievalDTO : conceptRetrievalDTOList) {
                 retrievalDTO = new RetrievalDTO();
                 retrievalDTO.setConceptId(conceptRetrievalDTO.getSelfId());
                 retrievalDTO.setName(conceptRetrievalDTO.getSelfName());
+                if(StringUtil.isEmpty(conceptRetrievalDTO.getParentName()) && conceptRetrievalDTO.getLibTypeId().intValue() == LexiconTypeEnum.LIS_PACKAGE.getKey()){
+                    retrievalDTO.setUniqueName(conceptRetrievalDTO.getSelfName());
+                    uniqueNameList.add(conceptRetrievalDTO.getSelfName());
+                }
                 if (StringUtil.isNotEmpty(conceptRetrievalDTO.getParentName())) {//parent不为空时说明有子项,返回父级id
                     retrievalDTO.setConceptId(conceptRetrievalDTO.getParentId());
                     retrievalDTO.setName(conceptRetrievalDTO.getParentName());
                     retrievalDTO.setRetrievalName(conceptRetrievalDTO.getSelfName());
-                    retrievalDTO.setParentAndSonName(conceptRetrievalDTO.getParentName()+"--"+conceptRetrievalDTO.getSelfName());
-                    parentAndSonNameList.add(conceptRetrievalDTO.getParentName()+"--"+conceptRetrievalDTO.getSelfName());
+                    retrievalDTO.setUniqueName(conceptRetrievalDTO.getParentName()+"--"+conceptRetrievalDTO.getSelfName());
+                    uniqueNameList.add(conceptRetrievalDTO.getParentName()+"--"+conceptRetrievalDTO.getSelfName());
                 }
                 if (StringUtil.isNotEmpty(conceptRetrievalDTO.getSameName())) {//同义词
                     retrievalDTO.setRetrievalName(conceptRetrievalDTO.getSameName());
@@ -381,11 +385,11 @@ public class ConceptFacade extends ConceptServiceImpl {
             }
         }
         List<Concept> conceptDetilList = new ArrayList<>();//化验公表项
-        if(ListUtil.isNotEmpty(parentAndSonNameList)){
+        if(ListUtil.isNotEmpty(uniqueNameList)){
             QueryWrapper<Concept> conceptQueryWrapper = new QueryWrapper<>();
             conceptQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
                     .eq("lib_type",LexiconTypeEnum.LIS_TABLES.getKey())
-                    .in("lib_name",parentAndSonNameList);
+                    .in("lib_name",uniqueNameList);
             conceptDetilList = this.list(conceptQueryWrapper);
         }
 
@@ -393,8 +397,8 @@ public class ConceptFacade extends ConceptServiceImpl {
         List<Long> cenceptIdList = retrievalDTOS.stream().map(RetrievalDTO::getConceptId).collect(Collectors.toList());
         for (RetrievalDTO retrievalDTO1 : retrievalDTOS) {
             for (Concept concept : conceptDetilList) {
-                if(StringUtil.isNotEmpty(retrievalDTO1.getParentAndSonName()) && retrievalDTO1.getParentAndSonName().equals(concept.getLibName())){//添加公表项id
-                    retrievalDTO1.setParentAndSonId(concept.getId());
+                if(StringUtil.isNotEmpty(retrievalDTO1.getUniqueName()) && retrievalDTO1.getUniqueName().equals(concept.getLibName())){//添加公表项id
+                    retrievalDTO1.setUniqueId(concept.getId());
                     cenceptIdList.add(concept.getId());
                 }
             }
@@ -404,9 +408,9 @@ public class ConceptFacade extends ConceptServiceImpl {
         List<Long> existConceptIdList = conceptDetailFacade.existListByConceptIds(existListByConceptIdsVO);
         if(ListUtil.isNotEmpty(existConceptIdList)){
             for (RetrievalDTO retrievalDTOInfo : retrievalDTOS) {
-                if(StringUtil.isNotEmpty(retrievalDTOInfo.getParentAndSonName())){
+                if(StringUtil.isNotEmpty(retrievalDTOInfo.getUniqueName())){
                     for (Long concept : existConceptIdList) {
-                        if (null != retrievalDTOInfo.getParentAndSonId() && retrievalDTOInfo.getParentAndSonId().intValue() == concept.intValue()){
+                        if (null != retrievalDTOInfo.getUniqueId() && retrievalDTOInfo.getUniqueId().intValue() == concept.intValue()){
                             retrievalDTO = new RetrievalDTO();
                             BeanUtil.copyProperties(retrievalDTOInfo,retrievalDTO);
                             staticRetrievalList.add(retrievalDTO);

+ 2 - 2
icss-service/src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -27,6 +27,6 @@ public class RetrievalDTO {
     private String libTypeName;
     //icss标签type
     private Integer type;
-    //父项子项名称
-    private String parentAndSonName;
+    //公表名称
+    private String uniqueName;
 }