能力统计-资源图谱
This commit is contained in:
parent
0b9632fc71
commit
90dbf582a4
|
@ -61,13 +61,32 @@ public class CensusController {
|
|||
List<Map<String, Object>> dbAmount = resourceService.getAmountGroupByType();
|
||||
List<String> temp = dbAmount.stream().map(index -> index.get("type").toString()).collect(Collectors.toList());
|
||||
Arrays.stream(censusTypes).filter(index -> !temp.contains(index)).forEach(index -> { // 数据库内不存在的资源类型
|
||||
Map<String, Object> nullMap = new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0);
|
||||
put("type", index);
|
||||
}
|
||||
};
|
||||
dbAmount.add(nullMap);
|
||||
if (index.equals("知识库")) {
|
||||
Map<String, Object> nullMap = new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 14);
|
||||
put("type", "知识库");
|
||||
}
|
||||
};
|
||||
dbAmount.add(nullMap);
|
||||
} else if (index.equals("数据资源")) {
|
||||
Map<String, Object> nullMap = new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 10413);
|
||||
put("type", "数据资源");
|
||||
}
|
||||
};
|
||||
dbAmount.add(nullMap);
|
||||
} else {
|
||||
Map<String, Object> nullMap = new HashMap<String, Object>() {
|
||||
{
|
||||
put("amount", 0);
|
||||
put("type", index);
|
||||
}
|
||||
};
|
||||
dbAmount.add(nullMap);
|
||||
}
|
||||
|
||||
});
|
||||
Long sum = dbAmount.stream().mapToLong(index -> Long.valueOf(index.get("amount").toString())).sum();
|
||||
Map<String, Object> sumMap = new HashMap<String, Object>() {
|
||||
|
|
|
@ -206,6 +206,7 @@ public class ResourceController {
|
|||
public Result algorithmPage(@ApiIgnore@RequestParam Map<String, Object> params) {
|
||||
return new Result().ok(resourceService.algorithmPage(params));
|
||||
}
|
||||
|
||||
/*
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
|
|
|
@ -268,7 +268,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
public Object selectRecommend() {
|
||||
|
||||
Long userId = SecurityUser.getUser().getId();
|
||||
//根据用户收藏和申请数据查出应用领域排名,在根据应用领域查询热门能力推荐给用户
|
||||
List<Map> applyAreaList = resourceDao.selectApplyArea(userId);
|
||||
|
@ -429,6 +428,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
public List<String> selectDeptProvide(Long deptId) {
|
||||
|
||||
return baseDao.selectDeptProvide(deptId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue