From ffef20d703aaa9b60c9234dd0b42f3d006426dc7 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 31 十二月 2025 17:02:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
index 7a26248..5d56e06 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
@@ -1,5 +1,6 @@
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.*;
@@ -31,8 +32,9 @@
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;
@@ -44,6 +46,7 @@
this.largeVolunteerService = largeVolunteerService;
this.largeKeyGridUserService = largeKeyGridUserService;
this.largeKeyPersonnelTypeService = largeKeyPersonnelTypeService;
+ this.tHelpNeedsService = tHelpNeedsService;
}
/**
@@ -77,9 +80,18 @@
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("appealServicesCount",appealServicesCount+photoCount+appealCount+helpNeedsCount);
map.put("warningCount",warningCount);
+ map.put("photoCount",photoCount);
+ map.put("appealCount",appealCount);
+ map.put("helpNeedsCount",helpNeedsCount);
return R.ok(map);
}
@@ -131,7 +143,8 @@
.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);
}
@@ -142,7 +155,8 @@
@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)){
// 查询真实的汇总数据
--
Gitblit v1.7.1