大屏医院咨询数量统计增加医院

This commit is contained in:
wanghao
2026-01-08 14:34:13 +08:00
parent 309bdc467e
commit 7362ca6b8a
@@ -1108,6 +1108,29 @@ public class ConDoctorServiceImpl extends ServiceImpl<ConDoctorMapper, ConDoctor
@Override
public List<Map<String, Object>> getHospitalCountStatList() {
return conDoctorMapper.getHospitalCountStatList();
// 查询所有资源列表
List<ConResource> resourceList = conResourceMapper.queryPageList(new Page<>(0, -1), new ConResource()).getRecords();
// 查询已有的医院统计数据列表
List<Map<String, Object>> hospitalList = conDoctorMapper.getHospitalCountStatList();
// 提取医院名
Set<String> existingHospitalNames = hospitalList.stream()
.map(map -> (String) map.get("hospitalName"))
.collect(Collectors.toSet());
// 补充数据
for (ConResource resource : resourceList) {
String resourceName = resource.getResourceName();
if (!existingHospitalNames.contains(resourceName)) {
Map<String, Object> map = new HashMap<>();
map.put("hospitalName", resourceName);
map.put("consultImCount", 0);
map.put("consultVedioCount", 0);
hospitalList.add(map);
}
}
return hospitalList;
}
}