|
@ -165,7 +165,7 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
originalEntity.setLongitude(formDTO.getLongitude()); |
|
|
originalEntity.setLongitude(formDTO.getLongitude()); |
|
|
} |
|
|
} |
|
|
originalEntity.setCenterAddress(formDTO.getCenterAddress()); |
|
|
originalEntity.setCenterAddress(formDTO.getCenterAddress()); |
|
|
//平阴的工作端小程序与产品入参有差距,接口兼容,这个参数不让前端传了...
|
|
|
//平阴的工作端小程序与产品入参有差距,为了接口兼容,这个参数不让前端传了...
|
|
|
formDTO.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(formDTO.getCustomerId())); |
|
|
formDTO.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(formDTO.getCustomerId())); |
|
|
//当前客户开启了area_code_switch参数:open: 选择地区编码必填;closed: 无需选择地区编码
|
|
|
//当前客户开启了area_code_switch参数:open: 选择地区编码必填;closed: 无需选择地区编码
|
|
|
if (CustomerAgencyConstant.AREA_CODE_SWITCH_OPEN.equals(formDTO.getAreaCodeSwitch())) { |
|
|
if (CustomerAgencyConstant.AREA_CODE_SWITCH_OPEN.equals(formDTO.getAreaCodeSwitch())) { |
|
@ -184,7 +184,7 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
} |
|
|
} |
|
|
//什么时候要全部置为空呢?原来没有现在有 || 原来与现在不一致
|
|
|
//什么时候要全部置为空呢?原来没有现在有 || 原来与现在不一致
|
|
|
if ((StringUtils.isBlank(originalAreaCode) && StringUtils.isNotBlank(formDTO.getAreaCode())) |
|
|
if ((StringUtils.isBlank(originalAreaCode) && StringUtils.isNotBlank(formDTO.getAreaCode())) |
|
|
|| (!formDTO.getAreaCode().equals(originalAreaCode))) { |
|
|
|| (StringUtils.isNotBlank(formDTO.getAreaCode()) && !formDTO.getAreaCode().equals(originalAreaCode))) { |
|
|
updateSubOrg(originalEntity.getCustomerId(), formDTO, originalAreaCode); |
|
|
updateSubOrg(originalEntity.getCustomerId(), formDTO, originalAreaCode); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -319,12 +319,13 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
private void checkEditAgencyFormDTO(EditAgencyFormDTO formDTO,CustomerAgencyEntity originalEntity) { |
|
|
private void checkEditAgencyFormDTO(EditAgencyFormDTO formDTO,CustomerAgencyEntity originalEntity) { |
|
|
//根组织不允许修改
|
|
|
//根组织不允许修改
|
|
|
if (StringUtils.isNotBlank(originalEntity.getPid()) && !NumConstant.ZERO_STR.equals(originalEntity.getPid())) { |
|
|
if (StringUtils.isNotBlank(originalEntity.getPid()) && !NumConstant.ZERO_STR.equals(originalEntity.getPid())) { |
|
|
if (StringUtils.isBlank(formDTO.getAreaCode())) { |
|
|
//03.23:平阴线上版本与产品主线版本差距太大,平阴的修改组织只能修改组织名称。
|
|
|
|
|
|
/*if (StringUtils.isBlank(formDTO.getAreaCode())) { |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "area_code_switch is open areaCode不能为空", "组织区划不能为空"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "area_code_switch is open areaCode不能为空", "组织区划不能为空"); |
|
|
} |
|
|
} |
|
|
if (StringUtils.isBlank(formDTO.getParentAreaCode())) { |
|
|
if (StringUtils.isBlank(formDTO.getParentAreaCode())) { |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "area_code_switch is open parentAreaCode不能为空", "请先设置上级组织的组织区划"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "area_code_switch is open parentAreaCode不能为空", "请先设置上级组织的组织区划"); |
|
|
} |
|
|
}*/ |
|
|
//如果当前组织已经使用了自定义编码,不允许在选择其他。
|
|
|
//如果当前组织已经使用了自定义编码,不允许在选择其他。
|
|
|
if (StringUtils.isNotBlank(originalEntity.getAreaCode()) |
|
|
if (StringUtils.isNotBlank(originalEntity.getAreaCode()) |
|
|
&& originalEntity.getAreaCode().contains("UD") |
|
|
&& originalEntity.getAreaCode().contains("UD") |
|
|