and ${criterion.condition}
and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition}
#{listItem}
and ${criterion.condition}
and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition}
#{listItem}
PK_VOUCHERMAXNO, PK_GLORGBOOK, PERIOD, PK_VOUCHERTYPE, MAXNO, USE_STATE, CREATE_USER,
CREATE_TIME, UPDATE_USER, UPDATE_TIME
delete from cw_gl_vouchermaxno
where PK_VOUCHERMAXNO = #{pkVouchermaxno,jdbcType=VARCHAR}
delete from cw_gl_vouchermaxno
insert into cw_gl_vouchermaxno (PK_VOUCHERMAXNO, PK_GLORGBOOK, PERIOD,
PK_VOUCHERTYPE, MAXNO, USE_STATE,
CREATE_USER, CREATE_TIME, UPDATE_USER,
UPDATE_TIME)
values (#{pkVouchermaxno,jdbcType=VARCHAR}, #{pkGlorgbook,jdbcType=VARCHAR}, #{period,jdbcType=VARCHAR},
#{pkVouchertype,jdbcType=VARCHAR}, #{maxno,jdbcType=VARCHAR}, #{useState,jdbcType=VARCHAR},
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP})
insert into cw_gl_vouchermaxno
PK_VOUCHERMAXNO,
PK_GLORGBOOK,
PERIOD,
PK_VOUCHERTYPE,
MAXNO,
USE_STATE,
CREATE_USER,
CREATE_TIME,
UPDATE_USER,
UPDATE_TIME,
#{pkVouchermaxno,jdbcType=VARCHAR},
#{pkGlorgbook,jdbcType=VARCHAR},
#{period,jdbcType=VARCHAR},
#{pkVouchertype,jdbcType=VARCHAR},
#{maxno,jdbcType=VARCHAR},
#{useState,jdbcType=VARCHAR},
#{createUser,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateUser,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
update cw_gl_vouchermaxno
PK_VOUCHERMAXNO = #{record.pkVouchermaxno,jdbcType=VARCHAR},
PK_GLORGBOOK = #{record.pkGlorgbook,jdbcType=VARCHAR},
PERIOD = #{record.period,jdbcType=VARCHAR},
PK_VOUCHERTYPE = #{record.pkVouchertype,jdbcType=VARCHAR},
MAXNO = #{record.maxno,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},
update cw_gl_vouchermaxno
set PK_VOUCHERMAXNO = #{record.pkVouchermaxno,jdbcType=VARCHAR},
PK_GLORGBOOK = #{record.pkGlorgbook,jdbcType=VARCHAR},
PERIOD = #{record.period,jdbcType=VARCHAR},
PK_VOUCHERTYPE = #{record.pkVouchertype,jdbcType=VARCHAR},
MAXNO = #{record.maxno,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}
update cw_gl_vouchermaxno
PK_GLORGBOOK = #{pkGlorgbook,jdbcType=VARCHAR},
PERIOD = #{period,jdbcType=VARCHAR},
PK_VOUCHERTYPE = #{pkVouchertype,jdbcType=VARCHAR},
MAXNO = #{maxno,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},
where PK_VOUCHERMAXNO = #{pkVouchermaxno,jdbcType=VARCHAR}
update cw_gl_vouchermaxno
set PK_GLORGBOOK = #{pkGlorgbook,jdbcType=VARCHAR},
PERIOD = #{period,jdbcType=VARCHAR},
PK_VOUCHERTYPE = #{pkVouchertype,jdbcType=VARCHAR},
MAXNO = #{maxno,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}
where PK_VOUCHERMAXNO = #{pkVouchermaxno,jdbcType=VARCHAR}
insert into cw_gl_vouchermaxno (PK_VOUCHERMAXNO, PK_GLORGBOOK, PERIOD, PK_VOUCHERTYPE, MAXNO, USE_STATE, CREATE_USER,
CREATE_TIME)
select temp.PK_VOUCHERMAXNO, temp.PK_GLORGBOOK, temp.PERIOD, temp.PK_VOUCHERTYPE, temp.MAXNO, temp.USE_STATE, temp.CREATE_USER, temp.CREATE_TIME from (
select
#{item.pkVouchermaxno,jdbcType=VARCHAR} as PK_VOUCHERMAXNO,
#{item.pkGlorgbook,jdbcType=VARCHAR} as PK_GLORGBOOK,
#{item.period,jdbcType=VARCHAR} as PERIOD,
#{item.pkVouchertype,jdbcType=VARCHAR} as PK_VOUCHERTYPE,
'0' as MAXNO,
#{item.useState,jdbcType=VARCHAR} as USE_STATE,
#{item.createUser,jdbcType=VARCHAR} as CREATE_USER,
#{item.createTime,jdbcType=TIMESTAMP} as CREATE_TIME
from dual
where not exists(select 1 from cw_gl_vouchermaxno a where a.PK_GLORGBOOK=#{item.pkGlorgbook,jdbcType=VARCHAR} and
a.PERIOD=#{item.period,jdbcType=VARCHAR} and USE_STATE= '1' )
) temp