提交 88ba36a4 作者: 925993793@qq.com

统战部接口返回调整

上级 6e020412
...@@ -432,6 +432,13 @@ public class StatisticalAnalysisController { ...@@ -432,6 +432,13 @@ public class StatisticalAnalysisController {
return Result.OK(countVOS); return Result.OK(countVOS);
} }
/**
* 按月统计(默认近一年)
*
* @param subjectId 专题id
* @author lkg
* @date 2025/6/10
*/
@GetMapping("/monthStatistic") @GetMapping("/monthStatistic")
public Result<?> monthStatistic(@RequestParam String subjectId) { public Result<?> monthStatistic(@RequestParam String subjectId) {
DateTime startDateTime = cn.hutool.core.date.DateUtil.offsetMonth(new Date(), -13); DateTime startDateTime = cn.hutool.core.date.DateUtil.offsetMonth(new Date(), -13);
...@@ -464,16 +471,32 @@ public class StatisticalAnalysisController { ...@@ -464,16 +471,32 @@ public class StatisticalAnalysisController {
return Result.OK(countVOS); return Result.OK(countVOS);
} }
/**
* 数据源统计
*
* @param subjectId 专题id
* @author lkg
* @date 2025/6/10
*/
@GetMapping("/sourceStatistic") @GetMapping("/sourceStatistic")
public Result<?> sourceStatistic(@RequestParam String subjectId) { public Result<?> sourceStatistic(@RequestParam String subjectId) {
Map<String, Integer> map = new HashMap<>(); List<Map<String,Object>> dataList = new ArrayList<>();
map.put("sourceType", 4); Map<String, Object> sourceTypeMap = new HashMap<>();
sourceTypeMap.put("value", 4);
sourceTypeMap.put("name", "数据源类型");
dataList.add(sourceTypeMap);
List<String> subjectIds = new ArrayList<>(); List<String> subjectIds = new ArrayList<>();
subjectIds.add(subjectId); subjectIds.add(subjectId);
Map<String, Object> sourceNumMap = new HashMap<>();
Map<String, Integer> sourceCountMap = commonService.bindSourceCount(subjectIds); Map<String, Integer> sourceCountMap = commonService.bindSourceCount(subjectIds);
map.put("sourceNum", sourceCountMap.get(subjectId)); sourceNumMap.put("value", sourceCountMap.get(subjectId));
sourceNumMap.put("name", "信息源个数");
dataList.add(sourceNumMap);
Map<String, Object> collectNumMap = new HashMap<>();
int collectCount = esService.currentCollectCount(subjectId); int collectCount = esService.currentCollectCount(subjectId);
map.put("collectNum", collectCount); collectNumMap.put("value", collectCount);
return Result.OK(map); collectNumMap.put("name", "今日采集量");
dataList.add(collectNumMap);
return Result.OK(dataList);
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论