liurunyu
2025-02-05 1157c9c0eca6484e197aaeb941ac7ce572a5cc03
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
package com.dy.pipIrrStatistics.allRound;
 
import com.dy.common.mw.protocol.p206V1.CommonV1;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.VoAllRound.*;
import com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * @Author: liurunyu
 * @Date: 2025/2/5 10:46
 * @Description
 */
@Slf4j
@Service
public class Ar4StatisticsSv {
 
    @Autowired
    private Ar4StatisticsMapper statisticsDao;
 
    //记录条数
    private static final int totalRecordsCount = 10 ;
 
    /**
     * 得到取水口开关阀记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeOpenCloseValve> openCloseValveRecords(Long intakeId){
        List<VoArIntakeOpenCloseValve> list = statisticsDao.openCloseRecords(intakeId, 0, totalRecordsCount);
        if(list != null && list.size() > 0){
            for (VoArIntakeOpenCloseValve vo : list) {
                if(vo != null){
                    if(vo.opType != null){
                        vo.openType = CommonV1.openCloseValveType(vo.opType);
                    }
                    if(vo.clType != null){
                        vo.closeType = CommonV1.openCloseValveType(vo.clType);
                    }
                }
            }
        }
        return list;
    }
 
 
    /**
     * 得到取水口日漏损记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeLossDay> lossDayRecords(Long intakeId){
        return statisticsDao.lossDayRecords(intakeId, 0, totalRecordsCount);
    }
 
 
    /**
     * 得到取水口月漏损记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeLossMonth> lossMonthRecords(Long intakeId){
        return statisticsDao.lossMonthRecords(intakeId, 0, totalRecordsCount);
    }
 
 
    /**
     * 得到取水口日用水记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeAmountDay> amountDayRecords(Long intakeId){
        return statisticsDao.amountDayRecords(intakeId, 0, totalRecordsCount);
    }
 
 
    /**
     * 得到取水口月用水记录(totalRecordsCount条)
     * @param intakeId
     */
    public List<VoArIntakeAmountMonth> amountMonthRecords(Long intakeId){
        return statisticsDao.amountMonthRecords(intakeId, 0, totalRecordsCount);
    }
 
}