|
|
@ -1,7 +1,9 @@ |
|
|
|
package com.epmet.datareport.service.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.screen.ScreenIndexDataMonthlyDao; |
|
|
|
import com.epmet.datareport.dao.screen.ScreenIndexDataYearlyDao; |
|
|
|
import com.epmet.datareport.service.screen.IndexService; |
|
|
@ -17,7 +19,6 @@ import java.time.LocalDate; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@ -42,6 +43,7 @@ public class IndexServiceImpl implements IndexService { |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/19 2:53 下午 |
|
|
|
*/ |
|
|
|
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) |
|
|
|
@Override |
|
|
|
public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) { |
|
|
|
YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId()); |
|
|
@ -57,6 +59,7 @@ public class IndexServiceImpl implements IndexService { |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/19 3:17 下午 |
|
|
|
*/ |
|
|
|
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) |
|
|
|
@Override |
|
|
|
public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { |
|
|
|
MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId()); |
|
|
@ -72,6 +75,7 @@ public class IndexServiceImpl implements IndexService { |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/19 5:27 下午 |
|
|
|
*/ |
|
|
|
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) |
|
|
|
@Override |
|
|
|
public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam) { |
|
|
|
String customerId = externalAppRequestParam.getCustomerId(); |
|
|
@ -117,6 +121,7 @@ public class IndexServiceImpl implements IndexService { |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/20 10:04 上午 |
|
|
|
*/ |
|
|
|
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) |
|
|
|
@Override |
|
|
|
public List<SubAgencyIndexRankResultDTO> subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO) { |
|
|
|
LocalDate now = LocalDate.now().minusMonths(NumConstant.ONE); |
|
|
|