|
|
@ -10,6 +10,7 @@ import com.psdc.service.IPsdcElectricHtdataService; |
|
|
|
import com.psdc.utils.StringUtils; |
|
|
|
import com.psdc.utils.StringUtils; |
|
|
|
import com.psdc.utils.bean.BeanUtils; |
|
|
|
import com.psdc.utils.bean.BeanUtils; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
@ -113,6 +114,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService |
|
|
|
* @param energyStatisticsRequest 请求数据 |
|
|
|
* @param energyStatisticsRequest 请求数据 |
|
|
|
* @return 一天每小时能耗数据 |
|
|
|
* @return 一天每小时能耗数据 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PsdcStatisticsDay> selectAllByListDay(EnergyStatisticsRequest energyStatisticsRequest){ |
|
|
|
public List<PsdcStatisticsDay> selectAllByListDay(EnergyStatisticsRequest energyStatisticsRequest){ |
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
/* |
|
|
|
/* |
|
|
@ -129,6 +131,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService |
|
|
|
* @param energyStatisticsRequest 请求数据 |
|
|
|
* @param energyStatisticsRequest 请求数据 |
|
|
|
* @return 一天每小时能耗数据 |
|
|
|
* @return 一天每小时能耗数据 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PsdcStatisticsMonth> selectAllByListMonth(EnergyStatisticsRequest energyStatisticsRequest) { |
|
|
|
public List<PsdcStatisticsMonth> selectAllByListMonth(EnergyStatisticsRequest energyStatisticsRequest) { |
|
|
|
return psdcStatisticsMonthMapper.queryAllByLimit(energyStatisticsRequest); |
|
|
|
return psdcStatisticsMonthMapper.queryAllByLimit(energyStatisticsRequest); |
|
|
|
|
|
|
|
|
|
|
@ -139,6 +142,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService |
|
|
|
* @param energyStatisticsRequest 请求数据 |
|
|
|
* @param energyStatisticsRequest 请求数据 |
|
|
|
* @return 一天每小时能耗数据 |
|
|
|
* @return 一天每小时能耗数据 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PsdcStatisticsYear> selectAllByListYear(EnergyStatisticsRequest energyStatisticsRequest){ |
|
|
|
public List<PsdcStatisticsYear> selectAllByListYear(EnergyStatisticsRequest energyStatisticsRequest){ |
|
|
|
return psdcStatisticsYearMapper.queryAllByLimit(energyStatisticsRequest); |
|
|
|
return psdcStatisticsYearMapper.queryAllByLimit(energyStatisticsRequest); |
|
|
|
} |
|
|
|
} |
|
|
@ -147,6 +151,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService |
|
|
|
* 每日统计定时任务 |
|
|
|
* 每日统计定时任务 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
// @Scheduled(cron = "0 10 0 * * ? ")
|
|
|
|
// @Scheduled(cron = "0 10 0 * * ? ")
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void statisticalTask(){ |
|
|
|
public void statisticalTask(){ |
|
|
|
//获取昨日用电量总和
|
|
|
|
//获取昨日用电量总和
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|