|
@@ -300,7 +300,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
}
|
|
|
if (bean.getShowType().intValue() == 1) { // 本体
|
|
|
selfList.add(bean.getSelfId());
|
|
|
- } else if (bean.getShowType().intValue() == 2) { // 子项
|
|
|
+ } else if (bean.getShowType().intValue() == 2 && retrievalVO.getIsSonShow().intValue() == 0) { // 子项
|
|
|
subList.add(bean.getSelfId());
|
|
|
}
|
|
|
}
|
|
@@ -342,12 +342,13 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
RetrievalVO retrievalVO = new RetrievalVO();
|
|
|
RetrievalDTO retrievalDTO = new RetrievalDTO();
|
|
|
BeanUtil.copyProperties(getStaticKnowledgeVO,retrievalVO);
|
|
|
+ retrievalVO.setIsSonShow(1);
|
|
|
retrievalVO.setIsStatic(1);
|
|
|
List<Integer> types = new ArrayList<>();
|
|
|
- types.add(LexiconTypeEnum.LIS_TABLES.getKey());//添加化验公表项类型
|
|
|
for (Integer type : getStaticKnowledgeVO.getTypes()) {
|
|
|
types.add(ParamConvertUtil.conceptConvert2Lib(type));
|
|
|
}
|
|
|
+ types.add(LexiconTypeEnum.LIS_DETAILS.getKey());//加入化验类型
|
|
|
//设置类型为诊断、药品、化验、辅检
|
|
|
retrievalVO.setOtherType(types);
|
|
|
//如果为化验时设置子项类型
|
|
@@ -355,6 +356,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
//获取标签信息
|
|
|
List<ConceptRetrievalDTO> conceptRetrievalDTOList = this.retrivelConceptInfo(retrievalVO);
|
|
|
List<RetrievalDTO> staticRetrievalList = new ArrayList<>();
|
|
|
+ List<String> parentAndSonNameList = new ArrayList<>();
|
|
|
if (ListUtil.isNotEmpty(conceptRetrievalDTOList)) {
|
|
|
//封装
|
|
|
for (ConceptRetrievalDTO conceptRetrievalDTO : conceptRetrievalDTOList) {
|
|
@@ -365,6 +367,8 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
retrievalDTO.setConceptId(conceptRetrievalDTO.getParentId());
|
|
|
retrievalDTO.setName(conceptRetrievalDTO.getParentName());
|
|
|
retrievalDTO.setRetrievalName(conceptRetrievalDTO.getSelfName());
|
|
|
+ retrievalDTO.setParentAndSonName(conceptRetrievalDTO.getParentName()+"--"+conceptRetrievalDTO.getSelfName());
|
|
|
+ parentAndSonNameList.add(conceptRetrievalDTO.getParentName()+"--"+conceptRetrievalDTO.getSelfName());
|
|
|
}
|
|
|
if (StringUtil.isNotEmpty(conceptRetrievalDTO.getSameName())) {//同义词
|
|
|
retrievalDTO.setRetrievalName(conceptRetrievalDTO.getSameName());
|
|
@@ -376,18 +380,45 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
retrievalDTOS.add(retrievalDTO);
|
|
|
}
|
|
|
}
|
|
|
+ List<Concept> conceptDetilList = new ArrayList<>();//化验公表项
|
|
|
+ if(ListUtil.isNotEmpty(parentAndSonNameList)){
|
|
|
+ QueryWrapper<Concept> conceptQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
|
|
|
+ .eq("lib_type",LexiconTypeEnum.LIS_TABLES.getKey())
|
|
|
+ .in("lib_name",parentAndSonNameList);
|
|
|
+ conceptDetilList = this.list(conceptQueryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
//判断是否存在静态知识
|
|
|
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());
|
|
|
+ cenceptIdList.add(concept.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
ExistListByConceptIdsVO existListByConceptIdsVO = new ExistListByConceptIdsVO();
|
|
|
existListByConceptIdsVO.setConceptIds(cenceptIdList);
|
|
|
List<Long> existConceptIdList = conceptDetailFacade.existListByConceptIds(existListByConceptIdsVO);
|
|
|
if(ListUtil.isNotEmpty(existConceptIdList)){
|
|
|
for (RetrievalDTO retrievalDTOInfo : retrievalDTOS) {
|
|
|
- for (Long concept : existConceptIdList) {
|
|
|
- if (retrievalDTOInfo.getConceptId().intValue() == concept.intValue()){
|
|
|
- retrievalDTO = new RetrievalDTO();
|
|
|
- BeanUtil.copyProperties(retrievalDTOInfo,retrievalDTO);
|
|
|
- staticRetrievalList.add(retrievalDTO);
|
|
|
+ if(StringUtil.isNotEmpty(retrievalDTOInfo.getParentAndSonName())){
|
|
|
+ for (Long concept : existConceptIdList) {
|
|
|
+ if (null != retrievalDTOInfo.getParentAndSonId() && retrievalDTOInfo.getParentAndSonId().intValue() == concept.intValue()){
|
|
|
+ retrievalDTO = new RetrievalDTO();
|
|
|
+ BeanUtil.copyProperties(retrievalDTOInfo,retrievalDTO);
|
|
|
+ staticRetrievalList.add(retrievalDTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ for (Long concept : existConceptIdList) {
|
|
|
+ if (retrievalDTOInfo.getConceptId().intValue() == concept.intValue()){
|
|
|
+ retrievalDTO = new RetrievalDTO();
|
|
|
+ BeanUtil.copyProperties(retrievalDTOInfo,retrievalDTO);
|
|
|
+ staticRetrievalList.add(retrievalDTO);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|