|
@ -1,5 +1,6 @@ |
|
|
package com.epmet.service.impl; |
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
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.constant.StrConstant; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
@ -188,12 +189,13 @@ public class OpenUpServiceImpl implements OpenUpService { |
|
|
} |
|
|
} |
|
|
//如果有子客户,根据area_code构造权限树
|
|
|
//如果有子客户,根据area_code构造权限树
|
|
|
if (!CollectionUtils.isEmpty(crmResult.getData())) { |
|
|
if (!CollectionUtils.isEmpty(crmResult.getData())) { |
|
|
|
|
|
log.warn(String.format("当前客户id%s,子客户列表%s", formDTO.getCustomerId(), JSON.toJSONString(crmResult))); |
|
|
Result<com.epmet.dto.result.plugins.AgencyNodeDTO> dataStatResult=dataReportOpenFeignClient.queryStaffAgencyTree(formDTO.getAgencyId()); |
|
|
Result<com.epmet.dto.result.plugins.AgencyNodeDTO> dataStatResult=dataReportOpenFeignClient.queryStaffAgencyTree(formDTO.getAgencyId()); |
|
|
if (!dataStatResult.success() && null == dataStatResult) { |
|
|
if (!dataStatResult.success() && null == dataStatResult) { |
|
|
throw new RenException("调用data-stats服务的XXX接口异常"+dataStatResult.getInternalMsg()); |
|
|
throw new RenException("调用data-stats服务的XXX接口异常"+dataStatResult.getInternalMsg()); |
|
|
} |
|
|
} |
|
|
StaffPermissionResultDTO resultDTO = new StaffPermissionResultDTO(); |
|
|
StaffPermissionResultDTO resultDTO = new StaffPermissionResultDTO(); |
|
|
resultDTO.setCustomerIds(Arrays.asList()); |
|
|
resultDTO.setCustomerIds(crmResult.getData()); |
|
|
resultDTO.setAgencyTree(ConvertUtils.sourceToTarget(dataStatResult.getData(), AgencyNodeDTO.class)); |
|
|
resultDTO.setAgencyTree(ConvertUtils.sourceToTarget(dataStatResult.getData(), AgencyNodeDTO.class)); |
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|