Browse Source

Merge remote-tracking branch 'origin/dev_area_code' into dev_temp

dev_shibei_match
yinzuomei 4 years ago
parent
commit
0a5192efc0
  1. 22
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

22
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -251,6 +251,28 @@ public class AgencyServiceImpl implements AgencyService {
parentList = customerAgencyDao.selectPAgencyById(listStr);
agencysResultDTO.setParentList(parentList);
agencysResultDTO.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(entity.getCustomerId()));
//查询组织区划的名称
if (null != entity && StringUtils.isNotBlank(entity.getAreaCode())) {
switch (entity.getLevel()) {
case CustomerAgencyConstant.PROVINCE_LEVEL:
agencysResultDTO.setAreaName(entity.getProvince());
break;
case CustomerAgencyConstant.CITY_LEVEL:
agencysResultDTO.setAreaName(entity.getCity());
break;
case CustomerAgencyConstant.DISTRICT:
agencysResultDTO.setAreaName(entity.getDistrict());
break;
case CustomerAgencyConstant.STREET_LEVEL:
agencysResultDTO.setAreaName(entity.getStreet());
break;
case CustomerAgencyConstant.COMMUNITY_LEVEL:
agencysResultDTO.setAreaName(entity.getCommunity());
break;
default:
agencysResultDTO.setAreaName(StrConstant.EPMETY_STR);
}
}
return new Result<AgencysResultDTO>().ok(agencysResultDTO);
}

Loading…
Cancel
Save