101captain
2022-01-21 b0839d21362aec0dcdbd00e3d0d56ceb368a86ab
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -507,6 +507,19 @@
            }
        }
        if(comMngPopulationVO.getType()!=null){
            switch (comMngPopulationVO.getType()){
                case 1 : comMngPopulationVO.setAgeStart("80");
                         comMngPopulationVO.setAgeEnd("89");
                         break;
                case 2 : comMngPopulationVO.setAgeStart("90");
                         comMngPopulationVO.setAgeEnd("99");
                         break;
                case 3 : comMngPopulationVO.setAgeStart("100");
                         break;
            }
        }
        if (StringUtils.isNotEmpty(comMngPopulationVO.getAgeStart())) {
            String ageStartTime = DateUtils.getDateFormatString(
                DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeStart()))), "yyyy-MM-dd");
@@ -550,6 +563,15 @@
                    populDO.setPoliticalOutlookName(
                        PopulPoliticalOutlookEnum.getCnDescByName(populDO.getPoliticalOutlook()));
                    populDO.setMarriageName(PopulMarriageEnum.getCnDescByName(populDO.getMarriage()));
                    if(populDO.getAge()>=80&&populDO.getAge()<=89){
                        populDO.setType(1);
                    }
                    if(populDO.getAge()>=90&&populDO.getAge()<=99){
                        populDO.setType(2);
                    }
                    if(populDO.getAge()>=100){
                        populDO.setType(3);
                    }
                }
            });
        }