| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.model.*; |
| | |
| | | private final TLargeVolunteerService largeVolunteerService; |
| | | private final TLargeKeyGridUserService largeKeyGridUserService; |
| | | private final TLargeKeyPersonnelTypeService largeKeyPersonnelTypeService; |
| | | private final THelpNeedsService tHelpNeedsService; |
| | | @Autowired |
| | | public DataStatisticsController(TAppealServicesService appealServicesService, TOldsterWarningService oldsterWarningService, THtmlConfigService htmlConfigService, TLargeDeptService largeDeptService, TLargeUserService largeUserService, TLargeOrganizationService largeOrganizationService, TLargeResourceService largeResourceService, TLargeSocialWorkerService largeSocialWorkerService, TLargeVolunteerService largeVolunteerService, TLargeKeyGridUserService largeKeyGridUserService, TLargeKeyPersonnelTypeService largeKeyPersonnelTypeService) { |
| | | public DataStatisticsController(TAppealServicesService appealServicesService, TOldsterWarningService oldsterWarningService, THtmlConfigService htmlConfigService, TLargeDeptService largeDeptService, TLargeUserService largeUserService, TLargeOrganizationService largeOrganizationService, TLargeResourceService largeResourceService, TLargeSocialWorkerService largeSocialWorkerService, TLargeVolunteerService largeVolunteerService, TLargeKeyGridUserService largeKeyGridUserService, TLargeKeyPersonnelTypeService largeKeyPersonnelTypeService, THelpNeedsService tHelpNeedsService) { |
| | | this.appealServicesService = appealServicesService; |
| | | this.oldsterWarningService = oldsterWarningService; |
| | | this.htmlConfigService = htmlConfigService; |
| | |
| | | this.largeVolunteerService = largeVolunteerService; |
| | | this.largeKeyGridUserService = largeKeyGridUserService; |
| | | this.largeKeyPersonnelTypeService = largeKeyPersonnelTypeService; |
| | | this.tHelpNeedsService = tHelpNeedsService; |
| | | } |
| | | |
| | | /** |
| | |
| | | long appealServicesCount = appealServicesService.count(); |
| | | // 养老告警事件 |
| | | long warningCount = oldsterWarningService.count(); |
| | | // 随手拍 |
| | | long photoCount = appealServicesService.count(new LambdaQueryWrapper<TAppealServices>().eq(TAppealServices::getAppealType,2)); |
| | | // 诉求服务 |
| | | long appealCount = appealServicesService.count(new LambdaQueryWrapper<TAppealServices>().eq(TAppealServices::getAppealType,1)); |
| | | // 助需 |
| | | long helpNeedsCount = tHelpNeedsService.count(); |
| | | Map<String,Long> map = new HashMap<>(); |
| | | map.put("appealServicesCount",appealServicesCount); |
| | | map.put("warningCount",warningCount); |
| | | map.put("photoCount",photoCount); |
| | | map.put("appealCount",appealCount); |
| | | map.put("helpNeedsCount",helpNeedsCount); |
| | | return R.ok(map); |
| | | } |
| | | |
| | |
| | | .eq(TLargeKeyGridUser::getUserType, 2)); |
| | | Map<String,Long> map = new HashMap<>(); |
| | | map.put("keyCount",keyCount); |
| | | map.put("gridCount",gridCount); |
| | | map.put("gridCount",17079L); |
| | | // map.put("gridCount",gridCount); |
| | | return R.ok(map); |
| | | } |
| | | |
| | |
| | | @GetMapping(value = "/keyPersonnelSituation") |
| | | public R<List<TLargeKeyPersonnelType>> keyPersonnelSituation() { |
| | | List<TLargeKeyPersonnelType> list = largeKeyPersonnelTypeService.list(); |
| | | List<TLargeKeyGridUser> largeKeyGridUsers = largeKeyGridUserService.list(); |
| | | List<TLargeKeyGridUser> largeKeyGridUsers = largeKeyGridUserService.list(Wrappers.lambdaQuery(TLargeKeyGridUser.class) |
| | | .eq(TLargeKeyGridUser::getUserType, 1)); |
| | | for (TLargeKeyPersonnelType largeKeyPersonnelType : list) { |
| | | if(largeKeyPersonnelType.getShowType() == 2 && !CollectionUtils.isEmpty(largeKeyGridUsers)){ |
| | | // 查询真实的汇总数据 |