|
@ -19,6 +19,7 @@ package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
@ -243,6 +244,28 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
parentList = customerAgencyDao.selectPAgencyById(listStr); |
|
|
parentList = customerAgencyDao.selectPAgencyById(listStr); |
|
|
agencysResultDTO.setParentList(parentList); |
|
|
agencysResultDTO.setParentList(parentList); |
|
|
agencysResultDTO.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(entity.getCustomerId())); |
|
|
agencysResultDTO.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(entity.getCustomerId())); |
|
|
|
|
|
//查询组织区划的名称
|
|
|
|
|
|
if (null != entity && StringUtils.isNotBlank(entity.getAreaCode())) { |
|
|
|
|
|
switch (entity.getLevel()) { |
|
|
|
|
|
case CustomerAgencyConstant.PROVINCE_LEVEL: |
|
|
|
|
|
agencysResultDTO.setAgencyName(entity.getProvince()); |
|
|
|
|
|
break; |
|
|
|
|
|
case CustomerAgencyConstant.CITY_LEVEL: |
|
|
|
|
|
agencysResultDTO.setAgencyName(entity.getCity()); |
|
|
|
|
|
break; |
|
|
|
|
|
case CustomerAgencyConstant.DISTRICT: |
|
|
|
|
|
agencysResultDTO.setAgencyName(entity.getDistrict()); |
|
|
|
|
|
break; |
|
|
|
|
|
case CustomerAgencyConstant.STREET_LEVEL: |
|
|
|
|
|
agencysResultDTO.setAgencyName(entity.getStreet()); |
|
|
|
|
|
break; |
|
|
|
|
|
case CustomerAgencyConstant.COMMUNITY_LEVEL: |
|
|
|
|
|
agencysResultDTO.setAgencyName(entity.getCommunity()); |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
agencysResultDTO.setAgencyName(StrConstant.EPMETY_STR); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
return new Result<AgencysResultDTO>().ok(agencysResultDTO); |
|
|
return new Result<AgencysResultDTO>().ok(agencysResultDTO); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|