From a0f33f915dd4128d98111f67a3c75b1676adae32 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 01 十二月 2022 11:20:39 +0800
Subject: [PATCH] Merge branch 'local_20221104' into huacheng_test
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
index b7a54f8..724f734 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -1,11 +1,17 @@
package com.panzhihua.service_community.service.impl;
import java.util.ArrayList;
+import java.util.Comparator;
import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.community.ComActPasswordVo;
+import com.panzhihua.common.model.vos.community.ComBasicDataVo;
+import com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO;
+import com.panzhihua.service_community.dao.ComPbMemberDAO;
import com.panzhihua.service_community.util.MyAESUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@@ -39,6 +45,8 @@
private ComActDAO comActDAO;
@Resource
private ComStreetDAO comStreetDAO;
+ @Resource
+ private ComPbMemberDAO comPbMemberDAO;
/**
* 新增社区
@@ -250,8 +258,8 @@
street.setCount(communityList.size());
}
});
-// streetList = streetList.stream().sorted(Comparator.comparing(StreetAllAppletsVO::getCount).reversed())
-// .collect(Collectors.toList());
+ streetList = streetList.stream().sorted(Comparator.comparing(StreetAllAppletsVO::getCount).reversed())
+ .collect(Collectors.toList());
return R.ok(streetList);
}
@@ -289,5 +297,52 @@
}
return R.ok(comActPasswordVo);
}
+ @Override
+ public R selectIds(Long id){
+ return R.ok(this.comActDAO.selectIds(id));
+ }
+ @Override
+ public R selectBasicData(){
+ //社区数
+ Integer community = comActDAO.countCommunity();
+ //商家数
+ Integer merchants = comActDAO.countMerchants();
+ //党员数
+ Integer pbMember = comActDAO.countPbMember();
+ //报道单位
+ Integer pbUnit = comActDAO.countPbUnit();
+ //实有人口
+ Integer population = comActDAO.countPopulation();
+ //实有房屋
+ Integer populationHouse = comActDAO.countPopulationHouse();
+ //社会组织
+ Integer socialOrg = comActDAO.countSocialOrg();
+ //志愿者
+ Integer volunteer = comActDAO.countVolunteer();
+
+ ComBasicDataVo comBasicDataVo = new ComBasicDataVo();
+ comBasicDataVo.setCommunity(community);
+ comBasicDataVo.setMerchants(merchants);
+ comBasicDataVo.setPbMember(pbMember);
+ comBasicDataVo.setPbUnit(pbUnit);
+ comBasicDataVo.setPopulation(population);
+ comBasicDataVo.setPopulationHouse(populationHouse);
+ comBasicDataVo.setSocialOrg(socialOrg);
+ comBasicDataVo.setVolunteer(volunteer);
+ return R.ok(comBasicDataVo);
+ }
+
+ @Override
+ public R statisticsPbMemberType(){
+ List<ComPbMemberTypeVO> comPbMemberTypeVOS = comPbMemberDAO.statisticsPbMemberType();
+ Map<String, Integer> retMap = comPbMemberTypeVOS.stream().collect(Collectors.toMap(ComPbMemberTypeVO::getCountName, ComPbMemberTypeVO::getCountNum));
+ return R.ok(retMap);
+ }
+
+ public R selectUnitByNatureName(){
+ List<ComPbMemberTypeVO> comPbMemberTypeVOS = comPbMemberDAO.selectUnitByNatureName();
+ Map<String, Integer> retMap = comPbMemberTypeVOS.stream().collect(Collectors.toMap(ComPbMemberTypeVO::getCountName, ComPbMemberTypeVO::getCountNum));
+ return R.ok(retMap);
+ }
}
--
Gitblit v1.7.1