|
|
@ -1,10 +1,11 @@ |
|
|
|
package com.epmet.datareport.service.screen.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; |
|
|
|
import com.epmet.screen.dto.form.CompartmentFormDTO; |
|
|
|
import com.epmet.screen.dto.result.AgencyDistributionResultDTO; |
|
|
|
import com.epmet.screen.constant.*; |
|
|
|
import com.epmet.screen.dto.result.CompartmentResultDTO; |
|
|
|
import com.epmet.screen.dto.result.TreeResultDTO; |
|
|
|
import com.epmet.datareport.service.screen.AgencyService; |
|
|
@ -22,10 +23,10 @@ import java.util.List; |
|
|
|
@Service |
|
|
|
public class AgencyServiceImpl implements AgencyService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private ScreenCustomerAgencyDao screenCustomerAgencyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenCustomerGridDao screenCustomerGridDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 1、组织机构树 |
|
|
@ -47,6 +48,12 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
|
return rootAgency; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 递归查询填充下级 |
|
|
|
* @param subAgencyPids |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/18 4:42 下午 |
|
|
|
*/ |
|
|
|
private List<TreeResultDTO> getDepartmentList(String subAgencyPids) { |
|
|
|
List<TreeResultDTO> subAgencyList = screenCustomerAgencyDao.selectSubAgencyList(subAgencyPids); |
|
|
|
if (subAgencyList.size() > NumConstant.ZERO) { |
|
|
@ -66,6 +73,15 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) { |
|
|
|
return null; |
|
|
|
CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId()); |
|
|
|
if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){ |
|
|
|
// 当level为"community"时,查询screen_customer_grid表
|
|
|
|
List<AgencyDistributionResultDTO> agencyDistributionResultDTOS = screenCustomerGridDao.selectSubDistribution(compartmentFormDTO.getAgencyId()); |
|
|
|
agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS); |
|
|
|
}else { |
|
|
|
List<AgencyDistributionResultDTO> agencyDistributionResultDTOS = screenCustomerAgencyDao.selectSubDistribution(compartmentFormDTO.getAgencyId()); |
|
|
|
agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS); |
|
|
|
} |
|
|
|
return agencyAreaInfo; |
|
|
|
} |
|
|
|
} |
|
|
|