t . add_up_child_education , t.add_up_continuing_education , t.add_up_housing_loan_interest , t.add_up_housing_rent , t.add_up_support_elderly , t.create_time , t.creator , t.declare_month , t.delete_type , t.employee_id , t.id , t.tax_agent_id , t.tenant_key , t.update_time INSERT INTO hrsa_add_up_deduction add_up_child_education, add_up_continuing_education, add_up_housing_loan_interest, add_up_housing_rent, add_up_support_elderly, create_time, creator, declare_month, delete_type, employee_id, id, tax_agent_id, tenant_key, update_time, #{addUpChildEducation}, #{addUpContinuingEducation}, #{addUpHousingLoanInterest}, #{addUpHousingRent}, #{addUpSupportElderly}, #{createTime}, #{creator}, #{declareMonth}, #{deleteType}, #{employeeId}, #{id}, #{taxAgentId}, #{tenantKey}, #{updateTime}, INSERT INTO hrsa_add_up_deduction add_up_child_education, add_up_continuing_education, add_up_housing_loan_interest, add_up_housing_rent, add_up_support_elderly, create_time, creator, declare_month, delete_type, employee_id, id, tax_agent_id, tenant_key, update_time, #{addUpChildEducation}, #{addUpContinuingEducation}, #{addUpHousingLoanInterest}, #{addUpHousingRent}, #{addUpSupportElderly}, #{createTime}, #{creator}, #{declareMonth}, #{deleteType}, #{employeeId}, #{id}, #{taxAgentId}, #{tenantKey}, #{updateTime}, UPDATE hrsa_add_up_deduction add_up_child_education=#{addUpChildEducation}, add_up_continuing_education=#{addUpContinuingEducation}, add_up_housing_loan_interest=#{addUpHousingLoanInterest}, add_up_housing_rent=#{addUpHousingRent}, add_up_support_elderly=#{addUpSupportElderly}, create_time=#{createTime}, creator=#{creator}, declare_month=#{declareMonth}, delete_type=#{deleteType}, employee_id=#{employeeId}, tax_agent_id=#{taxAgentId}, tenant_key=#{tenantKey}, update_time=#{updateTime}, WHERE id = #{id} AND delete_type = 0 UPDATE hrsa_add_up_deduction add_up_child_education=#{addUpChildEducation}, add_up_continuing_education=#{addUpContinuingEducation}, add_up_housing_loan_interest=#{addUpHousingLoanInterest}, add_up_housing_rent=#{addUpHousingRent}, add_up_support_elderly=#{addUpSupportElderly}, create_time=#{createTime}, creator=#{creator}, declare_month=#{declareMonth}, delete_type=#{deleteType}, employee_id=#{employeeId}, tax_agent_id=#{taxAgentId}, tenant_key=#{tenantKey}, update_time=#{updateTime}, WHERE id = #{id} AND delete_type = 0 UPDATE hrsa_add_up_deduction SET delete_type=1 WHERE id = #{id} AND delete_type = 0 t1 . id , t1.declare_month, t1.employee_id, e.lastname as usename, d.departmentname AS departmentName, e.mobile, e.workcode as job_num, e.created as hiredate, t2.name AS tax_agent_name, t1.add_up_child_education, t1.add_up_continuing_education, t1.add_up_housing_loan_interest, t1.add_up_housing_rent, t1.add_up_support_elderly AND t1.id IN #{id} 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 t1.declare_month = #{param.declareMonth[0]} AND (t1.declare_month BETWEEN #{param.declareMonth[0]} AND #{param.declareMonth[1]}) AND e.lastname like CONCAT('%',#{param.username},'%') AND t1.tax_agent_id = #{param.taxAgentId} AND d.id IN #{id} AND e.workcode like CONCAT('%',#{param.jobNum},'%') AND (e.created BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]}) AND e.mobile like CONCAT('%',#{param.mobile},'%') AND t1.id IN #{id} 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 t1.declare_month = #{param.declareMonth[0]} AND (t1.declare_month BETWEEN #{param.declareMonth[0]} AND #{param.declareMonth[1]}) AND e.lastname like '%'||#{param.username}||'%' AND t1.tax_agent_id = #{param.taxAgentId} AND d.id IN #{id} AND e.workcode like '%'||#{param.jobNum}||'%' AND (e.created BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]}) AND e.mobile like '%'||#{param.mobile}||'%' AND t1.id IN #{id} 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 t1.declare_month = #{param.declareMonth[0]} AND (t1.declare_month BETWEEN #{param.declareMonth[0]} AND #{param.declareMonth[1]}) AND e.lastname like '%'+#{param.username}+'%' AND t1.tax_agent_id = #{param.taxAgentId} AND d.id IN #{id} AND e.workcode like '%'+#{param.jobNum}+'%' AND (e.created BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]}) AND e.mobile like '%'+#{param.mobile}+'%' INSERT INTO hrsa_add_up_deduction( id, employee_id, tax_agent_id, declare_month, add_up_child_education, add_up_continuing_education, add_up_housing_loan_interest, add_up_housing_rent, add_up_support_elderly, create_time, update_time, creator, tenant_key ) VALUES ( #{item.id}, #{item.employeeId}, #{item.taxAgentId}, #{item.declareMonth}, #{item.addUpChildEducation}, #{item.addUpContinuingEducation}, #{item.addUpHousingLoanInterest}, #{item.addUpHousingRent}, #{item.addUpSupportElderly}, #{item.createTime}, #{item.updateTime}, #{item.creator}, #{item.tenantKey} ) INSERT INTO hrsa_add_up_deduction( id, employee_id, tax_agent_id, declare_month, add_up_child_education, add_up_continuing_education, add_up_housing_loan_interest, add_up_housing_rent, add_up_support_elderly, create_time, update_time, creator, tenant_key ) select #{item.id}, #{item.employeeId}, #{item.taxAgentId}, #{item.declareMonth}, #{item.addUpChildEducation}, #{item.addUpContinuingEducation}, #{item.addUpHousingLoanInterest}, #{item.addUpHousingRent}, #{item.addUpSupportElderly}, #{item.createTime}, #{item.updateTime}, #{item.creator}, #{item.tenantKey} from dual INSERT INTO hrsa_add_up_deduction( id, employee_id, tax_agent_id, declare_month, add_up_child_education, add_up_continuing_education, add_up_housing_loan_interest, add_up_housing_rent, add_up_support_elderly, create_time, update_time, creator, tenant_key ) VALUES ( #{item.id}, #{item.employeeId}, #{item.taxAgentId}, #{item.declareMonth}, #{item.addUpChildEducation}, #{item.addUpContinuingEducation}, #{item.addUpHousingLoanInterest}, #{item.addUpHousingRent}, #{item.addUpSupportElderly}, #{item.createTime}, #{item.updateTime}, #{item.creator}, #{item.tenantKey} ) update hrsa_add_up_deduction when id=#{item.id} then #{item.addUpChildEducation} when id=#{item.id} then #{item.addUpContinuingEducation} when id=#{item.id} then #{item.addUpHousingLoanInterest} when id=#{item.id} then #{item.addUpHousingRent} when id=#{item.id} then #{item.addUpSupportElderly} where id in #{item.id}