修改基础信息导入是查询性别的逻辑

This commit is contained in:
wans 2021-04-28 18:20:58 +08:00
parent e79bdddf02
commit 0694ea8f94
2 changed files with 8 additions and 6 deletions

View File

@ -307,8 +307,10 @@ public class BasePopulationInfoServiceImpl extends AbstractService implements IB
if(populationInfoDTO == null){ if(populationInfoDTO == null){
return new BasePopulationInfoDTO(); return new BasePopulationInfoDTO();
} }
DataDictionaryDTO dictDto = dataDictionaryService.getDictionaryById(populationInfoDTO.getGender()); if(!"".equals(populationInfoDTO.getGender())){
populationInfoDTO.setGender(dictDto == null ? "" : dictDto.getDictionaryName()); DataDictionaryDTO dictDto = dataDictionaryService.getDictionaryById(populationInfoDTO.getGender());
populationInfoDTO.setGender(dictDto == null ? "" : dictDto.getDictionaryName());
}
return populationInfoDTO; return populationInfoDTO;
} }
} }

View File

@ -136,16 +136,16 @@ public class PopulationCountsServiceImpl extends BaseService implements IPopulat
public PopulationCountsDTO getGenderECharts(Map<String, Object> params) { public PopulationCountsDTO getGenderECharts(Map<String, Object> params) {
PopulationCountsDTO countsDTO = new PopulationCountsDTO(); PopulationCountsDTO countsDTO = new PopulationCountsDTO();
//未知的性别 //未知的性别
params.put("gender","未知的性别"); params.put("gender","3d46697d-5d0e-4fff-8470-48d08c8a0b44");
SuccessResultData<Integer> unknowGender = basePopulationInfoService.countBasePopulationInfo(params); SuccessResultData<Integer> unknowGender = basePopulationInfoService.countBasePopulationInfo(params);
//男性 //男性
params.put("gender","男性"); params.put("gender","46bec29f-2368-44f7-98d0-b33246e5e16d");
SuccessResultData<Integer> man = basePopulationInfoService.countBasePopulationInfo(params); SuccessResultData<Integer> man = basePopulationInfoService.countBasePopulationInfo(params);
//女性 //女性
params.put("gender","女性"); params.put("gender","4a5f549a-d339-4403-8d26-9058e80499b1");
SuccessResultData<Integer> woman = basePopulationInfoService.countBasePopulationInfo(params); SuccessResultData<Integer> woman = basePopulationInfoService.countBasePopulationInfo(params);
//未说明的性别 //未说明的性别
params.put("gender","未说明的性别"); params.put("gender","01fffb32-73ca-4872-9d2f-abb2158f0e07");
SuccessResultData<Integer> unDiscription = basePopulationInfoService.countBasePopulationInfo(params); SuccessResultData<Integer> unDiscription = basePopulationInfoService.countBasePopulationInfo(params);
String xAxis = "男性,女性,未知的性别,未说明的性别"; String xAxis = "男性,女性,未知的性别,未说明的性别";
String countsAppend = ""; String countsAppend = "";