|
@@ -28,7 +28,6 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -61,14 +60,17 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<IndexBatchDTO> getConceptNames(ConceptVO conceptVO) {
|
|
|
- if (ListUtil.isEmpty(conceptVO.getNames()) && ListUtil.isEmpty(conceptVO.getIds())) {
|
|
|
+ /*if (ListUtil.isEmpty(conceptVO.getNames()) && ListUtil.isEmpty(conceptVO.getIds())) {
|
|
|
return new ArrayList<>();
|
|
|
- }
|
|
|
+ }*/
|
|
|
List<IndexBatchDTO> retList = Lists.newLinkedList();
|
|
|
//type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、10-量表、11-护理、12-中医诊断、13-中医证候
|
|
|
Integer type = convertType(conceptVO.getType(), false);
|
|
|
|
|
|
if (conceptVO.getSource().equals(-1)) {
|
|
|
+ if (ListUtil.isEmpty(conceptVO.getIds())) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
//根据id检索
|
|
|
List<KlConcept> concepts = this.list(new QueryWrapper<KlConcept>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -84,8 +86,10 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
} 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())
|
|
|
- .in("lib_name", conceptVO.getNames());
|
|
|
+ .eq("status", StatusEnum.Enable.getKey());
|
|
|
+ if (ListUtil.isNotEmpty(conceptVO.getNames())) {
|
|
|
+ queryWrapper.in("lib_name", conceptVO.getNames());
|
|
|
+ }
|
|
|
if (conceptVO.getType().equals(ConceptTypeEnum.Pacs.getKey())) {
|
|
|
//辅检同时检索辅检项目和辅检子项
|
|
|
queryWrapper.in("lib_type", Arrays.asList(LexiconEnum.PacsName.getKey(), LexiconEnum.PacsSubName.getKey()));
|
|
@@ -103,6 +107,9 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
} else if (conceptVO.getSource().equals(MatchSourceEnum.SynonymsWord.getKey())) {
|
|
|
+ if (ListUtil.isEmpty(conceptVO.getNames())) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
QueryWrapper<KlLibraryInfo> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("is_concept", 0)
|
|
@@ -146,6 +153,9 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
} else if (conceptVO.getSource().equals(MatchSourceEnum.Code.getKey())) {
|
|
|
+ if (ListUtil.isEmpty(conceptVO.getNames())) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
List<Long> conceptIds = Lists.newArrayList();
|
|
|
Map<Long, List<String>> codeMap = new HashMap<>();
|
|
|
if (type.equals(LexiconEnum.Disease.getKey())) {
|