RegBusSjhjtableDao.xml
9.64 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<?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.thinkgem.jeesite.modules.reg.dao.updata.RegBusSjhjtableDao">
<sql id="regBusSjhjtableColumns">
a.bizmsgid AS "bizmsgid",
a.asid AS "asid",
a.areacode AS "areacode",
a.rectype AS "rectype",
a.righttype AS "righttype",
a.regtype AS "regtype",
a.createdate AS "createdate",
a.recflowid AS "recflowid",
a.regorgid AS "regorgid",
a.parcelid AS "parcelid",
a.estatenum AS "estatenum",
a.preestatenum AS "preestatenum",
a.precertid AS "precertid",
a.certcount AS "certcount",
a.proofcount AS "proofcount",
a.digitalsign AS "digitalsign",
a.issuccess AS "issuccess",
a.exption AS "exption"
</sql>
<sql id="regBusSjhjtableJoins">
</sql>
<select id="get" resultType="RegBusSjhjtable">
SELECT
<include refid="regBusSjhjtableColumns"/>
FROM reg_bus_sjhjtable a
<include refid="regBusSjhjtableJoins"/>
WHERE a.id = #{id}
</select>
<select id="findList" resultType="RegBusSjhjtable">
SELECT
<include refid="regBusSjhjtableColumns"/>
FROM reg_bus_sjhjtable a
<include refid="regBusSjhjtableJoins"/>
<where>
<if test="asid != null and asid != ''">
AND a.asid = #{asid}
</if>
<if test="rectype != null and rectype != ''">
AND a.rectype = #{rectype}
</if>
<if test="areacode != null and areacode != ''">
AND a.areacode = #{areacode}
</if>
<if test="recflowid != null and recflowid != ''">
AND a.recflowid = #{recflowid}
</if>
<if test="estatenum != null and estatenum != ''">
AND a.estatenum = #{estatenum}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
</otherwise>
</choose>
</select>
<select id="findAllList" resultType="RegBusSjhjtable">
SELECT
<include refid="regBusSjhjtableColumns"/>
FROM reg_bus_sjhjtable a
<include refid="regBusSjhjtableJoins"/>
<where>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
</otherwise>
</choose>
</select>
<select id="allnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate) and areacode = #{areacode} and issuccess != '2'
</select>
<select id="scnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype in ('1000101','1000301','1000401','1000402','1000403','1000501','1000601','1000901','1001201') and areacode = #{areacode} and issuccess != '2'
</select>
<select id="zynum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype in ('2000101','2000301','2000401','2000402','2000403','2000501','2000601','2000901','2001201') and areacode = #{areacode} and issuccess != '2'
</select>
<select id="bgnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype in ('3000101','3000301','3000401','3000402','3000403','3000501','3000601','3000901','3001201') and areacode = #{areacode} and issuccess != '2'
</select>
<select id="zxnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate) and areacode = #{areacode}
and rectype = '4000101' and issuccess != '2'
</select>
<select id="gznum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype in ('5000101','5000301','5000401','5000402','5000403','5000501','5000601','5000901','5001201') and areacode = #{areacode} and issuccess != '2'
</select>
<select id="yynum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype = '6000101' and areacode = #{areacode} and issuccess != '2'
</select>
<select id="ygnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype = '7000101' and areacode = #{areacode} and issuccess != '2'
</select>
<select id="cfnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype = '8000101' and areacode = #{areacode} and issuccess != '2'
</select>
<select id="dyaqnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype = '9000101' and areacode = #{areacode} and issuccess != '2'
</select>
<select id="dyiqnum" resultType="string">
select count(*) from reg_bus_sjhjtable where trunc(createdate) = trunc(sysdate)
and rectype = '9000102' and areacode = #{areacode} and issuccess != '2'
</select>
<select id="businessTypeCount" resultType="string">
select count(*) from (select count(*) from REG_BUS_SJHJTABLE
where trunc(createdate) = trunc(sysdate) and areacode = #{areacode} and issuccess != '2' group by rectype)
</select>
<select id="allnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0'
</select>
<select id="scnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype in
('1000101','1000301','1000401','1000402','1000403','1000501','1000601','1000901','1001201')
</select>
<select id="zynum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype in
('2000101','2000301','2000401','2000402','2000403','2000501','2000601','2000901','2001201')
</select>
<select id="bgnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype in
('3000101','3000301','3000401','3000402','3000403','3000501','3000601','3000901','3001201')
</select>
<select id="zxnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype in ('4000101','4000201')
</select>
<select id="gznum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype in
('5000101','5000301','5000401','5000402','5000403','5000501','5000601','5000901','5001201')
</select>
<select id="yynum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype = '6000101'
</select>
<select id="ygnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype = '7000101'
</select>
<select id="cfnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype = '8000101'
</select>
<select id="dyaqnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype = '9000101'
</select>
<select id="dyiqnum1" resultType="string">
select count(*) from reg_bus_sjhjtable where to_char(createdate,'yyyymmdd') >= #{qssj1}
and to_char(createdate,'yyyymmdd') <= #{jssj1} and issuccess='0' and rectype = '9000102'
</select>
<select id="findMaxBizmsgid" resultType="string">
select MAX(SUBSTRING(bizmsgid, -12)) from reg_bus_sjhjtable
</select>
<select id="findMaxBizmsgidofOracle" resultType="string">
select MAX(substr(bizmsgid, -12)) from reg_bus_sjhjtable
</select>
<insert id="insert">
INSERT INTO reg_bus_sjhjtable(
bizmsgid,
asid,
areacode,
rectype,
righttype,
regtype,
createdate,
recflowid,
regorgid,
parcelid,
estatenum,
preestatenum,
precertid,
certcount,
proofcount,
digitalsign,
issuccess,
exption
) VALUES (
#{bizmsgid},
#{asid},
#{areacode},
#{rectype},
#{righttype},
#{regtype},
#{createdate},
#{recflowid},
#{regorgid},
#{parcelid},
#{estatenum},
#{preestatenum},
#{precertid},
#{certcount},
#{proofcount},
#{digitalsign},
#{issuccess},
#{exption}
)
</insert>
<update id="update">
UPDATE reg_bus_sjhjtable SET
bizmsgid = #{bizmsgid},
asid = #{asid},
areacode = #{areacode},
rectype = #{rectype},
righttype = #{righttype},
regtype = #{regtype},
createdate = #{createdate},
recflowid = #{recflowid},
regorgid = #{regorgid},
parcelid = #{parcelid},
estatenum = #{estatenum},
preestatenum = #{preestatenum},
precertid = #{precertid},
certcount = #{certcount},
proofcount = #{proofcount},
digitalsign = #{digitalsign},
issuccess = #{issuccess},
exption = #{exption}
WHERE bizmsgid = #{bizmsgid}
</update>
<update id="delete">
DELETE FROM reg_bus_sjhjtable
WHERE id = #{id}
</update>
<!--生成报文编号时,存储过程的调用 -->
<select id="Frandom" resultType="String">
select sbsjhquery(#{qxdm}) from dual
</select>
</mapper>