liulingling.177216
2024-08-26 349f1cfc5fa77fbc636d542df0d8050fddec48c2
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.dingzhuo.energy.project.comprehensiveStatistics.service.impl;
 
import com.dingzhuo.energy.basic.data.facility.domain.FacilityArchives;
import com.dingzhuo.energy.common.utils.time.TimeManager;
import com.dingzhuo.energy.common.utils.time.TimeType;
import com.dingzhuo.energy.project.comprehensiveStatistics.domain.comprehensiveStatistics;
import com.dingzhuo.energy.project.comprehensiveStatistics.mapper.comprehensiveStatisticsMapper;
import com.dingzhuo.energy.project.comprehensiveStatistics.service.IComprehensiveStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.Collections;
import java.util.Date;
import java.util.List;
 
 
/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2020-02-07
 */
@Service
public  class comprehensiveStatisticsImp implements IComprehensiveStatisticsService{
    @Autowired
    private comprehensiveStatisticsMapper statisticsMapperpper;
    @Override
    public List<FacilityArchives> getFacilityArchives() {
        return statisticsMapperpper.getFacilityArchives();
    }
 
    @Override
    public List<comprehensiveStatistics> getDatasByList(List<String> indexIds, Date beginTime, Date endTime,TimeType timeType) {
        if (indexIds != null && !indexIds.isEmpty()) {
            return statisticsMapperpper.getDatasByList(indexIds, beginTime,endTime,timeType);
        }
        return Collections.emptyList();
    }
    @Override
    public List<comprehensiveStatistics> getDatasByIndex(List<String> indexIds, Date dataTime, TimeType timeType) {
        if (indexIds != null && !indexIds.isEmpty()) {
            String timeCode = TimeManager.getTimeCode(dataTime, timeType);
            return statisticsMapperpper.getDatasByIndex(indexIds, timeCode);
        }
        return Collections.emptyList();
    }
    @Override
    public List<comprehensiveStatistics> getDatasIndex(List<String> indexIds, Date dataTime, TimeType timeType) {
        if (indexIds != null && !indexIds.isEmpty()) {
            String timeCode = TimeManager.getTimeCode(dataTime, timeType);
            return statisticsMapperpper.getDatasIndex(indexIds, timeCode);
        }
        return Collections.emptyList();
    }
    @Override
    public List<comprehensiveStatistics> getEnergyByIndex(String indexType) {
            return statisticsMapperpper.getEnergyByIndex(indexType);
 
    }
 
}