select w.wage_id, w.user_id, w.base_salary, w.year_salary, w.post_salary, w.performance_salary, w.certificates_subsidy, w.festival_subsidy, w.post_stable_subsidy,
w.high_temperature_subsidy, w.attendance_deduct, w.payable_wage, w.house_fund, w.endowment_insurance, w.unemployment_insurance, w.medical_insurance, w.property_fee,
w.deduct_total, w.social_security_unit, w.individual_income_tax, w.paid_wage, w.pay_day, w.pay_month, w.remark, w.performance_id, u.nick_name from cmc_wage as w
left join sys_user as u on u.user_id = w.user_id
insert into cmc_wage
wage_id,
user_id,
base_salary,
year_salary,
post_salary,
performance_salary,
certificates_subsidy,
festival_subsidy,
post_stable_subsidy,
high_temperature_subsidy,
attendance_deduct,
payable_wage,
house_fund,
endowment_insurance,
unemployment_insurance,
medical_insurance,
property_fee,
deduct_total,
social_security_unit,
individual_income_tax,
paid_wage,
pay_day,
pay_month,
remark,
performance_id,
#{wageId},
#{userId},
#{baseSalary},
#{yearSalary},
#{postSalary},
#{performanceSalary},
#{certificatesSubsidy},
#{festivalSubsidy},
#{postStableSubsidy},
#{highTemperatureSubsidy},
#{attendanceDeduct},
#{payableWage},
#{houseFund},
#{endowmentInsurance},
#{unemploymentInsurance},
#{medicalInsurance},
#{propertyFee},
#{deductTotal},
#{socialSecurityUnit},
#{individualIncomeTax},
#{paidWage},
#{payDay},
#{payMonth},
#{remark},
#{performanceId},
update cmc_wage
user_id = #{userId},
base_salary = #{baseSalary},
year_salary = #{yearSalary},
post_salary = #{postSalary},
performance_salary = #{performanceSalary},
certificates_subsidy = #{certificatesSubsidy},
festival_subsidy = #{festivalSubsidy},
post_stable_subsidy = #{postStableSubsidy},
high_temperature_subsidy = #{highTemperatureSubsidy},
attendance_deduct = #{attendanceDeduct},
payable_wage = #{payableWage},
house_fund = #{houseFund},
endowment_insurance = #{endowmentInsurance},
unemployment_insurance = #{unemploymentInsurance},
medical_insurance = #{medicalInsurance},
property_fee = #{propertyFee},
deduct_total = #{deductTotal},
social_security_unit = #{socialSecurityUnit},
individual_income_tax = #{individualIncomeTax},
paid_wage = #{paidWage},
pay_day = #{payDay},
pay_month = #{payMonth},
remark = #{remark},
performance_id = #{performanceId},
where wage_id = #{wageId}
delete from cmc_wage where wage_id = #{wageId}
delete from cmc_wage where wage_id in
#{wageId}
delete from cmc_wage where performance_id in
#{performanceId}