From 70d2a5d0f9c6951b2d4cac954041ed73582ff7eb Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 09 六月 2025 11:54:00 +0800
Subject: [PATCH] 6.9新增登录失败冻结逻辑

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |  196 +++++++++++++++++++++++++++++++-----------------
 1 files changed, 125 insertions(+), 71 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
index dbbac7e..80c12a7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -721,14 +721,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -736,14 +736,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -751,7 +751,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -1042,14 +1042,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -1057,14 +1057,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -1072,7 +1072,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -1246,7 +1246,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -1366,14 +1370,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -1381,14 +1385,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -1396,7 +1400,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -1570,7 +1574,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -1690,14 +1698,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -1705,14 +1713,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -1720,7 +1728,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -1894,7 +1902,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -2014,14 +2026,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -2029,14 +2041,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -2044,7 +2056,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -2218,7 +2230,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -2339,14 +2355,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -2354,14 +2370,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -2369,7 +2385,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -2543,7 +2559,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -2664,14 +2684,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -2679,14 +2699,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -2694,7 +2714,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -2867,7 +2887,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -2987,14 +3011,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -3002,14 +3026,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -3017,7 +3041,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -3190,7 +3214,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -3310,14 +3338,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -3325,14 +3353,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -3340,7 +3368,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -3513,7 +3541,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -3633,14 +3665,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -3648,14 +3680,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -3663,7 +3695,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -3836,7 +3868,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -3961,14 +3997,14 @@
             Integer nub = 1;
 
             // 查询所有人口数据放入HashMap中
-            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null);
+            List<ComMngPopulationDO> populationList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId,communityId));
             HashMap<String, Object> populationMap = new HashMap<>();
             populationList.forEach(population -> {
                 String key = population.getCardNo();
                 populationMap.put(key, population);
             });
             // 查询所有房屋信息放入到HashMap中
-            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null);
+            List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getCommunityId,communityId));
             HashMap<String, Object> houseMap = new HashMap<>();
             houseLists.forEach(house -> {
                 String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo()
@@ -3976,14 +4012,14 @@
                 houseMap.put(key, house);
             });
 
-            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null);
+            List<ComMngVillageDO> villageList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId,communityId));
             HashMap<String, Object> villageMap = new HashMap<>();
             villageList.forEach(village -> {
                 String key = village.getCommunityId() + village.getAlley() + village.getHouseNum();
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -3991,7 +4027,7 @@
             });
 
             List<ComMngPopulationCommunityTagsDO> populationCommunityLists =
-                comMngPopulationCommunityTagsDAO.selectList(null);
+                comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda().eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId));
             HashMap<String, Object> populationCommunityMap = new HashMap<>();
             populationCommunityLists.forEach(populationCommunity -> {
                 String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + "";
@@ -4164,7 +4200,11 @@
                                 iterator.remove();
                         }
                         if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+Joiner.on(",").join(userTag));
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
                         }
                         else{
                             comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
@@ -4306,7 +4346,7 @@
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -4488,8 +4528,15 @@
                                 iterator.remove();
                             }
                         }
-                        if(userTag != null && userTag.size() > 0){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel() + "," + Joiner.on(",").join(userTag));
+                        if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
+                        }
+                        else{
+                            comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                         }
                         comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                         updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
@@ -4627,7 +4674,7 @@
                 villageMap.put(key, village);
             });
 
-            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null);
+            List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectListIndex(communityId);
             HashMap<String, Object> houseUserMap = new HashMap<>();
             houseUserLists.forEach(houseUser -> {
                 String key = houseUser.getPopulId() + houseUser.getHouseId() + "";
@@ -4809,8 +4856,15 @@
                                 iterator.remove();
                             }
                         }
-                        if(userTag != null && userTag.size() > 0){
-                            comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel() + "," + Joiner.on(",").join(userTag));
+                        if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel())){
+                            for(String tag:userTag){
+                                if(!comMngPopulationCommunityTagsDO.getLabel().contains(tag)){
+                                    comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel()+","+tag);
+                                }
+                            }
+                        }
+                        else{
+                            comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                         }
                         comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                         updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);

--
Gitblit v1.7.1