|
@@ -82,7 +82,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndexWithInfo(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndexWithInfo(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
- List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
|
|
|
+ List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = staticKnowledgeIndex(staticKnowledgeIndexVO,0);
|
|
//过滤没有静态知识的检索结果
|
|
//过滤没有静态知识的检索结果
|
|
staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
|
|
staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
|
|
.stream()
|
|
.stream()
|
|
@@ -101,7 +101,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndexWithoutInfo(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndexWithoutInfo(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
- List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
|
|
|
+ List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = staticKnowledgeIndex(staticKnowledgeIndexVO,1);
|
|
//过滤没有静态知识的检索结果
|
|
//过滤没有静态知识的检索结果
|
|
staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
|
|
staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
|
|
.stream()
|
|
.stream()
|
|
@@ -117,9 +117,10 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
* 医学知识(静态信息)检索
|
|
* 医学知识(静态信息)检索
|
|
*
|
|
*
|
|
* @param staticKnowledgeIndexVO
|
|
* @param staticKnowledgeIndexVO
|
|
|
|
+ * @param type 0:过滤逻辑删除数据,1:不过滤逻辑删除数据
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
|
|
|
+ public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO,Integer type) {
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
//静态知识检索顺序
|
|
//静态知识检索顺序
|
|
List<DictionaryInfoDTO> dicStaticIndexList = dictionaryFacade.getListByGroupType(7);
|
|
List<DictionaryInfoDTO> dicStaticIndexList = dictionaryFacade.getListByGroupType(7);
|
|
@@ -144,24 +145,6 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
conceptInfoQueryWrapper.in("name", conNameList);
|
|
conceptInfoQueryWrapper.in("name", conNameList);
|
|
List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
- /*int n = 0;
|
|
|
|
- do {
|
|
|
|
- List<String> subConNameList = new ArrayList<>();
|
|
|
|
- if (n + 1000 < conNameList.size()) {
|
|
|
|
- subConNameList = conNameList.subList(n, n + 1000);
|
|
|
|
- } else {
|
|
|
|
- subConNameList = conNameList.subList(n, conNameList.size());
|
|
|
|
- }
|
|
|
|
- conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
|
|
- conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
|
- conceptInfoQueryWrapper.in("name", subConNameList);
|
|
|
|
- List<ConceptInfo> subConceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
|
|
- if (ListUtil.isNotEmpty(subConceptInfoList)) {
|
|
|
|
- conceptInfoList.addAll(subConceptInfoList);
|
|
|
|
- }
|
|
|
|
- n += 1000;
|
|
|
|
- } while (conceptInfoList.size() < 100 && n < conNameList.size());*/
|
|
|
|
-
|
|
|
|
if (ListUtil.isNotEmpty(conceptInfoList)) {
|
|
if (ListUtil.isNotEmpty(conceptInfoList)) {
|
|
//typeName转换
|
|
//typeName转换
|
|
conceptInfoList.forEach(item -> {
|
|
conceptInfoList.forEach(item -> {
|
|
@@ -179,7 +162,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
if (ListUtil.isNotEmpty(conceptIdList)) {
|
|
if (ListUtil.isNotEmpty(conceptIdList)) {
|
|
QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
- //conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
|
|
|
+ if (type.equals(0)) {
|
|
|
|
+ conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
|
+ }
|
|
conceptDetailQueryWrapper.in("concept_id", conceptIdList);
|
|
conceptDetailQueryWrapper.in("concept_id", conceptIdList);
|
|
List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
Map<Long, List<ConceptDetail>> detailMap
|
|
Map<Long, List<ConceptDetail>> detailMap
|
|
@@ -195,11 +180,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
for (ConceptDetail detail : detailMap.get(item.getId())) {
|
|
for (ConceptDetail detail : detailMap.get(item.getId())) {
|
|
- if (detail.getIsDeleted().equals(IsDeleteEnum.Y.getKey())) {
|
|
|
|
- continue;
|
|
|
|
- } else {
|
|
|
|
- item.setHasInfo(1);
|
|
|
|
- }
|
|
|
|
|
|
+ item.setHasInfo(1);
|
|
List<String> contentTypeList = Arrays.asList(detail.getContentType().split(","));
|
|
List<String> contentTypeList = Arrays.asList(detail.getContentType().split(","));
|
|
if (contentTypeList.contains("1")) {
|
|
if (contentTypeList.contains("1")) {
|
|
item.setHasStaticKnowledge(1);
|
|
item.setHasStaticKnowledge(1);
|