|
@@ -238,10 +238,25 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
public IPage<GetAllInformationDTO> getAllInformation(GetAllInformationVO getAllInformationVO) {
|
|
|
Page<GetAllInformationDTO> getAllInformationDTOPage = new Page<>();
|
|
|
|
|
|
+ int typeId = LexiconTypeEnum.getKey(getAllInformationVO.getType());
|
|
|
+
|
|
|
+ List<Long> conceptIdList = null;
|
|
|
+ if(StringUtil.isBlank(getAllInformationVO.getLibName())&&StringUtil.isNotBlank(getAllInformationVO.getName())){
|
|
|
+ getAllInformationVO.setLibName(getAllInformationVO.getName());
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotBlank(getAllInformationVO.getLibName())){
|
|
|
+ QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<>();
|
|
|
+ libraryInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ libraryInfoQe.like("name", getAllInformationVO.getLibName());
|
|
|
+ libraryInfoQe.eq(StringUtil.isNotBlank(getAllInformationVO.getType()),"type_id", typeId);
|
|
|
+ conceptIdList = libraryinfoFacade.list(libraryInfoQe).stream().map(i->i.getConceptId()).distinct().collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
Page<Concept> conceptPage = new Page<>(getAllInformationVO.getCurrent(),getAllInformationVO.getSize());
|
|
|
QueryWrapper<Concept> conceptQe = new QueryWrapper<>();
|
|
|
+ conceptQe.in(ListUtil.isNotEmpty(conceptIdList), "id", conceptIdList);
|
|
|
conceptQe.like(StringUtil.isNotBlank(getAllInformationVO.getName()),"lib_name", getAllInformationVO.getName());
|
|
|
- conceptQe.eq(StringUtil.isNotBlank(getAllInformationVO.getType()),"lib_type", LexiconTypeEnum.getKey(getAllInformationVO.getType()));
|
|
|
+ conceptQe.eq(StringUtil.isNotBlank(getAllInformationVO.getType()),"lib_type", typeId);
|
|
|
conceptQe.eq(StringUtil.isNotBlank(getAllInformationVO.getIsDeleted()),"is_deleted", getAllInformationVO.getIsDeleted());
|
|
|
conceptQe.orderByAsc("is_deleted");
|
|
|
conceptQe.orderByDesc("gmt_modified");
|
|
@@ -280,25 +295,6 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
return getAllInformationDTOPage;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- public static void main(String[] args){
|
|
|
- LibraryInfo libraryInfo1 = new LibraryInfo();
|
|
|
- libraryInfo1.setIsConcept(1);
|
|
|
- libraryInfo1.setName("rgb");
|
|
|
-
|
|
|
- LibraryInfo libraryInfo2 = new LibraryInfo();
|
|
|
- libraryInfo2.setIsConcept(0);
|
|
|
- libraryInfo2.setName("zsj");
|
|
|
-
|
|
|
- List<LibraryInfo> list = Lists.newArrayList();
|
|
|
- list.add(libraryInfo1);
|
|
|
- list.add(libraryInfo2);
|
|
|
-
|
|
|
- String ss = list.stream().sorted((a,b)->b.getIsConcept()-a.getIsConcept()).map(k->k.getName()).collect(Collectors.joining("、"));
|
|
|
-
|
|
|
- System.out.println(ss);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 医学术语命名删除或者恢复
|
|
|
*
|