From b1d9b2a08f05464f0130c3b93e9664bb8ec0f0b8 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 20 十月 2022 15:16:20 +0800 Subject: [PATCH] Merge branch 'local_20221014' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java | 71 ++++++++++++++++++++++++++++++++++- 1 files changed, 69 insertions(+), 2 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 774989d..3a5477d 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 @@ -280,7 +280,19 @@ */ @Override public R unitStatisticsTop(Long communityId, String belongTo, String choice) { - return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo, choice)); + R r = communityService.selectCommunityIds(communityId); + List<Long> communityIds = null; + if(R.isOk(r)){ + communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); + if (CollUtil.isEmpty(communityIds)) { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + }else { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice)); } /** @@ -290,6 +302,20 @@ */ @Override public R unitStatistics(PagePbCheckUnitCommonDto commonDto) { + Long communityId = commonDto.getCommunityId(); + R r = communityService.selectCommunityIds(communityId); + List<Long> communityIds = null; + if(R.isOk(r)){ + communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); + if (CollUtil.isEmpty(communityIds)) { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + }else { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + commonDto.setCommunityIds(communityIds); return R.ok(this.baseMapper.unitStatistics(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); } @@ -303,7 +329,20 @@ */ @Override public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) { - return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo, choice, checkUnitId)); + + R r = communityService.selectCommunityIds(communityId); + List<Long> communityIds = null; + if(R.isOk(r)){ + communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); + if (CollUtil.isEmpty(communityIds)) { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + }else { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId)); } /** @@ -313,6 +352,20 @@ */ @Override public R pbStatisticsBelong(PagePbCheckUnitCommonDto commonDto) { + Long communityId = commonDto.getCommunityId(); + R r = communityService.selectCommunityIds(communityId); + List<Long> communityIds = null; + if(R.isOk(r)){ + communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); + if (CollUtil.isEmpty(communityIds)) { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + }else { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + commonDto.setCommunityIds(communityIds); return R.ok(this.baseMapper.pbStatisticsBelong(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); } @@ -323,6 +376,20 @@ */ @Override public R pbStatisticsUnit(PagePbCheckUnitCommonDto commonDto) { + Long communityId = commonDto.getCommunityId(); + R r = communityService.selectCommunityIds(communityId); + List<Long> communityIds = null; + if(R.isOk(r)){ + communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); + if (CollUtil.isEmpty(communityIds)) { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + }else { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + commonDto.setCommunityIds(communityIds); return R.ok(this.baseMapper.pbStatisticsUnit(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); } } -- Gitblit v1.7.1