Browse Source

agencydetail-multic

dev_shibei_match
yinzuomei 4 years ago
parent
commit
eb1e19a13a
  1. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java

@ -419,19 +419,24 @@ public class AgencyServiceImpl implements AgencyService {
}
if(agencysResultDTO.getHaveSubCustomer()){
if (StringUtils.isBlank(customerAgencyDTO.getPids())||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid())) {
log.info(String.format("1)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId()));
agencysResultDTO.setParentList(parentList);
}else{
// 5、多客户时根据area_code查询上级,自下向上,查询到当前客户的跟组织即可stop
log.info("多客户版本parentList、level要重新赋值");
ScreenCustomerAgencyDTO parentAgency=screenCustomerAgencyDao.selectByAreaCode(agencysResultDTO.getParentAreaCode());
agencysResultDTO.setLevel(getAgencyLevelMultiC(parentAgency));
List<ParentListResultDTO> temp = getParentListMultic(parentList,parentAgency,formDTO.getCustomerId(),agencysResultDTO.getRootAgencyId());
agencysResultDTO.setParentList(temp);
}
}else{
//单客户
//6:查询当前组织的所有上级组织,按自上而下层级顺序
if (StringUtils.isBlank(customerAgencyDTO.getPids())) {
if (StringUtils.isBlank(customerAgencyDTO.getPids())||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid())) {
log.info(String.format("2)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId()));
agencysResultDTO.setParentList(parentList);
return agencysResultDTO;
}
}else{
List<String> pidList =new ArrayList<>();
if(customerAgencyDTO.getPids().contains(StrConstant.COLON)){
pidList= Arrays.asList(customerAgencyDTO.getPids().split(StrConstant.COLON));
@ -443,6 +448,7 @@ public class AgencyServiceImpl implements AgencyService {
agencysResultDTO.setParentList(screenCustomerAgencyDao.selectPAgencyById(pidList));
}
}
}
dataReportRedis.setAgencyDetailMulticResultDTO(formDTO.getCustomerId(),formDTO.getAgencyId(),agencysResultDTO);
return agencysResultDTO;
}

Loading…
Cancel
Save