From 79ebda737b757f9d31c6634ef122883462361fe4 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期三, 31 三月 2021 10:11:39 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java index 411e239..43c8a62 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java @@ -27,6 +27,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; import javax.annotation.Resource; import java.util.ArrayList; @@ -249,6 +250,38 @@ if (comMngVillageDO == null) { throw new ServiceException("街道巷:" + vo.getRoad() + "不存在!"); } + //性别判断 + if(!StringUtils.isEmpty(vo.getSex())){ + if(vo.getSex().equals(ComMngPopulationServeExcelVO.sex.nan)){ + comMngPopulationDO.setSex(ComMngPopulationDO.sex.nan); + }else if(vo.getSex().equals(ComMngPopulationServeExcelVO.sex.nv)){ + comMngPopulationDO.setSex(ComMngPopulationDO.sex.nv); + }else{ + comMngPopulationDO.setSex(ComMngPopulationDO.sex.no); + } + } + //是否租住判断 + if(!StringUtils.isEmpty(vo.getIsRent())){ + if(vo.getIsRent().equals(ComMngPopulationServeExcelVO.isOk.no)){ + comMngPopulationDO.setIsRent(ComMngPopulationDO.isOk.no); + }else{ + comMngPopulationDO.setIsRent(ComMngPopulationDO.isOk.yes); + } + } + //政治面貌判断 + if(!StringUtils.isEmpty(vo.getPoliticalOutlook())){ + if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.qun)){ + comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.qun); + }else if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.tuan)){ + comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.tuan); + }else if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.dang)){ + comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.dang); + }else if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.wu)){ + comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.wu); + }else{ + comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.no); + } + } comMngPopulationDO.setActId(comMngVillageDO.getVillageId()); comMngPopulationDO.setActId(comActDO.getCommunityId()); comMngPopulationDO.setStreetId(comActDO.getStreetId()); -- Gitblit v1.7.1