|
@ -15,6 +15,7 @@ import com.epmet.entity.*; |
|
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
|
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
import com.epmet.service.LingShanScreenService; |
|
|
import com.epmet.service.LingShanScreenService; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
@ -44,7 +45,7 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD |
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<LingShanSpecialCrowdStatsByOrgResultDTO> specialCrowdStatsCountBySubOrg(String parentAgencyId) { |
|
|
public List<LingShanSpecialCrowdStatsByOrgResultDTO> specialCrowdStatsCountBySubOrg(String parentAgencyId, String specialType) { |
|
|
List<SubOrgResDTO> subOrgs = getResultDataOrThrowsException(govOrgOpenFeignClient.subOrgList(parentAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, null); |
|
|
List<SubOrgResDTO> subOrgs = getResultDataOrThrowsException(govOrgOpenFeignClient.subOrgList(parentAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, null); |
|
|
List<String> orgIdPaths = subOrgs.stream().map(sub -> PidUtils.convertPid2OrgIdPath(sub.getOrgId(), sub.getPids())).collect(Collectors.toList()); |
|
|
List<String> orgIdPaths = subOrgs.stream().map(sub -> PidUtils.convertPid2OrgIdPath(sub.getOrgId(), sub.getPids())).collect(Collectors.toList()); |
|
|
|
|
|
|
|
@ -58,11 +59,22 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD |
|
|
}).collect(Collectors.toList()); |
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<LingShanSpecialCrowdStatsByOrgResultDTO> ol = azbjDao.statsCountsByOrgIds(orgIdPaths); |
|
|
List<LingShanSpecialCrowdStatsByOrgResultDTO> ol = new ArrayList<>(); |
|
|
ol.addAll(sqjzDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
if (LingShanSpecialCrowdTypeEnums.AZBJ.getType().equals(specialType) || StringUtils.isBlank(specialType)) { |
|
|
ol.addAll(xfryDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
ol.addAll(azbjDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
ol.addAll(jdryDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
} |
|
|
ol.addAll(jzhzDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
if (LingShanSpecialCrowdTypeEnums.SQJZ.getType().equals(specialType) || StringUtils.isBlank(specialType)) { |
|
|
|
|
|
ol.addAll(sqjzDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
|
|
|
} |
|
|
|
|
|
if (LingShanSpecialCrowdTypeEnums.XFRY.getType().equals(specialType) || StringUtils.isBlank(specialType)) { |
|
|
|
|
|
ol.addAll(xfryDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
|
|
|
} |
|
|
|
|
|
if (LingShanSpecialCrowdTypeEnums.JDRY.getType().equals(specialType) || StringUtils.isBlank(specialType)) { |
|
|
|
|
|
ol.addAll(jdryDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
|
|
|
} |
|
|
|
|
|
if (LingShanSpecialCrowdTypeEnums.JZHZ.getType().equals(specialType) || StringUtils.isBlank(specialType)) { |
|
|
|
|
|
ol.addAll(jzhzDao.statsCountsByOrgIds(orgIdPaths)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 开始给rl++
|
|
|
// 开始给rl++
|
|
|
for (LingShanSpecialCrowdStatsByOrgResultDTO o : ol) { |
|
|
for (LingShanSpecialCrowdStatsByOrgResultDTO o : ol) { |
|
|