|
|
@ -14,6 +14,7 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.form.DingTextBriefNessFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.enums.OrgLevelEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
@ -39,6 +40,9 @@ import com.epmet.dataaggre.dto.epmetuser.result.CustomerStaffResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.result.ListStaffResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.result.StaffRoleListResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO; |
|
|
|
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO; |
|
|
|
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO; |
|
|
|
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO; |
|
|
|
import com.epmet.dataaggre.dto.govorg.*; |
|
|
|
import com.epmet.dataaggre.dto.govorg.form.*; |
|
|
|
import com.epmet.dataaggre.dto.govorg.result.*; |
|
|
@ -1467,4 +1471,43 @@ public class GovOrgServiceImpl implements GovOrgService { |
|
|
|
public Integer getEnterpriseInfosCount(CoverageHomeSearchFormDTO formDTO) { |
|
|
|
return cityManagementDao.getEnterpriseInfosCount(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String customerId, String agencyId) { |
|
|
|
ScreenAgencyOrGridListDTO resultDTO = new ScreenAgencyOrGridListDTO(); |
|
|
|
List<ScreenAgencyOrGridListDTO.AgencyGrid> agencyGridList = new ArrayList<>(); |
|
|
|
//1.查询组织信息
|
|
|
|
CustomerAgencyEntity dto = customerAgencyDao.selectById(agencyId); |
|
|
|
if (dto == null) { |
|
|
|
log.error(String.format("组织信息不存在,组织Id->%s", agencyId)); |
|
|
|
return new ScreenAgencyOrGridListDTO(); |
|
|
|
} |
|
|
|
//2.根据组织级别判断查询直属组织或网格列表
|
|
|
|
List<ScreenCustomerAgencyDTO> agencyList = new ArrayList<>(); |
|
|
|
List<ScreenCustomerGridDTO> gridList = new ArrayList<>(); |
|
|
|
if (!"community".equals(dto.getLevel())) { |
|
|
|
//2-1.直属下级组织列表
|
|
|
|
agencyList = customerAgencyDao.getSubAgencyListByAgency(customerId, agencyId); |
|
|
|
agencyList.forEach(gr->{ |
|
|
|
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); |
|
|
|
org.setOrgId(gr.getAgencyId()); |
|
|
|
org.setOrgName(gr.getAgencyName()); |
|
|
|
agencyGridList.add(org); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
//2-2.直属下级网格列表
|
|
|
|
gridList = customerGridDao.getSubGridList(customerId, agencyId); |
|
|
|
gridList.forEach(gr->{ |
|
|
|
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); |
|
|
|
org.setOrgId(gr.getGridId()); |
|
|
|
org.setOrgName(gr.getGridName()); |
|
|
|
agencyGridList.add(org); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
resultDTO.setLevel(dto.getLevel()); |
|
|
|
resultDTO.setAgencyGridList(agencyGridList); |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|