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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoTmp.DeleteMapper">
    <!-- 漏损统计相关 -->
    <select id="selectAllStLossDay" resultType="com.dy.pipIrrGlobal.voTmp.VoStLossAmountDay">
        select id as id,
               intake_id as intakeId ,
               dt as dt,
               loss_amount as amount
        from  rm_loss_day
        order by intake_id DESC, id DESC
    </select>
 
    <delete id="deleteStLossDayById" parameterType="java.lang.Long">
        delete from rm_loss_day
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
    <select id="selectAllStLossMonth" resultType="com.dy.pipIrrGlobal.voTmp.VoStLossAmountMonth">
        select id as id,
               intake_id as intakeId ,
               year as year,
               month as month,
               amount as amount
        from  st_loss_month
        order by intake_id DESC, id DESC
    </select>
 
    <delete id="deleteStLossMonthById" parameterType="java.lang.Long">
        delete from st_loss_month
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
    <select id="selectAllStLossYear" resultType="com.dy.pipIrrGlobal.voTmp.VoStLossAmountYear">
        select id as id,
               intake_id as intakeId ,
               year as year,
               amount as amount
        from  st_loss_year
        order by intake_id DESC, id DESC
    </select>
 
    <delete id="deleteStLossYearById" parameterType="java.lang.Long">
        delete from st_loss_year
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
 
 
    <!-- 取水口统计相关 -->
    <select id="selectAllStIntakeDay" resultType="com.dy.pipIrrGlobal.voTmp.VoStIntakeAmountDay">
        select id as id,
               intake_id as intakeId ,
               dt as dt,
               amount as amount
        from  rm_intake_amount_day
        order by intake_id DESC, id DESC
    </select>
 
    <delete id="deleteStIntakeDayById" parameterType="java.lang.Long">
        delete from rm_intake_amount_day
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
    <select id="selectAllStIntakeMonth" resultType="com.dy.pipIrrGlobal.voTmp.VoStIntakeAmountMonth">
        select id as id,
               intake_id as intakeId ,
               year as year,
               month as month,
               amount as amount
        from  st_intake_amount_month
        order by intake_id DESC, id DESC
    </select>
 
    <delete id="deleteStIntakeMonthById" parameterType="java.lang.Long">
        delete from st_intake_amount_month
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
    <select id="selectAllStIntakeYear" resultType="com.dy.pipIrrGlobal.voTmp.VoStIntakeAmountYear">
        select id as id,
               intake_id as intakeId ,
               year as year,
               amount as amount
        from  st_intake_amount_year
        order by intake_id DESC, id DESC
    </select>
 
    <delete id="deleteStIntakeYearById" parameterType="java.lang.Long">
        delete from st_intake_amount_year
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
 
 
    <!-- 农户统计相关 -->
    <select id="selectAllStClientDay" resultType="com.dy.pipIrrGlobal.voTmp.VoStClientAmountDay">
        select id as id,
               client_id as clientId ,
               dt as dt,
               amount as amount
        from  rm_client_amount_day
        order by client_id DESC, id DESC
    </select>
 
    <delete id="deleteStClientDayById" parameterType="java.lang.Long">
        delete from rm_client_amount_day
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
    <select id="selectAllStClientMonth" resultType="com.dy.pipIrrGlobal.voTmp.VoStClientAmountMonth">
        select id as id,
               client_id as clientId ,
               year as year,
               month as month,
               amount as amount
        from  st_client_amount_month
        order by client_id DESC, id DESC
    </select>
 
    <delete id="deleteStClientMonthById" parameterType="java.lang.Long">
        delete from st_client_amount_month
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
    <select id="selectAllStClientYear" resultType="com.dy.pipIrrGlobal.voTmp.VoStClientAmountYear">
        select id as id,
               client_id as clientId ,
               year as year,
               amount as amount
        from  st_client_amount_year
        order by client_id DESC, id DESC
    </select>
 
    <delete id="deleteStClientYearById" parameterType="java.lang.Long">
        delete from st_client_amount_year
        where id = #{id,jdbcType=BIGINT}
    </delete>
 
</mapper>