|
@@ -179,77 +179,7 @@ public class ConceptDetailFacade extends ConceptDetailServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<BIItemDTO> conceptDetailBI() {
|
|
|
- List<BIItemDTO> retList = Lists.newLinkedList();
|
|
|
-
|
|
|
- QueryWrapper<Concept> conceptQueryWrapper = new QueryWrapper<>();
|
|
|
- QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
|
- conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
- List<ConceptDetail> conceptDetailList = this.list(conceptDetailQueryWrapper);
|
|
|
- List<Long> conceptIds = conceptDetailList.stream().map(i -> i.getConceptId()).distinct().collect(Collectors.toList());
|
|
|
- Integer totleCount = 0;
|
|
|
- Integer diseaseCount = 0;
|
|
|
- Integer lisTableCount = 0;
|
|
|
- Integer pacsItemCount = 0;
|
|
|
- Integer drugCount = 0;
|
|
|
- if (ListUtil.isNotEmpty(conceptIds)) {
|
|
|
- //静态知识总数
|
|
|
- conceptQueryWrapper
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("id", conceptIds);
|
|
|
- List<Concept> concepts = conceptFacade.list(conceptQueryWrapper);
|
|
|
- if (ListUtil.isNotEmpty(concepts)) {
|
|
|
- //静态知识总数
|
|
|
- totleCount = concepts.size();
|
|
|
- Map<Long, List<Concept>> groupByLibTypeMap = EntityUtil.makeEntityListMap(concepts, "libType");
|
|
|
- //疾病
|
|
|
- if (groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.DIAGNOSIS.getKey())) != null) {
|
|
|
- diseaseCount = groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.DIAGNOSIS.getKey())).size();
|
|
|
- }
|
|
|
- //化验公表项
|
|
|
- if (groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.LIS_TABLES.getKey())) != null) {
|
|
|
- lisTableCount = groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.LIS_TABLES.getKey())).size();
|
|
|
- }
|
|
|
- //辅检项目
|
|
|
- if (groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.PACS_ITEMS.getKey())) != null) {
|
|
|
- pacsItemCount = groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.PACS_ITEMS.getKey())).size();
|
|
|
- }
|
|
|
- //药品通用名
|
|
|
- if (groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.DRUGS.getKey())) != null) {
|
|
|
- drugCount = groupByLibTypeMap.get(Long.valueOf(LexiconTypeEnum.DRUGS.getKey())).size();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- BIItemDTO totle = new BIItemDTO();
|
|
|
- totle.setModuleName("静态知识");
|
|
|
- totle.setItemName("静态知识总数");
|
|
|
- totle.setCount(totleCount);
|
|
|
- retList.add(totle);
|
|
|
-
|
|
|
- BIItemDTO disease = new BIItemDTO();
|
|
|
- disease.setModuleName("静态知识");
|
|
|
- disease.setItemName("疾病");
|
|
|
- disease.setCount(diseaseCount);
|
|
|
- retList.add(disease);
|
|
|
-
|
|
|
- BIItemDTO lisTable = new BIItemDTO();
|
|
|
- lisTable.setModuleName("静态知识");
|
|
|
- lisTable.setItemName("化验公表项");
|
|
|
- lisTable.setCount(lisTableCount);
|
|
|
- retList.add(lisTable);
|
|
|
-
|
|
|
- BIItemDTO pacs = new BIItemDTO();
|
|
|
- pacs.setModuleName("静态知识");
|
|
|
- pacs.setItemName("辅检项目");
|
|
|
- pacs.setCount(pacsItemCount);
|
|
|
- retList.add(pacs);
|
|
|
-
|
|
|
- BIItemDTO drug = new BIItemDTO();
|
|
|
- drug.setModuleName("静态知识");
|
|
|
- drug.setItemName("药品通用名");
|
|
|
- drug.setCount(drugCount);
|
|
|
- retList.add(drug);
|
|
|
-
|
|
|
+ List<BIItemDTO> retList = conceptDetailService.conDetailCount();
|
|
|
return retList;
|
|
|
}
|
|
|
}
|