springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -4,15 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.PageComActDTO; import com.panzhihua.common.model.dtos.user.PageFeedBackDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActVO; import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO; import com.panzhihua.common.utlis.Snowflake; import com.panzhihua.service_community.dao.ComActDAO; import com.panzhihua.service_community.dao.ComActVillageDAO; import com.panzhihua.service_community.dao.ComStreetDAO; import com.panzhihua.service_community.model.dos.ComActDO; import com.panzhihua.service_community.model.dos.ComMngVillageDO; import com.panzhihua.service_community.model.dos.ComStreetDO; import com.panzhihua.service_community.service.ComActService; import org.springframework.beans.BeanUtils; @@ -57,6 +54,7 @@ if (integer > 0) { return R.fail("社区已经存在"); } comActDO.setCommunityId(Snowflake.getId()); BeanUtils.copyProperties(comActVO, comActDO); int insert = comActDAO.insert(comActDO); if (insert > 0) { springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -376,11 +376,11 @@ .eq(ComMngPopulationDO::getCardNo, cardNoAES)); if (populationDO == null) { //不存在实有人口,则新增 populationDO = savePopulationDO(vo, comActDO, comMngVillageDO, cardNoAES); populationDO = savePopulationDO(vo, comActDO, comMngVillageDO); } else { //如果存在人口信息,且是自用房,则更新人口默认的房屋信息 if (vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) { populationDO = updatePopulationHouseUse(vo, populationDO, cardNoAES); populationDO = updatePopulationHouseUse(vo, populationDO); } } @@ -413,22 +413,23 @@ return R.ok(); } private ComMngPopulationDO updatePopulationHouseUse(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO, String cardNoAES) throws Exception { private ComMngPopulationDO updatePopulationHouseUse(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO) throws Exception { populationDO.setRoad(vo.getRoad()); populationDO.setDoorNo(vo.getDoorNo()); populationDO.setFloor(vo.getFloor()); populationDO.setUnitNo(vo.getUnitNo()); populationDO.setHouseNo(vo.getHouseNo()); populationDO.setCardNo(cardNoAES); populationDO.setCardNo(vo.getCardNo()); populationDO.setCardNoStr(vo.getCardNo()); if (StringUtils.isNotEmpty(populationDO.getPhone())) { populationDO.setPhone(AESUtil.encrypt128(populationDO.getPhone(), aesKey)); // populationDO.setPhone(AESUtil.encrypt128(populationDO.getPhone(), aesKey)); populationDO.setPhone(populationDO.getPhone()); } this.baseMapper.updateById(populationDO); return populationDO; } private ComMngPopulationDO savePopulationDO(ComMngPopulationServeExcelVO vo, ComActDO comActDO, ComMngVillageDO comMngVillageDO, String cardNoAES) { private ComMngPopulationDO savePopulationDO(ComMngPopulationServeExcelVO vo, ComActDO comActDO, ComMngVillageDO comMngVillageDO) { ComMngPopulationDO populationDO = new ComMngPopulationDO(); BeanUtils.copyProperties(vo, populationDO); populationDO.setId(Snowflake.getId()); @@ -438,7 +439,7 @@ populationDO.setStreetId(comActDO.getStreetId()); populationDO.setLabel(Joiner.on(",").join(userTag)); populationDO.setVillageName(comMngVillageDO.getGroupAt()); populationDO.setCardNo(cardNoAES); populationDO.setCardNo(vo.getCardNo()); populationDO.setCardNoStr(vo.getCardNo()); populationDO.setUpdateAt(new Date()); this.baseMapper.insert(populationDO); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -11,6 +11,7 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; import com.panzhihua.common.model.vos.community.ComMngVillageVO; import com.panzhihua.common.utlis.Snowflake; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.dao.ComActDAO; import com.panzhihua.service_community.dao.ComActVillageDAO; @@ -60,6 +61,7 @@ if (comActDO == null || comActDO.getStreetId() == null) { return R.fail("社区没有绑定街道,请绑定后操作!"); } comMngVillageDO.setVillageId(Snowflake.getId()); comMngVillageDO.setStreetId(comActDO.getStreetId()); comMngVillageDO.setUpdateAt(new Date()); int insert = comActVillageDAO.insert(comMngVillageDO);