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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<?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.dhcc.finance.main.dao.CwGlFreevalueMapper">
<resultMap id="BaseResultMap" type="com.dhcc.finance.main.domain.CwGlFreevalue">
<id column="PK_FREEVALUE" jdbcType="VARCHAR" property="pkFreevalue"/>
<result column="ASSID" jdbcType="VARCHAR" property="assid"/>
<result column="ASSINDEX" jdbcType="INTEGER" property="assindex"/>
<result column="CHECKTYPE" jdbcType="VARCHAR" property="checktype"/>
<result column="CHECKVALUE" jdbcType="VARCHAR" property="checkvalue"/>
<result column="VALUECODE" jdbcType="VARCHAR" property="valuecode"/>
<result column="VALUENAME" jdbcType="VARCHAR" property="valuename"/>
<result column="DEBITAMOUNT" jdbcType="DECIMAL" property="debitamount"/>
<result column="CREDITAMOUNT" jdbcType="DECIMAL" property="creditamount"/>
<result column="PK_SYSTEM" jdbcType="VARCHAR" property="pkSystem"/>
<result column="USE_STATE" jdbcType="VARCHAR" property="useState"/>
<result column="CREATE_USER" jdbcType="VARCHAR" property="createUser"/>
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
<result column="UPDATE_USER" jdbcType="VARCHAR" property="updateUser"/>
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="REMARK" jdbcType="VARCHAR" property="remark"/>
</resultMap>
<resultMap id="BaseResultMap2" type="com.dhcc.finance.main.model.CwGlFreevalueInfo">
<result column="CHECKTYPE" jdbcType="VARCHAR" property="checktype"/>
<result column="CHECKVALUE" jdbcType="VARCHAR" property="checkvalue"/>
<result column="DEBITAMOUNT" jdbcType="DECIMAL" property="debitamount"/>
<result column="PK_SYSTEM" jdbcType="VARCHAR" property="pkSystem"/>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
PK_FREEVALUE, ASSID, ASSINDEX, CHECKTYPE, CHECKVALUE, VALUECODE, VALUENAME, DEBITAMOUNT,
CREDITAMOUNT, PK_SYSTEM, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME,
REMARK
</sql>
<select id="selectByExample" parameterType="com.dhcc.finance.main.domain.CwGlFreevalueExample"
resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from cw_gl_freevalue
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from cw_gl_freevalue
where PK_FREEVALUE = #{pkFreevalue,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from cw_gl_freevalue
where PK_FREEVALUE = #{pkFreevalue,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.dhcc.finance.main.domain.CwGlFreevalueExample">
delete from cw_gl_freevalue
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="com.dhcc.finance.main.domain.CwGlFreevalue">
insert into cw_gl_freevalue (PK_FREEVALUE, ASSID, ASSINDEX,
CHECKTYPE, CHECKVALUE, VALUECODE,
VALUENAME, DEBITAMOUNT, CREDITAMOUNT,
PK_SYSTEM, USE_STATE, CREATE_USER,
CREATE_TIME, UPDATE_USER, UPDATE_TIME,
REMARK)
values (#{pkFreevalue,jdbcType=VARCHAR}, #{assid,jdbcType=VARCHAR}, #{assindex,jdbcType=INTEGER},
#{checktype,jdbcType=VARCHAR}, #{checkvalue,jdbcType=VARCHAR}, #{valuecode,jdbcType=VARCHAR},
#{valuename,jdbcType=VARCHAR}, #{debitamount,jdbcType=DECIMAL}, #{creditamount,jdbcType=DECIMAL},
#{pkSystem,jdbcType=VARCHAR}, #{useState,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.dhcc.finance.main.domain.CwGlFreevalue">
insert into cw_gl_freevalue
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pkFreevalue != null">
PK_FREEVALUE,
</if>
<if test="assid != null">
ASSID,
</if>
<if test="assindex != null">
ASSINDEX,
</if>
<if test="checktype != null">
CHECKTYPE,
</if>
<if test="checkvalue != null">
CHECKVALUE,
</if>
<if test="valuecode != null">
VALUECODE,
</if>
<if test="valuename != null">
VALUENAME,
</if>
<if test="debitamount != null">
DEBITAMOUNT,
</if>
<if test="creditamount != null">
CREDITAMOUNT,
</if>
<if test="pkSystem != null">
PK_SYSTEM,
</if>
<if test="useState != null">
USE_STATE,
</if>
<if test="createUser != null">
CREATE_USER,
</if>
<if test="createTime != null">
CREATE_TIME,
</if>
<if test="updateUser != null">
UPDATE_USER,
</if>
<if test="updateTime != null">
UPDATE_TIME,
</if>
<if test="remark != null">
REMARK,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pkFreevalue != null">
#{pkFreevalue,jdbcType=VARCHAR},
</if>
<if test="assid != null">
#{assid,jdbcType=VARCHAR},
</if>
<if test="assindex != null">
#{assindex,jdbcType=INTEGER},
</if>
<if test="checktype != null">
#{checktype,jdbcType=VARCHAR},
</if>
<if test="checkvalue != null">
#{checkvalue,jdbcType=VARCHAR},
</if>
<if test="valuecode != null">
#{valuecode,jdbcType=VARCHAR},
</if>
<if test="valuename != null">
#{valuename,jdbcType=VARCHAR},
</if>
<if test="debitamount != null">
#{debitamount,jdbcType=DECIMAL},
</if>
<if test="creditamount != null">
#{creditamount,jdbcType=DECIMAL},
</if>
<if test="pkSystem != null">
#{pkSystem,jdbcType=VARCHAR},
</if>
<if test="useState != null">
#{useState,jdbcType=VARCHAR},
</if>
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUser != null">
#{updateUser,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dhcc.finance.main.domain.CwGlFreevalueExample"
resultType="java.lang.Long">
select count(*) from cw_gl_freevalue
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update cw_gl_freevalue
<set>
<if test="record.pkFreevalue != null">
PK_FREEVALUE = #{record.pkFreevalue,jdbcType=VARCHAR},
</if>
<if test="record.assid != null">
ASSID = #{record.assid,jdbcType=VARCHAR},
</if>
<if test="record.assindex != null">
ASSINDEX = #{record.assindex,jdbcType=INTEGER},
</if>
<if test="record.checktype != null">
CHECKTYPE = #{record.checktype,jdbcType=VARCHAR},
</if>
<if test="record.checkvalue != null">
CHECKVALUE = #{record.checkvalue,jdbcType=VARCHAR},
</if>
<if test="record.valuecode != null">
VALUECODE = #{record.valuecode,jdbcType=VARCHAR},
</if>
<if test="record.valuename != null">
VALUENAME = #{record.valuename,jdbcType=VARCHAR},
</if>
<if test="record.debitamount != null">
DEBITAMOUNT = #{record.debitamount,jdbcType=DECIMAL},
</if>
<if test="record.creditamount != null">
CREDITAMOUNT = #{record.creditamount,jdbcType=DECIMAL},
</if>
<if test="record.pkSystem != null">
PK_SYSTEM = #{record.pkSystem,jdbcType=VARCHAR},
</if>
<if test="record.useState != null">
USE_STATE = #{record.useState,jdbcType=VARCHAR},
</if>
<if test="record.createUser != null">
CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateUser != null">
UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
REMARK = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update cw_gl_freevalue
set PK_FREEVALUE = #{record.pkFreevalue,jdbcType=VARCHAR},
ASSID = #{record.assid,jdbcType=VARCHAR},
ASSINDEX = #{record.assindex,jdbcType=INTEGER},
CHECKTYPE = #{record.checktype,jdbcType=VARCHAR},
CHECKVALUE = #{record.checkvalue,jdbcType=VARCHAR},
VALUECODE = #{record.valuecode,jdbcType=VARCHAR},
VALUENAME = #{record.valuename,jdbcType=VARCHAR},
DEBITAMOUNT = #{record.debitamount,jdbcType=DECIMAL},
CREDITAMOUNT = #{record.creditamount,jdbcType=DECIMAL},
PK_SYSTEM = #{record.pkSystem,jdbcType=VARCHAR},
USE_STATE = #{record.useState,jdbcType=VARCHAR},
CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR},
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
REMARK = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.dhcc.finance.main.domain.CwGlFreevalue">
update cw_gl_freevalue
<set>
<if test="assid != null">
ASSID = #{assid,jdbcType=VARCHAR},
</if>
<if test="assindex != null">
ASSINDEX = #{assindex,jdbcType=INTEGER},
</if>
<if test="checktype != null">
CHECKTYPE = #{checktype,jdbcType=VARCHAR},
</if>
<if test="checkvalue != null">
CHECKVALUE = #{checkvalue,jdbcType=VARCHAR},
</if>
<if test="valuecode != null">
VALUECODE = #{valuecode,jdbcType=VARCHAR},
</if>
<if test="valuename != null">
VALUENAME = #{valuename,jdbcType=VARCHAR},
</if>
<if test="debitamount != null">
DEBITAMOUNT = #{debitamount,jdbcType=DECIMAL},
</if>
<if test="creditamount != null">
CREDITAMOUNT = #{creditamount,jdbcType=DECIMAL},
</if>
<if test="pkSystem != null">
PK_SYSTEM = #{pkSystem,jdbcType=VARCHAR},
</if>
<if test="useState != null">
USE_STATE = #{useState,jdbcType=VARCHAR},
</if>
<if test="createUser != null">
CREATE_USER = #{createUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUser != null">
UPDATE_USER = #{updateUser,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
REMARK = #{remark,jdbcType=VARCHAR},
</if>
</set>
where PK_FREEVALUE = #{pkFreevalue,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.dhcc.finance.main.domain.CwGlFreevalue">
update cw_gl_freevalue
set ASSID = #{assid,jdbcType=VARCHAR},
ASSINDEX = #{assindex,jdbcType=INTEGER},
CHECKTYPE = #{checktype,jdbcType=VARCHAR},
CHECKVALUE = #{checkvalue,jdbcType=VARCHAR},
VALUECODE = #{valuecode,jdbcType=VARCHAR},
VALUENAME = #{valuename,jdbcType=VARCHAR},
DEBITAMOUNT = #{debitamount,jdbcType=DECIMAL},
CREDITAMOUNT = #{creditamount,jdbcType=DECIMAL},
PK_SYSTEM = #{pkSystem,jdbcType=VARCHAR},
USE_STATE = #{useState,jdbcType=VARCHAR},
CREATE_USER = #{createUser,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
UPDATE_USER = #{updateUser,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
REMARK = #{remark,jdbcType=VARCHAR}
where PK_FREEVALUE = #{pkFreevalue,jdbcType=VARCHAR}
</update>
<!--查询assid -->
<select id="selectAssid" flushCache="true" parameterType="java.lang.String" resultMap="BaseResultMap">
select temp.ASSID
from (
select freevalue.ASSID,
group_concat(freevalue.CHECKVALUE order by freevalue.CHECKTYPE separator '-') as CHECKVALUES,
group_concat(freevalue.CHECKTYPE order by freevalue.CHECKTYPE separator '-') as CHECKTYPES
from (
select a.ASSID, a.CHECKTYPE, a.CHECKVALUE
from CW_GL_FREEVALUE a
inner join (select ASSID
from CW_GL_FREEVALUE
where CHECKVALUE = #{checkValue,jdbcType=VARCHAR}) b on a.assid = b.assid
where a.USE_STATE = '1'
) freevalue
group by freevalue.assid
) temp
where temp.CHECKVALUES = #{checkValues,jdbcType=VARCHAR}
and temp.CHECKTYPES = #{checkTypes,jdbcType=VARCHAR}
</select>
<!--批量新增数据 -->
<insert id="insertCwGlFreevalueBatch" parameterType="java.util.List">
insert into CW_GL_FREEVALUE (
PK_FREEVALUE, ASSID, ASSINDEX, CHECKTYPE, CHECKVALUE, VALUECODE, VALUENAME, DEBITAMOUNT,
CREDITAMOUNT, PK_SYSTEM, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME,
REMARK
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.pkFreevalue,jdbcType=VARCHAR}, #{item.assid,jdbcType=VARCHAR}, #{item.assindex,jdbcType=INTEGER},
#{item.checktype,jdbcType=VARCHAR}, #{item.checkvalue,jdbcType=VARCHAR}, #{item.valuecode,jdbcType=VARCHAR},
#{item.valuename,jdbcType=VARCHAR}, #{item.debitamount,jdbcType=DECIMAL},
#{item.creditamount,jdbcType=DECIMAL},
#{item.pkSystem,jdbcType=VARCHAR}, #{item.useState,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUser,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP},
#{item.remark,jdbcType=VARCHAR}
)
</foreach>
</insert>
<!-- 删除辅助表数据 -->
<update id="updateUserStateByAssid" parameterType="java.util.List">
update CW_GL_FREEVALUE set USE_STATE = '2' where ASSID in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</update>
<!-- 根据assid查询辅助项信息 -->
<select id="searchCwGlFreevalueByassid" parameterType="java.lang.String" resultMap="BaseResultMap">
select PK_FREEVALUE,
ASSID,
ASSINDEX,
CHECKTYPE,
CHECKVALUE,
VALUECODE,
VALUENAME,
if(DEBITAMOUNT is not null and DEBITAMOUNT != '0' and DEBITAMOUNT != '', DEBITAMOUNT,
CREDITAMOUNT) as DEBITAMOUNT,
CREDITAMOUNT,
PK_SYSTEM,
USE_STATE,
CREATE_USER,
CREATE_TIME,
UPDATE_USER,
UPDATE_TIME,
REMARK
from cw_gl_freevalue
where assid = #{assid,jdbcType=VARCHAR}
</select>
<!-- 根据assid查询辅助项信息 -->
<select id="searchByAssid" parameterType="java.lang.String" resultMap="BaseResultMap2">
select CHECKTYPE,
CHECKVALUE,
if(DEBITAMOUNT is not null and DEBITAMOUNT != '0' and DEBITAMOUNT != '', DEBITAMOUNT,
CREDITAMOUNT) as DEBITAMOUNT,
PK_SYSTEM
from cw_gl_freevalue
where assid = #{assid,jdbcType=VARCHAR}
and USE_STATE = '1'
</select>
<delete id="deleteByAssid" parameterType="java.util.List">
delete from cw_gl_freevalue where ASSID in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</delete>
<!--
insert into cw_gl_freevalue (PK_FREEVALUE, ASSID, ASSINDEX, CHECKTYPE, CHECKVALUE, VALUECODE, VALUENAME,
DEBITAMOUNT, CREDITAMOUNT, PK_SYSTEM, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER,
REMARK)-->
<select id="selectCwGlFreevalueBatchByTemp" resultMap="BaseResultMap">
select MD5(uuid()) PK_FREEVALUE,b.ASSID,#{cwGlVoucherTempRequest.index,jdbcType=VARCHAR}
ASSINDEX,#{cwBdVouchtempF.pkAccass,jdbcType=VARCHAR}
CHECKTYPE,#{cwGlVoucherTempRequest.valueName,jdbcType=VARCHAR} VALUENAME
<if test='cwGlVoucherTempRequest.direction =="1"'>
,b.LOCALDEBITAMOUNT DEBITAMOUNT,0 CREDITAMOUNT
</if>
<if test='cwGlVoucherTempRequest.direction =="2"'>
,0 DEBITAMOUNT ,b.LOCALCREDITAMOUNT CREDITAMOUNT
</if>
,#{cwGlVoucherTempRequest.pkSystem,jdbcType=VARCHAR} PK_SYSTEM,'1' USE_STATE,a.CREATE_USER, a.CREATE_TIME,a.ID REMARK
from cw_bd_manual_serial a
left join cw_gl_detail b on b.REMARK = concat(a.ID ,#{cwBdVouchtempF.pkVouchtempB,jdbcType=VARCHAR})
where BATCH_NO = #{cwGlVoucherTempRequest.batchNo,jdbcType=VARCHAR} and a.USE_STATE ='1' and b.USE_STATE ='1'
and VOUCHER_TYPE = #{cwGlVoucherTempRequest.voucherType,jdbcType=VARCHAR}
</select>
<update id="updateCheckType" parameterType="String">
update cw_gl_freevalue a, CW_GL_DETAIL b
<set>
<if test="checkTypeN != null">
a.CHECKTYPE = #{checkTypeN,jdbcType=VARCHAR}
</if>
</set>
where a.ASSID = b.ASSID and b.PK_GLORGBOOK=#{pkGlorgbook ,jdbcType=VARCHAR}
AND b.SUBJCODE=#{subjcodeO ,jdbcType=VARCHAR} and a.CHECKTYPE = #{checkTypeO ,jdbcType=VARCHAR}
</update>
</mapper>