| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationDrugMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateDrugPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateDrugPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveDrugPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveDrugPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setDrugMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationCorrectMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateCorrectPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateCorrectPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveCorrectPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveCorrectPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setCorrectMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationMajorMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateMajorPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateMajorPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveMajorPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveMajorPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setMajorMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationCultMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateCultPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateCultPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveCultPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveCultPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setCultMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationRehabilitationMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateRehabilitationPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateRehabilitationPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveRehabilitationPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveRehabilitationPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setRehabilitationMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationKeyMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateKeyPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateKeyPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveKeyPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveKeyPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setKeyMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationSentenceMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateSentencePopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateSentencePopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveSentencePopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveSentencePopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setSentenceMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationVeteransMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateVeteransPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateVeteransPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveVeteransPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveVeteransPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationVeteransMistakeExcelVO mistake = new ComMngPopulationVeteransMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setVeteransMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationDisabilityMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateDisabilityPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateDisabilityPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveDisabilityPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveDisabilityPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setDisabilityMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | |
| | | List<ComDrugPopulationDO> updateDrugList = new ArrayList<>(); |
| | | //需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | //需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationLowSecurityMistakeExcelVO> mistakes = new ArrayList<>(); |
| | |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String,Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key,populationCommunity); |
| | | }); |
| | | |
| | | |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateLowSecurityPopulationDO(vo,populationDO,labelList); |
| | | ComMngPopulationDO updatePopulationDO = updateLowSecurityPopulationDO(vo,populationDO,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = saveLowSecurityPopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | populationDO = saveLowSecurityPopulationDO(vo, populationActVO, comMngVillageDO,userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | //处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if(isOnly(populationCommunityKey,populationCommunityMap)){ |
| | | //实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } |
| | | }else { |
| | | //实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setLowSecurityMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | |
| | | log.info("执行数据库导入人口房屋关系"); |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if(!savePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if(!updatePopulationCommunityList.isEmpty()){ |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateDrugPopulationDO(ComMngPopulationDrugExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateDrugPopulationDO(ComMngPopulationDrugExcelVO vo, ComMngPopulationDO populationDO, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDrugPopulationDO comDrugPopulationDO = comDrugPopulationDAO.selectOne(new QueryWrapper<ComDrugPopulationDO>().lambda() |
| | | .eq(ComDrugPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | |
| | | if (comDrugPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comDrugPopulationDO); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateCorrectPopulationDO(ComMngPopulationCorrectExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateCorrectPopulationDO(ComMngPopulationCorrectExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCorrectPopulationDO comCorrectPopulationDO = comCorrectPopulationDAO.selectOne(new QueryWrapper<ComCorrectPopulationDO>().lambda() |
| | | .eq(ComCorrectPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comCorrectPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comCorrectPopulationDO); |
| | | comCorrectPopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateMajorPopulationDO(ComMngPopulationMajorExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateMajorPopulationDO(ComMngPopulationMajorExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComMajorPopulationDO comMajorPopulationDO = comMajorPopulationDAO.selectOne(new QueryWrapper<ComMajorPopulationDO>().lambda() |
| | | .eq(ComMajorPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comMajorPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comMajorPopulationDO); |
| | | comMajorPopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateCultPopulationDO(ComMngPopulationCultExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateCultPopulationDO(ComMngPopulationCultExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCultPopulationDO comCultPopulationDO = comCultPopulationDAO.selectOne(new QueryWrapper<ComCultPopulationDO>().lambda(). |
| | | eq(ComCultPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comCultPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comCultPopulationDO); |
| | | comCultPopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateRehabilitationPopulationDO(ComMngPopulationRehabilitationExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateRehabilitationPopulationDO(ComMngPopulationRehabilitationExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComRehabilitationPopulationDO comRehabilitationPopulationDO = comRehabilitationPopulationDAO.selectOne(new QueryWrapper<ComRehabilitationPopulationDO>().lambda(). |
| | | eq(ComRehabilitationPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comRehabilitationPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comRehabilitationPopulationDO); |
| | | comRehabilitationPopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateKeyPopulationDO(ComMngPopulationKeyExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateKeyPopulationDO(ComMngPopulationKeyExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComKeyPopulationDO comKeyPopulationDO = comKeyPopulationDAO.selectOne(new QueryWrapper<ComKeyPopulationDO>().lambda(). |
| | | eq(ComKeyPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comKeyPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comKeyPopulationDO); |
| | | comKeyPopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateSentencePopulationDO(ComMngPopulationSentenceExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateSentencePopulationDO(ComMngPopulationSentenceExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComSentencePopulationDO comSentencePopulationDO = comSentencePopulationDAO.selectOne(new QueryWrapper<ComSentencePopulationDO>().lambda(). |
| | | eq(ComSentencePopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comSentencePopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comSentencePopulationDO); |
| | | comSentencePopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateVeteransPopulationDO(ComMngPopulationVeteransExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateVeteransPopulationDO(ComMngPopulationVeteransExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComVeteransPopulationDO comVeteransPopulationDO = comVeteransPopulationDAO.selectOne(new QueryWrapper<ComVeteransPopulationDO>().lambda(). |
| | | eq(ComVeteransPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comVeteransPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comVeteransPopulationDO); |
| | | comVeteransPopulationDO.setCardNo(cardNoAES); |
| | |
| | | } |
| | | return populationDO; |
| | | } |
| | | private ComMngPopulationDO updateDisabilityPopulationDO(ComMngPopulationDisabilityExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateDisabilityPopulationDO(ComMngPopulationDisabilityExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDisabilityPopulationDO comDisabilityPopulationDO = comDisabilityPopulationDAO.selectOne(new QueryWrapper<ComDisabilityPopulationDO>().lambda(). |
| | | eq(ComDisabilityPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comDisabilityPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comDisabilityPopulationDO); |
| | | comDisabilityPopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateLowSecurityPopulationDO(ComMngPopulationLowSecurityExcelVO vo, ComMngPopulationDO populationDO,List<String> labelList){ |
| | | private ComMngPopulationDO updateLowSecurityPopulationDO(ComMngPopulationLowSecurityExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComLowSecurityPopulationDO comLowSecurityPopulationDO = comLowSecurityPopulationDAO.selectOne(new QueryWrapper<ComLowSecurityPopulationDO>().lambda(). |
| | | eq(ComLowSecurityPopulationDO::getPopulationId, populationDO.getId())); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | }catch (Exception e){ |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comLowSecurityPopulationDO != null) { |
| | | BeanUtils.copyProperties(vo, comLowSecurityPopulationDO); |
| | | comLowSecurityPopulationDO.setCardNo(cardNoAES); |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveDrugPopulationDO(ComMngPopulationDrugExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveDrugPopulationDO(ComMngPopulationDrugExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDrugPopulationDO comDrugPopulationDO = new ComDrugPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comDrugPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveCorrectPopulationDO(ComMngPopulationCorrectExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveCorrectPopulationDO(ComMngPopulationCorrectExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCorrectPopulationDO comCorrectPopulationDO = new ComCorrectPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comCorrectPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveMajorPopulationDO(ComMngPopulationMajorExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveMajorPopulationDO(ComMngPopulationMajorExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComMajorPopulationDO comMajorPopulationDO = new ComMajorPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comMajorPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveCultPopulationDO(ComMngPopulationCultExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveCultPopulationDO(ComMngPopulationCultExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCultPopulationDO comCultPopulationDO = new ComCultPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comCultPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveRehabilitationPopulationDO(ComMngPopulationRehabilitationExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveRehabilitationPopulationDO(ComMngPopulationRehabilitationExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComRehabilitationPopulationDO comRehabilitationPopulationDO = new ComRehabilitationPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comRehabilitationPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveKeyPopulationDO(ComMngPopulationKeyExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveKeyPopulationDO(ComMngPopulationKeyExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComKeyPopulationDO comKeyPopulationDO = new ComKeyPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comKeyPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveSentencePopulationDO(ComMngPopulationSentenceExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveSentencePopulationDO(ComMngPopulationSentenceExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComSentencePopulationDO comSentencePopulationDO = new ComSentencePopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comSentencePopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveVeteransPopulationDO(ComMngPopulationVeteransExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveVeteransPopulationDO(ComMngPopulationVeteransExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComVeteransPopulationDO comVeteransPopulationDO = new ComVeteransPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comVeteransPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveDisabilityPopulationDO(ComMngPopulationDisabilityExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveDisabilityPopulationDO(ComMngPopulationDisabilityExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDisabilityPopulationDO comDisabilityPopulationDO = new ComDisabilityPopulationDO(); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comDisabilityPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveLowSecurityPopulationDO(ComMngPopulationLowSecurityExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,List<String> labelList) { |
| | | private ComMngPopulationDO saveLowSecurityPopulationDO(ComMngPopulationLowSecurityExcelVO vo, ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO,Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | ComLowSecurityPopulationDO comLowSecurityPopulationDO = new ComLowSecurityPopulationDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comLowSecurityPopulationDO.setPopulationId(populationId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | |
| | | //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | //新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |