|
|
@ -3,13 +3,21 @@ 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.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.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 org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.LinkedList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* 孔村大屏api |
|
|
|
* |
|
|
@ -24,10 +32,14 @@ public class KcScreenServiceImpl implements KcScreenService { |
|
|
|
private DateUtils dateUtils; |
|
|
|
@Autowired |
|
|
|
private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param externalAppRequestParam |
|
|
|
* @Description 首页-平台各类总数 |
|
|
|
* @param externalAppRequestParam |
|
|
|
* @Description 首页-平台各类总数 |
|
|
|
* @author sun |
|
|
|
*/ |
|
|
|
@Override |
|
|
@ -35,4 +47,37 @@ public class KcScreenServiceImpl implements KcScreenService { |
|
|
|
return screenKcPlatformSummaryDailyDao.selectSummaryDaily(externalAppRequestParam.getCustomerId()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param externalAppRequestParam |
|
|
|
* @Description 公益互助-各类总数汇总 |
|
|
|
* @author sun |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam) { |
|
|
|
return screenKcVolunteerHeatRankGridDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param externalAppRequestParam |
|
|
|
* @Description 公益互助-公益活动次数 |
|
|
|
* @author sun |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam) { |
|
|
|
HeartActcounttrendResultDTO resultDTO = new HeartActcounttrendResultDTO(); |
|
|
|
LinkedList<String> xAxis = new LinkedList<>(); |
|
|
|
LinkedList<String> actCountDataList = new LinkedList<>(); |
|
|
|
//1.按客户查询最近十二个月数据
|
|
|
|
List<ActTrendMonthlyResultDTO> list = screenKcActTrendMonthlyDao.selectActTrendMonthly(externalAppRequestParam.getCustomerId()); |
|
|
|
//2.倒序遍历封装数据
|
|
|
|
for (int i = list.size() - 1; i >= 0; i--) { |
|
|
|
xAxis.add(list.get(i).getMonthId()); |
|
|
|
actCountDataList.add(list.get(i).getActCount().toString()); |
|
|
|
} |
|
|
|
//3.封装数据并返回
|
|
|
|
resultDTO.setXAxis(xAxis); |
|
|
|
resultDTO.setActCountDataList(actCountDataList); |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|