Blame view

parking-module-pay/src/main/java/com/zteits/pay/dao/impl/StatisticsDaoImpl.java 1.48 KB
55f68655   王彪总   新项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  package com.zteits.pay.dao.impl;
  
  import java.util.Date;
  import java.util.List;
  import java.util.Optional;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Component;
  
  import com.zteits.clouds.api.dto.pda.dto.TodayStatisticsDTO;
  import com.zteits.pay.dao.StatisticsDao;
  import com.zteits.pay.domain.ActFeeStatisticDO;
  import com.zteits.pay.domain.RealChargeDO;
  import com.zteits.pay.mapper.smapper.ChargerIncomeStatisticSmapper;
  @Component
  public class StatisticsDaoImpl implements StatisticsDao{
  
  	@Autowired
      private ChargerIncomeStatisticSmapper statisticSmapper;
  	
  	@Override
  	public List<RealChargeDO> todayFeeStatisticsForDetail(String chargerCode,Date beginDate,Date endDate){
  		return statisticSmapper.todayStatisticsForDetail(chargerCode,beginDate,endDate);
  	}
  
  	@Override
  	public Long queryTodayTotalFee(String chargerCode, Date beginDate,Date endDate){
  		Long totalFee = statisticSmapper.queryTodayTotalFee(chargerCode,beginDate,endDate); 
  		return Optional.ofNullable(totalFee).orElse(0L);
  	}
  
  	@Override
  	public ActFeeStatisticDO todayActFeeStatistic(String chargerCode, Date beginDate,Date endDate){
  		return statisticSmapper.todayActFeeStatistic(chargerCode,beginDate,endDate);
  	}
  
  	@Override
  	public TodayStatisticsDTO todayCarNumStatistic(String parkId,List<String> berthRangeNos,String chargerCode, Date beginDate,Date endDate) {
  		return statisticSmapper.todayCarNumStatistic(parkId, berthRangeNos, chargerCode, beginDate,endDate);
  	}
  }