From 5231adb181a896138c80cb6a4ba10967ef0f5644 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 20 十月 2022 14:29:21 +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 |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 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 529c53e..7927e5d 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
@@ -1,5 +1,7 @@
 package com.panzhihua.service_dangjian.service.impl;
 
+import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.google.common.collect.Lists;
@@ -7,6 +9,7 @@
 import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo;
 import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO;
 import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO;
+import com.panzhihua.common.service.community.CommunityService;
 import com.panzhihua.common.utlis.StringUtils;
 import com.panzhihua.service_dangjian.dao.ComPbMemberDAO;
 import com.panzhihua.service_dangjian.dao.ComPbMemberRoleDAO;
@@ -48,6 +51,8 @@
     private ComPbMemberRoleDAO comPbMemberRoleDAO;
     @Resource
     private ComPbMemberService comPbMemberService;
+    @Resource
+    private CommunityService communityService;
 
     /**
      * description  queryByPage  分页查询
@@ -59,6 +64,20 @@
      */
     @Override
     public R queryByPage(PageComPbCheckUnitDto comPbCheckUnit) {
+
+        Long communityId = comPbCheckUnit.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);
+        }
         IPage<ComPbCheckUnitVo> checkUnitVoPage= this.baseMapper.queryAllByLimit(comPbCheckUnit, new Page(comPbCheckUnit.getPageNum(), comPbCheckUnit.getPageSize()));
         checkUnitVoPage.getRecords().forEach(checkUnit -> {
             if(StringUtils.isEmpty(checkUnit.getOrgName())){
@@ -168,6 +187,19 @@
      */
     @Override
     public R queryByList(PageComPbCheckUnitDto comPbCheckUnit) {
+        Long communityId = comPbCheckUnit.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);
+        }
         IPage<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByLimit(comPbCheckUnit,new Page(comPbCheckUnit.getPageNum(),comPbCheckUnit.getPageSize()));
         checkUnitList.getRecords().forEach(checkUnit -> {
             if(StringUtils.isEmpty(checkUnit.getOrgName())){

--
Gitblit v1.7.1