RULES_ID, GATEPOST_ID, MATERIAL_ID, RULES_GATEPOST_START_TIME, RULES_GATEPOST_END_TIME,
RULES_GATEPOST_ENTRY_OUT_TYPE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
INSERT_UPDATE_REMARK, DELETED, VEHICLE_TYPE_ID
t.RULES_ID, t.GATEPOST_ID, t.MATERIAL_ID, t.RULES_GATEPOST_START_TIME, t.RULES_GATEPOST_END_TIME,
t.RULES_GATEPOST_ENTRY_OUT_TYPE, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.VEHICLE_TYPE_ID
SELECT FROM RMS_GATEPOST_RULES
SELECT FROM RMS_GATEPOST_RULES t
and RULES_ID = #{rulesId}
and GATEPOST_ID = #{gatepostId}
and MATERIAL_ID = #{materialId}
and RULES_GATEPOST_START_TIME = #{rulesGatepostStartTime}
and RULES_GATEPOST_END_TIME = #{rulesGatepostEndTime}
and RULES_GATEPOST_ENTRY_OUT_TYPE = #{rulesGatepostEntryOutType}
and INSERT_USERNAME = #{insertUsername}
and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
and UPDATE_USERNAME = #{updateUsername}
and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
and DELETED = #{deleted}
and VEHICLE_TYPE_ID = #{vehicleTypeId}
and RULES_ID = #{rulesId}
and GATEPOST_ID = #{gatepostId}
and MATERIAL_ID = #{materialId}
and RULES_GATEPOST_START_TIME LIKE '%${rulesGatepostStartTime}%'
and RULES_GATEPOST_END_TIME LIKE '%${rulesGatepostEndTime}%'
and RULES_GATEPOST_ENTRY_OUT_TYPE = #{rulesGatepostEntryOutType}
and INSERT_USERNAME LIKE '%${insertUsername}%'
and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
and UPDATE_USERNAME LIKE '%${updateUsername}%'
and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
and DELETED = #{deleted}
and VEHICLE_TYPE_ID = #{vehicleTypeId}
delete from RMS_GATEPOST_RULES
where RULES_ID = #{rulesId,jdbcType=DECIMAL}
delete from RMS_GATEPOST_RULES
where 1!=1
or GATEPOST_ID = #{gatepostId}
or MATERIAL_ID = #{materialId}
or RULES_GATEPOST_START_TIME = #{rulesGatepostStartTime}
or RULES_GATEPOST_END_TIME = #{rulesGatepostEndTime}
or RULES_GATEPOST_ENTRY_OUT_TYPE = #{rulesGatepostEntryOutType}
or INSERT_USERNAME = #{insertUsername}
or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
or UPDATE_USERNAME = #{updateUsername}
or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
or DELETED = #{deleted}
or VEHICLE_TYPE_ID = #{vehicleTypeId}
insert into RMS_GATEPOST_RULES (RULES_ID, GATEPOST_ID, MATERIAL_ID,
RULES_GATEPOST_START_TIME, RULES_GATEPOST_END_TIME,
RULES_GATEPOST_ENTRY_OUT_TYPE, INSERT_USERNAME,
INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
INSERT_UPDATE_REMARK, DELETED, VEHICLE_TYPE_ID
)
values (#{rulesId,jdbcType=DECIMAL}, #{gatepostId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
#{rulesGatepostStartTime,jdbcType=VARCHAR}, #{rulesGatepostEndTime,jdbcType=VARCHAR},
#{rulesGatepostEntryOutType,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
#{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{vehicleTypeId,jdbcType=DECIMAL}
)
insert into RMS_GATEPOST_RULES
RULES_ID,
GATEPOST_ID,
MATERIAL_ID,
RULES_GATEPOST_START_TIME,
RULES_GATEPOST_END_TIME,
RULES_GATEPOST_ENTRY_OUT_TYPE,
INSERT_USERNAME,
INSERT_TIME,
UPDATE_USERNAME,
UPDATE_TIME,
INSERT_UPDATE_REMARK,
DELETED,
VEHICLE_TYPE_ID,
#{rulesId,jdbcType=DECIMAL},
#{gatepostId,jdbcType=DECIMAL},
#{materialId,jdbcType=DECIMAL},
#{rulesGatepostStartTime,jdbcType=VARCHAR},
#{rulesGatepostEndTime,jdbcType=VARCHAR},
#{rulesGatepostEntryOutType,jdbcType=DECIMAL},
#{insertUsername,jdbcType=VARCHAR},
#{insertTime,jdbcType=TIMESTAMP},
#{updateUsername,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{insertUpdateRemark,jdbcType=VARCHAR},
#{deleted,jdbcType=DECIMAL},
#{vehicleTypeId,jdbcType=DECIMAL},
update RMS_GATEPOST_RULES
set GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
RULES_GATEPOST_START_TIME = #{rulesGatepostStartTime,jdbcType=VARCHAR},
RULES_GATEPOST_END_TIME = #{rulesGatepostEndTime,jdbcType=VARCHAR},
RULES_GATEPOST_ENTRY_OUT_TYPE = #{rulesGatepostEntryOutType,jdbcType=DECIMAL},
INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
DELETED = #{deleted,jdbcType=DECIMAL},
VEHICLE_TYPE_ID = #{vehicleTypeId,jdbcType=DECIMAL}
where RULES_ID = #{rulesId,jdbcType=DECIMAL}
update RMS_GATEPOST_RULES
GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
RULES_GATEPOST_START_TIME = #{rulesGatepostStartTime,jdbcType=VARCHAR},
RULES_GATEPOST_END_TIME = #{rulesGatepostEndTime,jdbcType=VARCHAR},
RULES_GATEPOST_ENTRY_OUT_TYPE = #{rulesGatepostEntryOutType,jdbcType=DECIMAL},
INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
DELETED = #{deleted,jdbcType=DECIMAL},
VEHICLE_TYPE_ID = #{vehicleTypeId,jdbcType=DECIMAL},
where RULES_ID = #{rulesId,jdbcType=DECIMAL}
insert into RMS_GATEPOST_RULES
(RULES_ID,
GATEPOST_ID, MATERIAL_ID, RULES_GATEPOST_START_TIME,
RULES_GATEPOST_END_TIME, RULES_GATEPOST_ENTRY_OUT_TYPE,
INSERT_USERNAME, INSERT_TIME,
UPDATE_USERNAME, UPDATE_TIME,
INSERT_UPDATE_REMARK, DELETED,
VEHICLE_TYPE_ID)
(
select
#{item.rulesId,jdbcType=DECIMAL},
#{item.gatepostId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.rulesGatepostStartTime,jdbcType=VARCHAR},
#{item.rulesGatepostEndTime,jdbcType=VARCHAR}, #{item.rulesGatepostEntryOutType,jdbcType=DECIMAL},
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
#{item.vehicleTypeId,jdbcType=DECIMAL} from dual
)
update RMS_GATEPOST_RULES
set
RULES_ID=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.rulesId,jdbcType=DECIMAL}
,GATEPOST_ID=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.gatepostId,jdbcType=DECIMAL}
,MATERIAL_ID=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
,RULES_GATEPOST_START_TIME=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.rulesGatepostStartTime,jdbcType=VARCHAR}
,RULES_GATEPOST_END_TIME=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.rulesGatepostEndTime,jdbcType=VARCHAR}
,RULES_GATEPOST_ENTRY_OUT_TYPE=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.rulesGatepostEntryOutType,jdbcType=DECIMAL}
,INSERT_USERNAME=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
,INSERT_TIME=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
,UPDATE_USERNAME=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
,UPDATE_TIME=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
,INSERT_UPDATE_REMARK=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
,DELETED=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
,VEHICLE_TYPE_ID=
when #{item.rulesId,jdbcType=DECIMAL} then #{item.vehicleTypeId,jdbcType=DECIMAL}
where RULES_ID in
#{item.rulesId,jdbcType=DECIMAL}
delete from RMS_GATEPOST_RULES
where RULES_ID in
#{id}