|
|
@ -18,7 +18,6 @@ import com.epmet.entity.*; |
|
|
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.service.LingShanScreenService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -47,6 +46,9 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD |
|
|
|
@Autowired |
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private IcResiUserDao icResiUserDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
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); |
|
|
@ -77,30 +79,31 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD |
|
|
|
return t; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
List<LingShanSpecialCrowdStatsByOrgResultDTO> ol = new ArrayList<>(); |
|
|
|
if (LingShanSpecialCrowdTypeEnums.AZBJ.getType().equals(specialType) || StringUtils.isBlank(specialType)) { |
|
|
|
ol.addAll(azbjDao.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)); |
|
|
|
} |
|
|
|
List<LingShanSpecialCrowdStatsByOrgResultDTO> ol = icResiUserDao.countSpecialQtyByOrgIdPath(orgIdPaths); |
|
|
|
|
|
|
|
// List<LingShanSpecialCrowdStatsByOrgResultDTO> ol = new ArrayList<>();
|
|
|
|
// if (LingShanSpecialCrowdTypeEnums.AZBJ.getType().equals(specialType) || StringUtils.isBlank(specialType)) {
|
|
|
|
// ol.addAll(azbjDao.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++
|
|
|
|
for (LingShanSpecialCrowdStatsByOrgResultDTO o : ol) { |
|
|
|
for (LingShanSpecialCrowdStatsByOrgResultDTO r : rl) { |
|
|
|
if (o.getOrgIdPath().contains(r.getOrgIdPath())) { |
|
|
|
for (LingShanSpecialCrowdStatsByOrgResultDTO qtyData : ol) { |
|
|
|
for (LingShanSpecialCrowdStatsByOrgResultDTO subOrg : rl) { |
|
|
|
if (qtyData.getOrgIdPath().contains(subOrg.getOrgIdPath())) { |
|
|
|
// 如果ol中的数据,orgIdPath包含了这个组织的orgIdPath,说明这条数据就是这个组织的数据,那就++把
|
|
|
|
r.setQuantity(r.getQuantity() + o.getQuantity()); |
|
|
|
subOrg.setQuantity(subOrg.getQuantity() + qtyData.getQuantity()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|