|
@@ -35,8 +35,6 @@ import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-import java.util.regex.Matcher;
|
|
|
-import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -73,21 +71,27 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
return retList;
|
|
|
}
|
|
|
//根据id检索
|
|
|
- List<KlConcept> concepts = this.list(new QueryWrapper<KlConcept>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("status", StatusEnum.Enable.getKey())
|
|
|
- .in("id", conceptVO.getIds()));
|
|
|
+ QueryWrapper<KlConcept> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("id", conceptVO.getIds());
|
|
|
+ if (conceptVO.getStatus() != null) {
|
|
|
+ queryWrapper.eq("status", StatusEnum.Enable.getKey());
|
|
|
+ }
|
|
|
+ List<KlConcept> concepts = this.list(queryWrapper);
|
|
|
for (KlConcept concept : concepts) {
|
|
|
IndexBatchDTO dto = new IndexBatchDTO();
|
|
|
dto.setId(concept.getId());
|
|
|
dto.setName(concept.getLibName());
|
|
|
+ dto.setStatus(concept.getStatus());
|
|
|
dto.setType(convertType(concept.getLibType(), true));
|
|
|
retList.add(dto);
|
|
|
}
|
|
|
} else if (conceptVO.getSource().equals(MatchSourceEnum.StandWord.getKey())) {
|
|
|
QueryWrapper<KlConcept> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("status", StatusEnum.Enable.getKey());
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ if (conceptVO.getStatus() != null) {
|
|
|
+ queryWrapper.eq("status", StatusEnum.Enable.getKey());
|
|
|
+ }
|
|
|
if (ListUtil.isNotEmpty(conceptVO.getNames())) {
|
|
|
queryWrapper.in("lib_name", conceptVO.getNames());
|
|
|
}
|
|
@@ -104,6 +108,7 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
IndexBatchDTO dto = new IndexBatchDTO();
|
|
|
dto.setId(concept.getId());
|
|
|
dto.setName(concept.getLibName());
|
|
|
+ dto.setStatus(concept.getStatus());
|
|
|
retList.add(dto);
|
|
|
}
|
|
|
}
|
|
@@ -129,10 +134,13 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
= libratyInfos.stream().collect(Collectors.groupingBy(KlLibraryInfo::getConceptId));
|
|
|
List<Long> synonymsRelatedConceptIds
|
|
|
= libratyInfos.stream().map(KlLibraryInfo::getConceptId).collect(Collectors.toList());
|
|
|
- List<KlConcept> synonymsRelatedConcepts = this.list(new QueryWrapper<KlConcept>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("status", StatusEnum.Enable.getKey())
|
|
|
- .in("id", synonymsRelatedConceptIds));
|
|
|
+ QueryWrapper<KlConcept> conceptQueryWrapper = new QueryWrapper<>();
|
|
|
+ conceptQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("id", synonymsRelatedConceptIds);
|
|
|
+ if (conceptVO.getStatus() != null) {
|
|
|
+ conceptQueryWrapper.eq("status", StatusEnum.Enable.getKey());
|
|
|
+ }
|
|
|
+ List<KlConcept> synonymsRelatedConcepts = this.list(conceptQueryWrapper);
|
|
|
Map<Long, KlConcept> conceptMap
|
|
|
= synonymsRelatedConcepts.stream().collect(Collectors.toMap(KlConcept::getId, v -> v));
|
|
|
|
|
@@ -147,6 +155,7 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
IndexBatchDTO indexBatchDTO = new IndexBatchDTO();
|
|
|
indexBatchDTO.setId(concept.getId());
|
|
|
indexBatchDTO.setName(concept.getLibName());
|
|
|
+ indexBatchDTO.setStatus(concept.getStatus());
|
|
|
indexBatchDTO.setSynonyms(libraryInfo.getName());
|
|
|
retList.add(indexBatchDTO);
|
|
|
}
|
|
@@ -198,6 +207,13 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
Collectors.mapping(TcmSyndrome::getCode, Collectors.toList())));
|
|
|
}
|
|
|
}
|
|
|
+ QueryWrapper<KlConcept> klConceptQueryWrapper = new QueryWrapper<>();
|
|
|
+
|
|
|
+ klConceptQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("id", conceptIds);
|
|
|
+ if (conceptVO.getStatus() != null) {
|
|
|
+ klConceptQueryWrapper.eq("status", StatusEnum.Enable.getKey());
|
|
|
+ }
|
|
|
List<KlConcept> concepts = this.list(new QueryWrapper<KlConcept>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("status", StatusEnum.Enable.getKey())
|
|
@@ -216,6 +232,7 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
indexBatchDTO.setId(concept.getId());
|
|
|
indexBatchDTO.setName(concept.getLibName());
|
|
|
indexBatchDTO.setCode(code);
|
|
|
+ indexBatchDTO.setStatus(concept.getStatus());
|
|
|
retList.add(indexBatchDTO);
|
|
|
}
|
|
|
}
|
|
@@ -287,14 +304,18 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
*/
|
|
|
public List<IndexBatchDTO> filter(FilterVO filterVO) {
|
|
|
List<IndexBatchDTO> retList = Lists.newArrayList();
|
|
|
- List<KlConcept> klConcepts = this.list(new QueryWrapper<KlConcept>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("status", StatusEnum.Enable.getKey())
|
|
|
- .like("lib_name", filterVO.getInputStr()));
|
|
|
+ QueryWrapper<KlConcept> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .like("lib_name", filterVO.getInputStr());
|
|
|
+ if (filterVO != null) {
|
|
|
+ queryWrapper.eq("status", StatusEnum.Enable.getKey());
|
|
|
+ }
|
|
|
+ List<KlConcept> klConcepts = this.list(queryWrapper);
|
|
|
for (KlConcept concept : klConcepts) {
|
|
|
IndexBatchDTO indexBatchDTO = new IndexBatchDTO();
|
|
|
indexBatchDTO.setId(concept.getId());
|
|
|
indexBatchDTO.setName(concept.getLibName());
|
|
|
+ indexBatchDTO.setStatus(concept.getStatus());
|
|
|
Integer type = convertType(concept.getLibType(), true);
|
|
|
if (type != null) {
|
|
|
indexBatchDTO.setType(type);
|
|
@@ -306,6 +327,7 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
|
|
|
/**
|
|
|
* 国药准字校验
|
|
|
+ *
|
|
|
* @param indexByApprovalVO
|
|
|
* @return
|
|
|
*/
|