diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java index 97801b4..0543526 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java @@ -247,6 +247,44 @@ public class MetaImpUserModelInfoController extends BaseController { return getDataTable(list); } + @GetMapping("/count") + @ApiOperation("统计7天重点人员每种预警类型数量") + public AjaxResult tableDataInfoCount() { + //人脸 + Integer rlCount = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getDataType, "101003").count(); + //车辆 + Integer clCount = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getDataType, "060001").count(); + //技侦 + Integer jzCount = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getDataType, "500002").count(); + //汽车 + Integer qcCount = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getDataType, "100086").count(); + //民航 + Integer mhCount = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getDataType, "900018").count(); + //铁路 + Integer tlCount = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getDataType, "102011").count(); + //旅馆 + Integer lgCount = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getDataType, "101005").count(); + Map map = new HashMap<>(); + map.put("人脸抓拍",rlCount); + map.put("车辆抓拍",clCount); + map.put("技侦定位",jzCount); + map.put("汽车客运",qcCount); + map.put("民航进港",mhCount); + map.put("铁路订票",tlCount); + map.put("旅馆住宿",lgCount); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.select("imp_user_sub_type", "COUNT(*) as count") + .groupBy("imp_user_sub_type"); + Map map1 = metaImpUserModelInfoService.getMap(queryWrapper); + + + HashMap> hashMap = new HashMap<>(); + hashMap.put("预警类别",map); + hashMap.put("重点人类别",map1); + return AjaxResult.success(hashMap); + } + }