liurunyu
2 天以前 cdc35c146d7054d58e273aec3035387f324d6ac3
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
package com.dy.pipIrrTemp.changeSome;
 
import com.dy.common.aop.SsoAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @Author: liurunyu
 * @Date: 2024/12/14 9:22
 * @Description
 */
@Slf4j
@RestController
@RequestMapping(path = "chSome")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class ChSomeCtrl {
 
    private ChSomeIntakeAmountSv intakeAmountSv;
 
    private ChSomeIntakeLossSv intakeLossSv;
 
    @Autowired
    private void setSv(ChSomeIntakeAmountSv sv) {
        this.intakeAmountSv = sv;
    }
 
    @Autowired
    private void setSv(ChSomeIntakeLossSv sv) {
        this.intakeLossSv = sv;
    }
 
 
    ///////////////////////////////////////////
    //
    // 取水口相关取水量
    //
    ///////////////////////////////////////////
    /**
     * 修改一些取水口取水量日统计
     * @return
     */
    @GetMapping(path = "changeSomeIntakeDayAmount")
    @SsoAop()
    public BaseResponse<Boolean> changeSomeIntakeDayAmount() throws Exception{
        this.intakeAmountSv.chIntakeAmountDay();
        return BaseResponseUtils.buildSuccess(true);
    }
 
    /**
     * 重新统计取水口月取水量
     * @return
     */
    @GetMapping(path = "reStatisticsAllIntakeDayAmount")
    @SsoAop()
    public BaseResponse<Boolean> reStatisticsAllIntakeDayAmount() throws Exception{
        // 不能删除,以保留原始id
        // this.intakeAmountSv.deleteAllIntakeAmountDay();
        this.intakeAmountSv.statisticsIntakeAmountDay();
        this.intakeAmountSv.deleteSomeIntakeAmountDay();
        return BaseResponseUtils.buildSuccess(true);
    }
 
 
    /**
     * 重新统计取水口月取水量
     * @return
     */
    @GetMapping(path = "reStatisticsAllIntakeMonthAmount")
    @SsoAop()
    public BaseResponse<Boolean> reStatisticsAllIntakeMonthAmount() throws Exception{
        this.intakeAmountSv.deleteAllIntakeAmountMonth();
        this.intakeAmountSv.statisticsIntakeAmountMonth();
        return BaseResponseUtils.buildSuccess(true);
    }
 
    /**
     * 重新统计取水口所取水量
     * @return
     */
    @GetMapping(path = "reStatisticsAllIntakeYearAmount")
    @SsoAop()
    public BaseResponse<Boolean> reStatisticsAllIntakeYearAmount() throws Exception{
        this.intakeAmountSv.deleteAllIntakeAmountYear();
        this.intakeAmountSv.statisticsIntakeAmountYear();
        return BaseResponseUtils.buildSuccess(true);
    }
 
 
 
 
    ///////////////////////////////////////////
    //
    // 取水口相关漏损
    //
    ///////////////////////////////////////////
    /**
     * 修改一些取水口漏损量日统计
     * @return
     */
    @GetMapping(path = "changeSomeIntakeDayLoss")
    @SsoAop()
    public BaseResponse<Boolean> changeSomeIntakeDayLoss() throws Exception{
        this.intakeLossSv.chIntakeLossDay();
        return BaseResponseUtils.buildSuccess(true);
    }
 
 
    /**
     * 重新统计取水口月漏损量
     * @return
     */
    @GetMapping(path = "reStatisticsAllIntakeMonthLoss")
    @SsoAop()
    public BaseResponse<Boolean> reStatisticsAllIntakeMonthLoss() throws Exception{
        this.intakeLossSv.deleteAllIntakeLossMonth();
        this.intakeLossSv.statisticsIntakeLossMonth();
        return BaseResponseUtils.buildSuccess(true);
    }
 
    /**
     * 重新统计取水口所漏损量
     * @return
     */
    @GetMapping(path = "reStatisticsAllIntakeYearLoss")
    @SsoAop()
    public BaseResponse<Boolean> reStatisticsAllIntakeYearLoss() throws Exception{
        this.intakeLossSv.deleteAllIntakeLossYear();
        this.intakeLossSv.statisticsIntakeLossYear();
        return BaseResponseUtils.buildSuccess(true);
    }
}