| | |
| | | List<ComMngPopulationDO> saveList = new ArrayList<>(); |
| | | // 需要修改的人口集合 |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | // 需要新增的吸毒人员集合 |
| | | List<ComDrugPopulationDO> saveDrugList = new ArrayList<>(); |
| | | // 需要修改的吸毒人员集合 |
| | | List<ComDrugPopulationDO> updateDrugList = new ArrayList<>(); |
| | | // 需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel()) |
| | | && comMngPopulationCommunityTagsDO.getLabel().contains(s)){ |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | } |
| | | if(userTag != null && userTag.size() > 0){ |
| | | comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel() + "," + Joiner.on(",").join(userTag)); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | |
| | | List<ComMngPopulationDO> saveList = new ArrayList<>(); |
| | | // 需要修改的人口集合 |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | // 需要新增的吸毒人员集合 |
| | | List<ComDrugPopulationDO> saveDrugList = new ArrayList<>(); |
| | | // 需要修改的吸毒人员集合 |
| | | List<ComDrugPopulationDO> updateDrugList = new ArrayList<>(); |
| | | // 需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | if(StringUtils.isNotEmpty(comMngPopulationCommunityTagsDO.getLabel()) |
| | | && comMngPopulationCommunityTagsDO.getLabel().contains(s)){ |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | } |
| | | if(userTag != null && userTag.size() > 0){ |
| | | comMngPopulationCommunityTagsDO.setLabel(comMngPopulationCommunityTagsDO.getLabel() + "," + Joiner.on(",").join(userTag)); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (!comElderAuthElderliesDO.getIsAlive().equals(1) || !comElderAuthElderliesDO.getIsRegister().equals(1)) { |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | } |
| | | // if (!comElderAuthElderliesDO.getIsAlive().equals(1) || !comElderAuthElderliesDO.getIsRegister().equals(1)) { |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = DateUtils.getYear(nowDate); |
| | | // // 获取当前月 |
| | | // int month = DateUtils.getMonth(nowDate) + 1; |
| | | // ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | // .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | // comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | // comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | // } |
| | | // } |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | } else { |
| | | comElderAuthElderliesDO = new ComElderAuthElderliesDO(); |
| | |
| | | comElderAuthElderliesDO.setPopulationId(populationDO.getId()); |
| | | comElderAuthElderliesDO.setCommunityId(communityId); |
| | | comElderAuthElderliesDO.setStreetId(populationDO.getStreetId()); |
| | | comElderAuthElderliesDO.setIdCard(cardNoAES); |
| | | comElderAuthElderliesDO.setIdCard(vo.getCardNo()); |
| | | comElderAuthElderliesDO.setAddress(vo.getNowAddress()); |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = DateUtils.getYear(nowDate); |
| | | // // 获取当前月 |
| | | // int month = DateUtils.getMonth(nowDate) + 1; |
| | | // ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | // .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | // comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | // comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | // } |
| | | comElderAuthElderliesDAO.insert(comElderAuthElderliesDO); |
| | | } |
| | | return populationDO; |
| | |
| | | BeanUtils.copyProperties(vo, comPensionAuthPensionerDO); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | if (!comPensionAuthPensionerDO.getIsAlive().equals(1) || !comPensionAuthPensionerDO.getIsRegister().equals(1)) { |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = (DateUtils.getYear(nowDate)); |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | if(null == comPensionAuthStatisticsDO){ |
| | | comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year - 1)); |
| | | } |
| | | comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | } |
| | | } |
| | | // if (!comPensionAuthPensionerDO.getIsAlive().equals(1) || !comPensionAuthPensionerDO.getIsRegister().equals(1)) { |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = (DateUtils.getYear(nowDate)); |
| | | // ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | // .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | // .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | // if(null == comPensionAuthStatisticsDO){ |
| | | // comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | // .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | // .eq(ComPensionAuthStatisticsDO::getYear, year - 1)); |
| | | // } |
| | | // comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | // comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | // } |
| | | // } |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | } else { |
| | | comPensionAuthPensionerDO = new ComPensionAuthPensionerDO(); |
| | |
| | | comPensionAuthPensionerDO.setPopulationId(populationDO.getId()); |
| | | comPensionAuthPensionerDO.setCommunityId(populationDO.getActId()); |
| | | comPensionAuthPensionerDO.setStreetId(populationDO.getStreetId()); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setIdCard(vo.getCardNo()); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | comPensionAuthPensionerDAO.insert(comPensionAuthPensionerDO); |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = (DateUtils.getYear(nowDate)); |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | } |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Date nowDate = new Date(); |
| | | // // 获取当前年 |
| | | // int year = (DateUtils.getYear(nowDate)); |
| | | // ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | // .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | // .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | // comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | // comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | // } |
| | | } |
| | | return populationDO; |
| | | } |
| | |
| | | comElderAuthElderliesDO.setId(Snowflake.getId()); |
| | | comElderAuthElderliesDO.setCommunityId(comActDO.getCommunityId()); |
| | | comElderAuthElderliesDO.setStreetId(comActDO.getStreetId()); |
| | | comElderAuthElderliesDO.setIdCard(cardNoAES); |
| | | comElderAuthElderliesDO.setIdCard(vo.getCardNo()); |
| | | comElderAuthElderliesDO.setAddress(vo.getNowAddress()); |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | // 获取当前年 |
| | | int year = calendar.get(Calendar.YEAR); |
| | | // 获取当前月 |
| | | int month = calendar.get(Calendar.MONTH) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | // if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | // Calendar calendar = Calendar.getInstance(); |
| | | // // 获取当前年 |
| | | // int year = calendar.get(Calendar.YEAR); |
| | | // // 获取当前月 |
| | | // int month = calendar.get(Calendar.MONTH) + 1; |
| | | // ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | // .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | // comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | // comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | // } |
| | | comElderAuthElderliesDAO.insert(comElderAuthElderliesDO); |
| | | return populationDO; |
| | | } |
| | |
| | | comPensionAuthPensionerDO.setId(Snowflake.getId()); |
| | | comPensionAuthPensionerDO.setCommunityId(comActDO.getCommunityId()); |
| | | comPensionAuthPensionerDO.setStreetId(comActDO.getStreetId()); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setIdCard(vo.getCardNo()); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | comPensionAuthPensionerDAO.insert(comPensionAuthPensionerDO); |
| | | return populationDO; |