|
@ -392,7 +392,7 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
} |
|
|
} |
|
|
agencysResultDTO = ConvertUtils.sourceToTarget(customerAgencyDTO, AgencyDetailMulticResultDTO.class); |
|
|
agencysResultDTO = ConvertUtils.sourceToTarget(customerAgencyDTO, AgencyDetailMulticResultDTO.class); |
|
|
//当前组织的客户id。
|
|
|
//当前组织的客户id。
|
|
|
agencysResultDTO.setAgencyCustomerId(customerAgencyDTO.getCustomerId()); |
|
|
agencysResultDTO.setCustomerId(customerAgencyDTO.getCustomerId()); |
|
|
|
|
|
|
|
|
//2、当前登录用户所属客户,的跟级组织
|
|
|
//2、当前登录用户所属客户,的跟级组织
|
|
|
ScreenCustomerAgencyDTO rootAgency=screenCustomerAgencyDao.selectCustomerRootAgency(formDTO.getCustomerId()); |
|
|
ScreenCustomerAgencyDTO rootAgency=screenCustomerAgencyDao.selectCustomerRootAgency(formDTO.getCustomerId()); |
|
@ -423,9 +423,9 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
agencysResultDTO.setSubCustomerIds(crmRes.getData()); |
|
|
agencysResultDTO.setSubCustomerIds(crmRes.getData()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
log.info("当前组织的客户id="+agencysResultDTO.getAgencyCustomerId()+";当前登录用户所属的客户id="+formDTO.getCustomerId()); |
|
|
log.info("当前组织的客户id="+agencysResultDTO.getCustomerId()+";当前登录用户所属的客户id="+formDTO.getCustomerId()); |
|
|
if(agencysResultDTO.getHaveSubCustomer()){ |
|
|
if(agencysResultDTO.getHaveSubCustomer()){ |
|
|
if (formDTO.getCustomerId().equals(agencysResultDTO.getAgencyCustomerId()) |
|
|
if (formDTO.getCustomerId().equals(agencysResultDTO.getCustomerId()) |
|
|
&& (StringUtils.isBlank(customerAgencyDTO.getPids()) |
|
|
&& (StringUtils.isBlank(customerAgencyDTO.getPids()) |
|
|
||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid()))) { |
|
|
||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid()))) { |
|
|
log.info(String.format("1)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId())); |
|
|
log.info(String.format("1)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId())); |
|
@ -443,7 +443,7 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
}else{ |
|
|
}else{ |
|
|
//单客户
|
|
|
//单客户
|
|
|
//6:查询当前组织的所有上级组织,按自上而下层级顺序
|
|
|
//6:查询当前组织的所有上级组织,按自上而下层级顺序
|
|
|
if (formDTO.getCustomerId().equals(agencysResultDTO.getAgencyCustomerId()) |
|
|
if (formDTO.getCustomerId().equals(agencysResultDTO.getCustomerId()) |
|
|
&& (StringUtils.isBlank(customerAgencyDTO.getPids()) |
|
|
&& (StringUtils.isBlank(customerAgencyDTO.getPids()) |
|
|
||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid()))) { |
|
|
||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid()))) { |
|
|
log.info(String.format("2)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId())); |
|
|
log.info(String.format("2)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId())); |
|
|