|
|
@ -2,16 +2,13 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
|
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
|
import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcActTrendMonthlyDao; |
|
|
|
import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; |
|
|
|
import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcVolunteerHeatRankGridDailyDao; |
|
|
|
import com.epmet.datareport.dao.evaluationindex.screenkc.*; |
|
|
|
import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; |
|
|
|
import com.epmet.datareport.utils.DateUtils; |
|
|
|
import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; |
|
|
|
import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; |
|
|
|
import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; |
|
|
|
import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; |
|
|
|
import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; |
|
|
|
import com.epmet.evaluationindex.screen.dto.result.*; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -33,9 +30,13 @@ public class KcScreenServiceImpl implements KcScreenService { |
|
|
|
@Autowired |
|
|
|
private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; |
|
|
|
private ScreenKcActSummaryDailyDao screenKcActSummaryDailyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenKcVolunteerSummaryDailyDao screenKcVolunteerSummaryDailyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param externalAppRequestParam |
|
|
@ -54,7 +55,7 @@ public class KcScreenServiceImpl implements KcScreenService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam) { |
|
|
|
return screenKcVolunteerHeatRankGridDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); |
|
|
|
return screenKcActSummaryDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -80,4 +81,41 @@ public class KcScreenServiceImpl implements KcScreenService { |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param externalAppRequestParam |
|
|
|
* @Description 公益互助-志愿者画像 |
|
|
|
* @author sun |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam) { |
|
|
|
HeartVolunteerportrayalResultDTO resultDTO = new HeartVolunteerportrayalResultDTO(); |
|
|
|
GenderDistributionResultDTO genderDistribution = new GenderDistributionResultDTO(); |
|
|
|
//1.根据客户Id查询最近日期志愿者统计数据
|
|
|
|
AgeDistributionResultDTO ageDistribution = screenKcVolunteerSummaryDailyDao.selectVolunteerSummaryDaily(externalAppRequestParam.getCustomerId()); |
|
|
|
//2.封装数据并返回
|
|
|
|
if (null == ageDistribution) { |
|
|
|
resultDTO.setAgeDistribution(new AgeDistributionResultDTO()); |
|
|
|
resultDTO.setGenderDistribution(genderDistribution); |
|
|
|
} else { |
|
|
|
resultDTO.setAgeDistribution(ageDistribution); |
|
|
|
genderDistribution.setMaleCount(ageDistribution.getMaleCount()); |
|
|
|
genderDistribution.setFemaleCount(ageDistribution.getFemaleCount()); |
|
|
|
resultDTO.setGenderDistribution(genderDistribution); |
|
|
|
} |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
|
* @Description 公益互助-个人(志愿者)公益时长排名 |
|
|
|
* @author sun |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<HeartVolunteerrankResultDTO> heartVolunteerrank(HeartVolunteerrankFormDTO formDTO) { |
|
|
|
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); |
|
|
|
formDTO.setPageNo(pageIndex); |
|
|
|
List<HeartVolunteerrankResultDTO> list = screenKcVolunteerHeatRankGridDailyDao.selectHeartVolunteerrankList(formDTO); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|