select b.budget_id, b.project_id, p.project_number, p.project_name, b.staff_cost, b.car_cost, b.device_cost, b.fix_cost, b.settle_expense, b.out_expense, b.business_expense, b.tax_expense,
b.rent_expense, b.other_expense, b.out_remark, b.business_remark, b.tax_remark, b.rent_remark, b.other_remark, b.direct_expense, b.total_budget, b.compiler,
u.nick_name as compiler_nick_name, b.auditor, u1.nick_name as auditor_nick_name, b.create_time from cmc_budget as b
left join sys_user as u on u.user_id = b.compiler
left join sys_user as u1 on u1.user_id = b.auditor
left join cmc_project as p on b.project_id = p.project_id
insert into cmc_budget
budget_id,
project_id,
staff_cost,
car_cost,
device_cost,
fix_cost,
settle_expense,
out_expense,
business_expense,
tax_expense,
rent_expense,
other_expense,
out_remark,
business_remark,
tax_remark,
rent_remark,
other_remark,
direct_expense,
total_budget,
compiler,
auditor,
create_time
#{budgetId},
#{projectId},
#{staffCost},
#{carCost},
#{deviceCost},
#{fixCost},
#{settleExpense},
#{outExpense},
#{businessExpense},
#{taxExpense},
#{rentExpense},
#{otherExpense},
#{outRemark},
#{businessRemark},
#{taxRemark},
#{rentRemark},
#{otherRemark},
#{directExpense},
#{totalBudget},
#{compiler},
#{auditor},
sysdate()
update cmc_budget
project_id = #{projectId},
staff_cost = #{staffCost},
car_cost = #{carCost},
device_cost = #{deviceCost},
fix_cost = #{fixCost},
settle_expense = #{settleExpense},
out_expense = #{outExpense},
business_expense = #{businessExpense},
tax_expense = #{taxExpense},
rent_expense = #{rentExpense},
other_expense = #{otherExpense},
out_remark = #{outRemark},
business_remark = #{businessRemark},
tax_remark = #{taxRemark},
rent_remark = #{rentRemark},
other_remark = #{otherRemark},
direct_expense = #{directExpense},
total_budget = #{totalBudget},
compiler = #{compiler},
auditor = #{auditor},
create_time = #{createTime},
where budget_id = #{budgetId}
delete from cmc_budget where budget_id = #{budgetId}
delete from cmc_budget where budget_id in
#{budgetId}