t.id
, t.payment_agency
, t.employee_id
, t.payment_organization
, t.welfare_type
, t.category_type
, t.country_total
, t.company_total
, t.adjustment_total
, t.adjust_to
, t.bill_month
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
INSERT INTO hrsa_compensation_log(
id,
employee_id,
payment_organization,
welfare_type,
category_type,
country_total,
company_total,
adjustment_total,
adjust_to,
bill_month,
create_time,
update_time,
creator,
delete_type,
tenant_key
)
VALUES
(
#{item.id},
#{item.employeeId},
#{item.paymentOrganization},
#{item.welfareType},
#{item.categoryType},
#{item.countryTotal},
#{item.companyTotal},
#{item.adjustmentTotal},
#{item.adjustTo},
#{item.billMonth},
#{item.createTime},
#{item.updateTime},
#{item.creator},
#{item.deleteType},
#{item.tenantKey}
)
INSERT INTO hrsa_compensation_log(
id,
employee_id,
payment_organization,
welfare_type,
category_type,
country_total,
company_total,
adjustment_total,
adjust_to,
bill_month,
create_time,
update_time,
creator,
delete_type,
tenant_key
)
select
#{item.id,jdbcType=DOUBLE},
#{item.employeeId,jdbcType=DOUBLE},
#{item.paymentOrganization,jdbcType=DOUBLE},
#{item.welfareType,jdbcType=INTEGER},
#{item.categoryType,jdbcType=VARCHAR},
#{item.countryTotal,jdbcType=VARCHAR},
#{item.companyTotal,jdbcType=VARCHAR},
#{item.adjustmentTotal,jdbcType=VARCHAR},
#{item.adjustTo,jdbcType=DOUBLE},
#{item.billMonth,jdbcType=VARCHAR},
#{item.createTime,jdbcType=DATE},
#{item.updateTime,jdbcType=DATE},
#{item.creator,jdbcType=DOUBLE},
#{item.deleteType,jdbcType=INTEGER},
#{item.tenantKey,jdbcType=VARCHAR}
from dual
INSERT INTO hrsa_compensation_log(
id,
employee_id,
payment_organization,
welfare_type,
category_type,
country_total,
company_total,
adjustment_total,
adjust_to,
bill_month,
create_time,
update_time,
creator,
delete_type,
tenant_key
)
VALUES
(
#{item.id},
#{item.employeeId},
#{item.paymentOrganization},
#{item.welfareType},
#{item.categoryType},
#{item.countryTotal},
#{item.companyTotal},
#{item.adjustmentTotal},
#{item.adjustTo},
#{item.billMonth},
#{item.createTime},
#{item.updateTime},
#{item.creator},
#{item.deleteType},
#{item.tenantKey}
)
insert into hrsa_compensation_log (
id,
employee_id,
payment_organization,
welfare_type,
category_type,
country_total,
company_total,
adjustment_total,
adjust_to,
bill_month,
create_time,
update_time,
creator,
delete_type,
tenant_key)
VALUES (
#{id},
#{employeeId},
#{paymentOrganization},
#{welfareType},
#{categoryType},
#{countryTotal},
#{companyTotal},
#{adjustmentTotal},
#{adjustTo},
#{billMonth},
#{createTime},
#{updateTime},
#{creator},
#{deleteType},
#{tenantKey})
UPDATE hrsa_compensation_log
SET delete_type = 1
WHERE id = #{id}
AND delete_type = 0
UPDATE hrsa_compensation_log
SET delete_type = 1
WHERE bill_month = #{billMonth}
AND payment_organization = #{paymentOrganization}
AND delete_type = 0
UPDATE hrsa_compensation_log
SET delete_type = 1
WHERE bill_month = #{billMonth}
AND payment_organization = #{paymentOrganization}
AND delete_type = 0
AND employee_id IN
#{employeeId}