|
@@ -811,4 +811,41 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
}
|
|
}
|
|
return retMap;
|
|
return retMap;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 批量更新静态知识标志
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Boolean updateHasInfoStatusBatch() {
|
|
|
|
+ QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<ConceptInfo>();
|
|
|
|
+ conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
|
+ List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
|
|
|
|
+ if (ListUtil.isEmpty(conceptInfoList)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<ConceptDetail>();
|
|
|
|
+ conceptDetailQueryWrapper.select("distinct concept_id");
|
|
|
|
+ conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
|
+ List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
|
|
+ Map<Long, List<ConceptDetail>> detailMap =
|
|
|
|
+ EntityUtil.makeEntityListMap(conceptDetailList, "conceptId");
|
|
|
|
+
|
|
|
|
+ List<ConceptInfo> modifyList = Lists.newLinkedList();
|
|
|
|
+ conceptInfoList.forEach(item -> {
|
|
|
|
+ if (detailMap.containsKey(item.getId())) {
|
|
|
|
+ modifyList.add(item);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ for (ConceptInfo conceptInfo : modifyList) {
|
|
|
|
+ //TODO 更新图谱是否有静态信息
|
|
|
|
+ HasStaticKnowledgeVO hasStaticKnowledgeVO = new HasStaticKnowledgeVO();
|
|
|
|
+ hasStaticKnowledgeVO.setName(conceptInfo.getName());
|
|
|
|
+ hasStaticKnowledgeVO.setType(conceptInfo.getType());
|
|
|
|
+ hasStaticKnowledgeVO.setHasInfo(1);
|
|
|
|
+ RespDTO<Boolean> respDTO = cdssCoreClient.updateHasInfoStatus(hasStaticKnowledgeVO);
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
}
|
|
}
|