|
|
@ -23,6 +23,7 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
@ -154,6 +155,12 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
|
originalEntity.setCode(formDTO.getCode()); |
|
|
|
originalEntity.setContacts(formDTO.getContacts()); |
|
|
|
originalEntity.setMobile(formDTO.getMobile()); |
|
|
|
if (StringUtils.isNotBlank(originalEntity.getAreaCode()) |
|
|
|
&& originalEntity.getAreaCode().contains("UD") |
|
|
|
&& StringUtils.isNotBlank(formDTO.getAreaCode()) |
|
|
|
&& "other".equals(formDTO.getAreaCode())) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "自定义编码不允许修改", "自定义组织区划代码不允许修改"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(formDTO.getAreaCode()) && !formDTO.getAreaCode().equals(originalEntity.getAreaCode())) { |
|
|
|
CustomerAgencyEntity parent = customerAgencyDao.selectById(originalEntity.getPid()); |
|
|
|
//如果修改了areaCode。
|
|
|
|