ustcyc
2025-04-11 16d77a440e12c3de262c48c79af5fc0494dd87b7
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
package com.zhitan.dataitem.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhitan.carbonemission.domain.CarbonEmission;
import com.zhitan.common.enums.TimeType;
import com.zhitan.consumptionanalysis.domain.vo.RankingEnergyData;
import com.zhitan.dataitem.domain.StagseDataEntry;
import com.zhitan.realtimedata.domain.DataItem;
import org.apache.ibatis.annotations.Param;
 
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
 
/**
 * 阶段数据录入接口
 *
 * @author ZhiTan
 * @date 2020-03-25
 */
public interface DataItemMapper extends BaseMapper<DataItem> {
    /**
     * 阶段数据录入
     *
     * @param stagseDataEntry
     * @return 结果
     */
    public List<StagseDataEntry> getSettingIndex(StagseDataEntry stagseDataEntry);
 
    public List<StagseDataEntry> getSettingEdit(StagseDataEntry stagseDataEntry);
 
    List<StagseDataEntry> stagseDataByCode(@Param("nodeId") String nodeId,
                                           @Param("indexCodes") List<String> indexCodes,
                                           @Param("timeType") TimeType timeType,
                                           @Param("beginTime") Date beginTime,
                                           @Param("endTime") Date endTime,
                                           @Param("calcType") String calcType);
 
    /**
     * 根据indexId与时间范围查询dataitem信息
     *
     * @param beginTime 开始时间
     * @param endTime   截止时间
     * @param timeType  时间类型
     * @param indexIds  点位集合
     * @return
     */
    List<DataItem> getDataItemTimeRangeInforByIndexIds(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime,
                                                       @Param("timeType") String timeType, @Param("indexIds") List<String> indexIds);
 
    /**
     * 根据indexId与时间范围查询dataitem合计信息
     *
     * @param beginTime 开始时间
     * @param endTime   截止时间
     * @param timeType  时间类型
     * @param indexIds  点位集合
     * @return
     */
    BigDecimal getDataItemTimeRangeValueByIndexIds(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime,
                                                   @Param("timeType") String timeType, @Param("indexIds") List<String> indexIds);
 
    /**
     * 根据indexId与时间编码查询点位值合计
     *
     * @param timeCode 时间编码
     * @param indexIds 点位id集合
     * @return
     */
    List<DataItem> getDataItemInforByIndexIds(@Param("timeCode") String timeCode, @Param("indexIds") List<String> indexIds);
 
    /**
     * 根据indexId与时间编码查询合计值
     *
     * @param timeCode 时间编码
     * @param indexIds 点位id集合
     * @return
     */
    BigDecimal getDataItemValueByIndexIds(@Param("timeCode") String timeCode, @Param("indexIds") List<String> indexIds);
 
 
    /**
     * 根据indexId与时间范围查询碳排放数据,上半部分
     *
     * @param beginTime
     * @param endTime
     * @param timeType
     * @param indexId
     * @return
     */
    List<CarbonEmission> getUpCarbonEmission(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime,
                                             @Param("timeType") String timeType, @Param("indexId") String indexId);
 
 
    /**
     * 根据indexId与时间范围查询碳排放数据,中间部分
     *
     * @param beginTime
     * @param endTime
     * @param timeType
     * @param indexId
     * @return
     */
    List<CarbonEmission> getMiddleCarbonEmission(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime,
                                                 @Param("timeType") String timeType, @Param("indexId") String indexId, @Param("emissionType") String emissionType);
 
    /**
     * 根据indexId与时间范围查询碳排放数据,下半部分
     *
     * @param beginTime
     * @param endTime
     * @param timeType
     * @param indexId
     * @return
     */
    List<CarbonEmission> getDownCarbonEmission(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime,
                                               @Param("timeType") String timeType, @Param("indexId") String indexId);
 
    /**
     * 根据indexId与时间范围查询小时的dataitem信息
     *
     * @param beginTime 开始时间
     * @param endTime   截止时间
     * @param timeType  时间类型
     * @param indexIds  点位集合
     * @return
     */
    List<DataItem> getDataItemHourInforByIndexIds(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime,
                                                  @Param("timeType") String timeType, @Param("indexIds") List<String> indexIds);
 
    /**
     * 查询能源类型非电的用量
     *
     * @param beginTime
     * @param endTime
     * @param timeType   时间类型
     * @param nodeId     节点Id
     * @param energyType 能源类型
     * @return
     */
    BigDecimal getDataItemTimeRangeValueByNodeId(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime,
                                                 @Param("timeType") String timeType, @Param("nodeId") String nodeId, @Param("energyType") String energyType);
 
    /**
     * 能源消耗排名
     *
     * @param nodeIds
     * @param timeType
     * @param beginTime
     * @param endTime
     * @return
     */
    List<RankingEnergyData> getHomePageConsumptionRanking(@Param("nodeIds") List<String> nodeIds,
                                                          @Param("timeType") String timeType,
                                                          @Param("beginTime") Date beginTime,
                                                          @Param("endTime") Date endTime);
}