From ec03126ab854b48c84de74c4fa39076cab11b966 Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Sat, 3 Feb 2024 15:33:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MetaImpUserModelInfoController.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) 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); + } + }