|
@ -2,6 +2,8 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; |
|
|
|
|
|
|
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCpcBaseDataDao; |
|
|
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCpcBaseDataDao; |
|
|
import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyBranchDataDao; |
|
|
import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyBranchDataDao; |
|
@ -13,6 +15,7 @@ import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.result.*; |
|
|
import com.epmet.evaluationindex.screen.dto.result.*; |
|
|
|
|
|
import com.epmet.feign.OperCrmOpenFeignClient; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
@ -45,6 +48,8 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService |
|
|
private ScreenPartyBranchDataDao screenPartyBranchDataDao; |
|
|
private ScreenPartyBranchDataDao screenPartyBranchDataDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private DateUtils dateUtils; |
|
|
private DateUtils dateUtils; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private OperCrmOpenFeignClient operCrmOpenFeignClient; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 1、党员基本情况-饼状图概况 |
|
|
* @Description 1、党员基本情况-饼状图概况 |
|
@ -85,8 +90,17 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService |
|
|
**/ |
|
|
**/ |
|
|
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) |
|
|
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) |
|
|
@Override |
|
|
@Override |
|
|
public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) { |
|
|
public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param,String customerId) { |
|
|
PartymemberAgeDistributionResultDTO ageInfo = screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); |
|
|
Result<List<String>> result = operCrmOpenFeignClient.getAllSubCustomerIds(customerId); |
|
|
|
|
|
if (!result.success()){ |
|
|
|
|
|
throw new RenException("select subCustomerIds failure"); |
|
|
|
|
|
} |
|
|
|
|
|
PartymemberAgeDistributionResultDTO ageInfo = new PartymemberAgeDistributionResultDTO(); |
|
|
|
|
|
if (!CollectionUtils.isEmpty(result.getData())) { |
|
|
|
|
|
ageInfo = screenCpcBaseDataDao.selectPartymemberAgeDistributionNew(param.getAgencyId()); |
|
|
|
|
|
}else { |
|
|
|
|
|
ageInfo = screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); |
|
|
|
|
|
} |
|
|
if(null == ageInfo){ |
|
|
if(null == ageInfo){ |
|
|
ageInfo = new PartymemberAgeDistributionResultDTO(); |
|
|
ageInfo = new PartymemberAgeDistributionResultDTO(); |
|
|
} |
|
|
} |
|
|