t1.id,
t1.employee_id,
t1.tax_agent_id,
t1.children_education,
t1.continuing_education,
t1.housing_loan_interest,
t1.housing_rent,
t1.supporting_elder,
t1.serious_illness_treatment,
t1.infant_care,
t1.create_time,
t1.update_time,
t1.creator,
t1.delete_type,
t1.tenant_key
t1.id,
t1.employee_id,
t2.id AS tax_agent_id,
t2.name AS tax_agent_name,
e.lastname as username,
e.certificatenum as idNo,
d.departmentname AS departmentName,
e.mobile,
e.workcode as job_num,
e.companystartdate as hiredate,
t1.children_education,
t1.continuing_education,
t1.housing_loan_interest,
t1.housing_rent,
t1.serious_illness_treatment,
t1.supporting_elder,
t1.infant_care
AND t1.id IN
#{id}
AND t1.id = #{param.specialAddDeductionId}
AND t1.employee_id = #{param.employeeId}
AND
(
e.lastname like CONCAT('%',#{param.keyword},'%')
OR d.departmentname like CONCAT('%',#{param.keyword},'%')
OR e.workcode like CONCAT('%',#{param.keyword},'%')
)
AND e.lastname like CONCAT('%',#{param.username},'%')
AND t1.tax_agent_id = #{param.taxAgentId}
AND t1.tax_agent_id IN
#{id}
AND d.id IN
#{id}
AND e.workcode like CONCAT('%',#{param.jobNum},'%')
AND (e.companystartdate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
AND e.mobile like CONCAT('%',#{param.mobile},'%')
AND t1.id IN
#{id}
AND t1.id = #{param.specialAddDeductionId}
AND t1.employee_id = #{param.employeeId}
AND
(
e.lastname like '%'||#{param.keyword}||'%'
OR d.departmentname like '%'||#{param.keyword}||'%'
OR e.workcode like '%'||#{param.keyword}||'%'
)
AND e.lastname like '%'||#{param.username}||'%'
AND t1.tax_agent_id = #{param.taxAgentId}
AND t1.tax_agent_id IN
#{id}
AND d.id IN
#{id}
AND e.workcode like '%'||#{param.jobNum}||'%'
AND (e.companystartdate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
AND e.mobile like '%'||#{param.mobile}||'%'
AND t1.id IN
#{id}
AND t1.id = #{param.specialAddDeductionId}
AND t1.employee_id = #{param.employeeId}
AND
(
e.lastname like '%'+#{param.keyword}+'%'
OR d.departmentname like '%'+#{param.keyword}+'%'
OR e.workcode like '%'+#{param.keyword}+'%'
)
AND e.lastname like '%'+#{param.username}+'%'
AND t1.tax_agent_id = #{param.taxAgentId}
AND t1.tax_agent_id IN
#{id}
AND d.id IN
#{id}
AND e.workcode like '%'+#{param.jobNum}+'%'
AND (e.companystartdate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
AND e.mobile like '%'+#{param.mobile}+'%'
insert into hrsa_special_add_deduction
employee_id,
tax_agent_id,
children_education,
continuing_education,
housing_loan_interest,
housing_rent,
supporting_elder,
serious_illness_treatment,
infant_care,
create_time,
update_time,
creator,
delete_type,
tenant_key,
#{employeeId,jdbcType=BIGINT},
#{taxAgentId,jdbcType=BIGINT},
#{childrenEducation,jdbcType=VARCHAR},
#{continuingEducation,jdbcType=VARCHAR},
#{housingLoanInterest,jdbcType=VARCHAR},
#{housingRent,jdbcType=VARCHAR},
#{supportingElder,jdbcType=VARCHAR},
#{seriousIllnessTreatment,jdbcType=VARCHAR},
#{infantCare,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{creator,jdbcType=BIGINT},
0,
#{tenantKey,jdbcType=VARCHAR},
select hrsa_special_a_d_id.currval from dual
insert into hrsa_special_add_deduction
employee_id,
tax_agent_id,
children_education,
continuing_education,
housing_loan_interest,
housing_rent,
supporting_elder,
serious_illness_treatment,
infant_care,
create_time,
update_time,
creator,
delete_type,
tenant_key,
#{employeeId,jdbcType=BIGINT},
#{taxAgentId,jdbcType=BIGINT},
#{childrenEducation,jdbcType=VARCHAR},
#{continuingEducation,jdbcType=VARCHAR},
#{housingLoanInterest,jdbcType=VARCHAR},
#{housingRent,jdbcType=VARCHAR},
#{supportingElder,jdbcType=VARCHAR},
#{seriousIllnessTreatment,jdbcType=VARCHAR},
#{infantCare,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{creator,jdbcType=BIGINT},
0,
#{tenantKey,jdbcType=VARCHAR},
update hrsa_special_add_deduction
employee_id = #{employeeId,jdbcType=BIGINT},
tax_agent_id = #{taxAgentId,jdbcType=BIGINT},
children_education = #{childrenEducation,jdbcType=VARCHAR},
continuing_education = #{continuingEducation,jdbcType=VARCHAR},
housing_loan_interest = #{housingLoanInterest,jdbcType=VARCHAR},
housing_rent = #{housingRent,jdbcType=VARCHAR},
supporting_elder = #{supportingElder,jdbcType=VARCHAR},
serious_illness_treatment = #{seriousIllnessTreatment,jdbcType=VARCHAR},
infant_care = #{infantCare,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
delete_type = #{deleteType,jdbcType=INTEGER},
tenant_key = #{tenantKey,jdbcType=VARCHAR},
where id = #{id,jdbcType=BIGINT}
update hrsa_special_add_deduction
when id = #{item.id,jdbcType=BIGINT} then #{item.employeeId,jdbcType=BIGINT}
when id = #{item.id,jdbcType=BIGINT} then #{item.taxAgentId,jdbcType=BIGINT}
when id = #{item.id,jdbcType=BIGINT} then #{item.childrenEducation,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.continuingEducation,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.housingLoanInterest,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.housingRent,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.supportingElder,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.seriousIllnessTreatment,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.infantCare,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP}
when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP}
when id = #{item.id,jdbcType=BIGINT} then #{item.creator,jdbcType=BIGINT}
when id = #{item.id,jdbcType=BIGINT} then #{item.deleteType,jdbcType=INTEGER}
when id = #{item.id,jdbcType=BIGINT} then #{item.tenantKey,jdbcType=VARCHAR}
where id in
#{item.id,jdbcType=BIGINT}
insert into hrsa_special_add_deduction
(employee_id, tax_agent_id, children_education, continuing_education,
housing_loan_interest, housing_rent, supporting_elder, serious_illness_treatment,
infant_care, create_time, update_time, creator, delete_type, tenant_key)
values
(#{item.employeeId,jdbcType=BIGINT}, #{item.taxAgentId,jdbcType=BIGINT},
#{item.childrenEducation,jdbcType=VARCHAR}, #{item.continuingEducation,jdbcType=VARCHAR},
#{item.housingLoanInterest,jdbcType=VARCHAR}, #{item.housingRent,jdbcType=VARCHAR},
#{item.supportingElder,jdbcType=VARCHAR}, #{item.seriousIllnessTreatment,jdbcType=VARCHAR},
#{item.infantCare,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP},
#{item.creator,jdbcType=BIGINT}, 0, #{item.tenantKey,jdbcType=VARCHAR})
insert into hrsa_special_add_deduction
(employee_id, tax_agent_id, children_education, continuing_education,
housing_loan_interest, housing_rent, supporting_elder, serious_illness_treatment,
infant_care, create_time, update_time, creator, delete_type, tenant_key)
select
#{item.employeeId,jdbcType=BIGINT}, #{item.taxAgentId,jdbcType=BIGINT},
#{item.childrenEducation,jdbcType=VARCHAR}, #{item.continuingEducation,jdbcType=VARCHAR},
#{item.housingLoanInterest,jdbcType=VARCHAR}, #{item.housingRent,jdbcType=VARCHAR},
#{item.supportingElder,jdbcType=VARCHAR}, #{item.seriousIllnessTreatment,jdbcType=VARCHAR},
#{item.infantCare,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP},
#{item.creator,jdbcType=BIGINT}, 0, #{item.tenantKey,jdbcType=VARCHAR}
from dual
update hrsa_special_add_deduction
set delete_type = 1
where id in (
#{id}
) and delete_type = 0