|
|
@ -17,7 +17,10 @@ |
|
|
|
|
|
|
|
package com.epmet.datareport.service.evaluationindex.screen.impl; |
|
|
|
|
|
|
|
import com.alibaba.druid.util.StringUtils; |
|
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
|
import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectGridDailyDao; |
|
|
|
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectGridDailyService; |
|
|
@ -48,6 +51,12 @@ public class ScreenProjectGridDailyServiceImpl implements ScreenProjectGridDail |
|
|
|
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) |
|
|
|
@Override |
|
|
|
public List<EfficiencyAnalysisResultDTO> efficiencyAnalysis(String customerId, String areaCode) { |
|
|
|
return screenProjectGridDailyDao.queryGridEfficiencyAnalysis(customerId,areaCode); |
|
|
|
//先查询最后一次统计的dateId
|
|
|
|
String dateId=screenProjectGridDailyDao.selectLastDateId(customerId); |
|
|
|
if(StringUtils.isEmpty(dateId)){ |
|
|
|
//如果为空,默认查询前一天
|
|
|
|
dateId= DateUtils.getBeforeNDay(NumConstant.ONE); |
|
|
|
} |
|
|
|
return screenProjectGridDailyDao.queryGridEfficiencyAnalysis(customerId,areaCode,dateId); |
|
|
|
} |
|
|
|
} |