From 6ea2476bb8a69e171907e4f12d005ef07b640f95 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期一, 13 十一月 2023 18:33:40 +0800
Subject: [PATCH] 修改参数名称
---
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java | 77 ++++++++++++++++++++++----------------
1 files changed, 45 insertions(+), 32 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
index 31a4649..b3cf77c 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -63,12 +63,14 @@
public R queryByPage(PageComPbCheckUnitDto comPbCheckUnit) {
Long communityId = comPbCheckUnit.getCommunityId();
- List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
- if (CollUtil.isEmpty(communityIds)) {
- communityIds = new ArrayList<>();
- communityIds.add(communityId);
+ if (communityId != null){
+ List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds = new ArrayList<>();
+ communityIds.add(communityId);
+ }
+ comPbCheckUnit.setCommunityIds(communityIds);
}
- comPbCheckUnit.setCommunityIds(communityIds);
IPage<ComPbCheckUnitVo> checkUnitVoPage= this.baseMapper.queryAllByLimit(comPbCheckUnit, new Page(comPbCheckUnit.getPageNum(), comPbCheckUnit.getPageSize()));
checkUnitVoPage.getRecords().forEach(checkUnit -> {
if(StringUtils.isEmpty(checkUnit.getOrgName())){
@@ -179,12 +181,14 @@
@Override
public R queryByList(PageComPbCheckUnitDto comPbCheckUnit) {
Long communityId = comPbCheckUnit.getCommunityId();
- List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
- if (CollUtil.isEmpty(communityIds)) {
- communityIds = new ArrayList<>();
- communityIds.add(communityId);
+ if (communityId != null){
+ List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds = new ArrayList<>();
+ communityIds.add(communityId);
+ }
+ comPbCheckUnit.setCommunityIds(communityIds);
}
- comPbCheckUnit.setCommunityIds(communityIds);
IPage<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByLimit(comPbCheckUnit,new Page(comPbCheckUnit.getPageNum(),comPbCheckUnit.getPageSize()));
checkUnitList.getRecords().forEach(checkUnit -> {
if(StringUtils.isEmpty(checkUnit.getOrgName())){
@@ -262,13 +266,16 @@
* @return
*/
@Override
- public R unitStatisticsTop(Long communityId, String belongTo, String choice) {
- List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
- if (CollUtil.isEmpty(communityIds)) {
- communityIds = new ArrayList<>();
- communityIds.add(communityId);
+ public R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds) {
+ List<Long> communityIds = new ArrayList<>();
+ if (null != communityId){
+ communityIds = comPbMemberDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds.add(communityId);
+ }
}
- return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice));
+
+ return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice,unitIds));
}
/**
@@ -279,12 +286,14 @@
@Override
public R unitStatistics(PagePbCheckUnitCommonDto commonDto) {
Long communityId = commonDto.getCommunityId();
- List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
- if (CollUtil.isEmpty(communityIds)) {
- communityIds = new ArrayList<>();
- communityIds.add(communityId);
+ if (null != communityId) {
+ List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds = new ArrayList<>();
+ communityIds.add(communityId);
+ }
+ commonDto.setCommunityIds(communityIds);
}
- commonDto.setCommunityIds(communityIds);
return R.ok(this.baseMapper.unitStatistics(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize())));
}
@@ -297,14 +306,16 @@
* @return
*/
@Override
- public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) {
+ public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId,Long[] unitIds) {
- List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
- if (CollUtil.isEmpty(communityIds)) {
- communityIds = new ArrayList<>();
- communityIds.add(communityId);
+ List<Long> communityIds = new ArrayList<>();
+ if (null != communityId){
+ communityIds = comPbMemberDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds.add(communityId);
+ }
}
- return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId));
+ return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId,unitIds));
}
/**
@@ -315,12 +326,14 @@
@Override
public R pbStatisticsBelong(PagePbCheckUnitCommonDto commonDto) {
Long communityId = commonDto.getCommunityId();
- List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
- if (CollUtil.isEmpty(communityIds)) {
- communityIds = new ArrayList<>();
- communityIds.add(communityId);
+ if (null != communityId) {
+ List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds = new ArrayList<>();
+ communityIds.add(communityId);
+ }
+ commonDto.setCommunityIds(communityIds);
}
- commonDto.setCommunityIds(communityIds);
return R.ok(this.baseMapper.pbStatisticsBelong(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize())));
}
--
Gitblit v1.7.1