Administrator
2024-01-05 8ffdb9e3170e5ca530b652cb4600046bfb08a925
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
package com.dy.pipIrrProject.flowMonitoring;
 
import com.dy.pipIrrGlobal.daoPr.PrFlowmeterMapper;
import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
/**
 * @author ZhuBaoMin
 * @date 2024-01-05 9:20
 * @LastEditTime 2024-01-05 9:20
 * @Description
 */
 
@Slf4j
@Service
public class FlowmeterSv {
    @Autowired
    private PrFlowmeterMapper prFlowmeterMapper;
 
    /**
     * 添加流量计
     * @param prFlowmeter
     * @return
     */
    public Integer addFlowmeter(PrFlowmeter prFlowmeter) {
        return prFlowmeterMapper.insert(prFlowmeter);
    }
 
    /**
     * 删除流量计
     * @param flowmeterId
     * @return
     */
    public Integer deleteFlowmeter(Long flowmeterId) {
        return prFlowmeterMapper.deleteFlowmeterById(flowmeterId);
    }
 
    /**
     * 根据流量计编号获取未删除的流量计数量
     * @param flowmeterId
     * @return
     */
    public Integer getRecordCountOfFlowmeter(Long flowmeterId) {
        return prFlowmeterMapper.getRecordCountOfFlowmeter(flowmeterId);
    }
}