Browse Source

Merge remote-tracking branch 'remotes/origin/dev_guidance' into dev

dev_shibei_match
jianjun 4 years ago
parent
commit
f3fafcfb85
  1. 29
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

29
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -25,7 +25,6 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerAgencyConstant;
@ -1091,16 +1090,38 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
}
/**
* @param tokenDTO
* @Description 获取客户下组织树
* @Param tokenDTO
* @Param formDTO
* @Return {@link AgencyTreeResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 15:21
*/
@Override
public AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO) {
return baseDao.getAllAgency(formDTO.getCustomerId());
AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(agency.getSubAgencyList())) {
agency.setSubAgencyList(null);
} else {
setAgencyList(agency.getSubAgencyList());
}
return agency;
}
/**
* @Description 组织树最后一级没有数据的话设null
* @Param agencyList
* @Return
* @Author zhaoqifeng
* @Date 2021/9/18 14:33
*/
private void setAgencyList(List<AgencyTreeResultDTO> agencyList) {
for (AgencyTreeResultDTO dto : agencyList) {
if (CollectionUtils.isEmpty(dto.getSubAgencyList())) {
dto.setSubAgencyList(null);
} else {
setAgencyList(dto.getSubAgencyList());
}
}
}
}
Loading…
Cancel
Save