|
@@ -12,6 +12,7 @@ import com.diagbot.dto.StaticKnowledgeDetailDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeIndexPageDTO;
|
|
|
import com.diagbot.entity.KlConcept;
|
|
|
import com.diagbot.entity.KlConceptDetail;
|
|
|
+import com.diagbot.entity.KlConceptScale;
|
|
|
import com.diagbot.entity.KlConceptStatic;
|
|
|
import com.diagbot.entity.KlRelation;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -60,6 +61,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
@Autowired
|
|
|
private KlConceptDetailFacade klConceptDetailFacade;
|
|
|
@Autowired
|
|
|
+ private KlConceptScaleFacade klConceptScaleFacade;
|
|
|
+ @Autowired
|
|
|
private KlDictionaryInfoFacade klDictionaryInfoFacade;
|
|
|
|
|
|
@Autowired
|
|
@@ -376,21 +379,33 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
Map<Long, List<KlConceptDetail>> detailMap = details.stream()
|
|
|
.collect(Collectors.groupingBy(KlConceptDetail::getConceptId));
|
|
|
|
|
|
+ List<KlConceptScale> scaleDetails = klConceptScaleFacade.list(new QueryWrapper<KlConceptScale>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .in("concept_id", conceptIds)
|
|
|
+ .orderByAsc("concept_id", "parent_id", "order_no"));
|
|
|
+ Map<Long, List<KlConceptScale>> scaleDetailMap = scaleDetails.stream()
|
|
|
+ .collect(Collectors.groupingBy(KlConceptScale::getConceptId));
|
|
|
+
|
|
|
records.forEach(i -> {
|
|
|
i.setTypeName(medRetrievalFacade.convertTypeName(i.getTypeName(), 2, dicTypeName));
|
|
|
if (dicTypeMap.containsKey(i.getTypeName())) {
|
|
|
i.setType(Integer.valueOf(dicTypeMap.get(i.getTypeName())));
|
|
|
}
|
|
|
i.setHasInfo(1);
|
|
|
- i.setHasStaticKnowledge(detailMap.get(i.getId()).stream()
|
|
|
- .filter(x -> x.getContentType().contains("1")).count() > 0 ? 1 : 0);
|
|
|
- i.setHasNotice(detailMap.get(i.getId()).stream()
|
|
|
- .filter(x -> x.getContentType().contains("2")).count() > 0 ? 1 : 0);
|
|
|
- i.setHasClinicalPathway(detailMap.get(i.getId()).stream()
|
|
|
- .filter(x -> x.getContentType().contains("3")).count() > 0 ? 1 : 0);
|
|
|
- i.setHasTreatInfo(detailMap.get(i.getId()).stream()
|
|
|
- .filter(x -> x.getContentType().contains("4")).count() > 0 ? 1 : 0);
|
|
|
- i.setAbstractContent(detailMap.get(i.getId()).get(0).getContent());
|
|
|
+ if (i.getType().equals(8)) {
|
|
|
+ //todo 量表内容处理
|
|
|
+
|
|
|
+ } else {
|
|
|
+ i.setHasStaticKnowledge(detailMap.get(i.getId()).stream()
|
|
|
+ .filter(x -> x.getContentType().contains("1")).count() > 0 ? 1 : 0);
|
|
|
+ i.setHasNotice(detailMap.get(i.getId()).stream()
|
|
|
+ .filter(x -> x.getContentType().contains("2")).count() > 0 ? 1 : 0);
|
|
|
+ i.setHasClinicalPathway(detailMap.get(i.getId()).stream()
|
|
|
+ .filter(x -> x.getContentType().contains("3")).count() > 0 ? 1 : 0);
|
|
|
+ i.setHasTreatInfo(detailMap.get(i.getId()).stream()
|
|
|
+ .filter(x -> x.getContentType().contains("4")).count() > 0 ? 1 : 0);
|
|
|
+ i.setAbstractContent(detailMap.get(i.getId()).get(0).getContent());
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
page.setRecords(records);
|