| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Api(tags = "数据大屏") |
| | |
| | | */ |
| | | @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); |
| | | } |
| | |
| | | // 助需 |
| | | 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); |
| | |
| | | // 重点人数 |
| | | 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)); |