liurunyu
2024-12-11 d623705f68920fffecc1944a97dc01bec47e5741
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
package com.dy.pipIrrTemp.delSome;
 
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/11 10:50
 * @Description
 */
@Slf4j
@RestController
@RequestMapping(path = "delSome")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class DelSomeCtrl {
 
    private DelSomeLossAmountSv lossAmountSv;
    private DelSomeIntakeAmountSv intakeAmountSv;
    private DelSomeClientAmountSv clientAmountSv;
 
    @Autowired
    private void setSv(DelSomeLossAmountSv sv) {
        this.lossAmountSv = sv;
    }
 
    @Autowired
    private void setSv(DelSomeIntakeAmountSv sv) {
        this.intakeAmountSv = sv;
    }
 
    @Autowired
    private void setSv(DelSomeClientAmountSv sv) {
        this.clientAmountSv = sv;
    }
 
    /**
     * 删除一些漏损统计
     * @return
     */
    @GetMapping(path = "deleteSomeStatisticLossAmount")
    @SsoAop()
    public BaseResponse<Boolean> deleteSomeStatisticLossAmount(){
        this.lossAmountSv.delStLossMonth();
        this.lossAmountSv.delStLossYear();
        return BaseResponseUtils.buildSuccess(true);
    }
 
    /**
     * 删除一些取水口统计
     * @return
     */
    @GetMapping(path = "deleteSomeStatisticIntakeAmount")
    @SsoAop()
    public BaseResponse<Boolean> deleteSomeStatisticIntakeAmount(){
        this.intakeAmountSv.delStIntakeMonth();
        this.intakeAmountSv.delStIntakeYear();
        return BaseResponseUtils.buildSuccess(true);
    }
 
    /**
     * 删除一些农户统计
     * @return
     */
    @GetMapping(path = "deleteSomeStatisticClientAmount")
    @SsoAop()
    public BaseResponse<Boolean> deleteSomeStatisticClientAmount(){
        this.clientAmountSv.delStClientMonth();
        this.clientAmountSv.delStClientYear();
        return BaseResponseUtils.buildSuccess(true);
    }
}