liujie
2026-03-02 e3268ed62b52a90d20ac2e10ffbf7fab6c00f9fd
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@Api(tags = "数据大屏")
@@ -63,9 +64,9 @@
     */
    @ApiOperation(value = "获取组织人员列表")
    @GetMapping(value = "/largeUserList")
    public R<List<TLargeUser>> largeUserList(@RequestParam String deptId) {
    public R<List<TLargeUser>> largeUserList(String deptId) {
        List<TLargeUser> list = largeUserService.list(Wrappers.lambdaQuery(TLargeUser.class)
                .eq(TLargeUser::getDeptId, deptId)
                .eq(Objects.nonNull(deptId),TLargeUser::getDeptId, deptId)
                .orderByDesc(TLargeUser::getCreateTime));
        return R.ok(list);
    }
@@ -87,7 +88,7 @@
        // 助需
        long helpNeedsCount = tHelpNeedsService.count();
        Map<String,Long> map = new HashMap<>();
        map.put("appealServicesCount",appealServicesCount);
        map.put("appealServicesCount",appealServicesCount+photoCount+appealCount+helpNeedsCount);
        map.put("warningCount",warningCount);
        map.put("photoCount",photoCount);
        map.put("appealCount",appealCount);
@@ -138,6 +139,12 @@
        // 重点人数
        long keyCount = largeKeyGridUserService.count(Wrappers.lambdaQuery(TLargeKeyGridUser.class)
                .eq(TLargeKeyGridUser::getUserType, 1));
        List<TLargeKeyPersonnelType> list = largeKeyPersonnelTypeService.list(Wrappers.lambdaQuery(TLargeKeyPersonnelType.class)
                .eq(TLargeKeyPersonnelType::getShowType, 1));
        if(!CollectionUtils.isEmpty(list)){
            int sum = list.stream().filter(e->Objects.nonNull(e.getShowNumber())).mapToInt(TLargeKeyPersonnelType::getShowNumber).sum();
            keyCount += sum;
        }
        // 网格人数
        long gridCount = largeKeyGridUserService.count(Wrappers.lambdaQuery(TLargeKeyGridUser.class)
                .eq(TLargeKeyGridUser::getUserType, 2));