|
@@ -38,7 +38,6 @@ import com.diagbot.entity.Concept;
|
|
|
import com.diagbot.entity.ConceptCommon;
|
|
|
import com.diagbot.entity.Lexicon;
|
|
|
import com.diagbot.entity.LibraryInfo;
|
|
|
-import com.diagbot.entity.Medical;
|
|
|
import com.diagbot.entity.Relation;
|
|
|
import com.diagbot.entity.wrapper.ConceptWrapper;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -83,8 +82,8 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
private LibraryInfoFacade libraryinfoFacade;
|
|
|
// @Autowired
|
|
|
// private LibraryDetailFacade libraryDetailFacade;
|
|
|
- @Autowired
|
|
|
- private MedicalFacade medicalFacade;
|
|
|
+// @Autowired
|
|
|
+// private MedicalFacade medicalFacade;
|
|
|
@Autowired
|
|
|
private RelationFacade relationFacade;
|
|
|
@Autowired
|
|
@@ -104,7 +103,27 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<GetAllLisConceptDTO> getAllLisConcept(GetAllLisConceptVO getAllLisConceptVO) {
|
|
|
- return this.baseMapper.getAllLisConcept(getAllLisConceptVO);
|
|
|
+ List<GetAllLisConceptDTO> getAllLisConceptDTOList = new ArrayList<>();
|
|
|
+
|
|
|
+ QueryWrapper<Concept> conceptQe = new QueryWrapper<>();
|
|
|
+ conceptQe.eq("is_deleted", "N");
|
|
|
+ conceptQe.eq("lib_type", 46);
|
|
|
+ conceptQe.like(StringUtil.isNotEmpty(getAllLisConceptVO.getConceptName()),"lib_name", getAllLisConceptVO.getConceptName());
|
|
|
+ List<Concept> conceptList = list(conceptQe);
|
|
|
+
|
|
|
+ conceptList.forEach(i->{
|
|
|
+ if(getAllLisConceptVO.getExcludedConceptNames()!=null
|
|
|
+ &&getAllLisConceptVO.getExcludedConceptNames().contains(i.getLibName())){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ GetAllLisConceptDTO getAllLisConceptDTO = new GetAllLisConceptDTO();
|
|
|
+ getAllLisConceptDTO.setConceptId(i.getId());
|
|
|
+ getAllLisConceptDTO.setConceptName(i.getLibName());
|
|
|
+ getAllLisConceptDTOList.add(getAllLisConceptDTO);
|
|
|
+ });
|
|
|
+
|
|
|
+ //return this.baseMapper.getAllLisConcept(getAllLisConceptVO);
|
|
|
+ return getAllLisConceptDTOList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -116,12 +135,8 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
public List<GetAllConceptDTO> getAllConcept(GetAllConceptVO getAllConceptVO) {
|
|
|
QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<LibraryInfo>();
|
|
|
libraryInfoQe.eq("is_deleted", "N");
|
|
|
- if (getAllConceptVO.getIsConcept() != null) {
|
|
|
- libraryInfoQe.eq("is_concept", getAllConceptVO.getIsConcept());
|
|
|
- }
|
|
|
- if (StringUtil.isNotBlank(getAllConceptVO.getName())) {
|
|
|
- libraryInfoQe.like("name", getAllConceptVO.getName());
|
|
|
- }
|
|
|
+ libraryInfoQe.eq(getAllConceptVO.getIsConcept() != null,"is_concept", getAllConceptVO.getIsConcept());
|
|
|
+ libraryInfoQe.like(StringUtil.isNotBlank(getAllConceptVO.getName()),"name", getAllConceptVO.getName());
|
|
|
List<LibraryInfo> libraryInfoList = libraryinfoFacade.list(libraryInfoQe);
|
|
|
|
|
|
//过滤掉非概念术语
|
|
@@ -137,8 +152,8 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
});
|
|
|
libraryInfoList = libraryInfoList.stream().filter(i -> i.getIsDeleted().equals("N")).collect(Collectors.toList());
|
|
|
}
|
|
|
-
|
|
|
- //添加过术语医学属性的过滤掉
|
|
|
+
|
|
|
+ /*//添加过术语医学属性的过滤掉
|
|
|
if (getAllConceptVO.getIsMedical() != null && getAllConceptVO.getIsMedical() == 1) {
|
|
|
QueryWrapper<Medical> medicalQe = new QueryWrapper<>();
|
|
|
medicalQe.eq("is_deleted", "N");
|
|
@@ -151,7 +166,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
return false;
|
|
|
}
|
|
|
}).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
List<GetAllConceptDTO> getAllConceptDTOList = BeanUtil.listCopyTo(libraryInfoList, GetAllConceptDTO.class);
|
|
|
getAllConceptDTOList.forEach(i -> {
|
|
@@ -197,7 +212,8 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
}
|
|
|
|
|
|
for(Concept i : conceptList){
|
|
|
- if(reCouMap.get(i.getId())!=null){
|
|
|
+ if(reCouMap.get(i.getId())!=null
|
|
|
+ ||(getAllForRelationVO.getExcludedConceptIds()!=null&&getAllForRelationVO.getExcludedConceptIds().contains(i.getId()))){
|
|
|
continue;
|
|
|
}
|
|
|
GetAllForRelationDTO getAllForRelationDTO = new GetAllForRelationDTO();
|
|
@@ -216,7 +232,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public IPage<GetAllInformationDTO> getAllInformation(GetAllInformationVO getAllInformationVO) {
|
|
|
- IPage<GetAllInformationDTO> ipage = libraryinfoFacade.getAllInformation(getAllInformationVO);
|
|
|
+ IPage<GetAllInformationDTO> ipage = this.baseMapper.getAllInformation(getAllInformationVO);
|
|
|
if (ipage.getRecords().size() > 0) {
|
|
|
List<String> ids = ipage.getRecords().stream().map(i -> i.getOperName()).distinct().collect(Collectors.toList());
|
|
|
RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
|