select f_id, f_billno, f_ctrlcorpid, f_act_id, f_corpid, t_mblno, f_trans_act_id, f_amtdr, f_amtcr, f_billtype, f_billstatus, f_remarks, f_from_date, f_to_date, f_accbilldate, f_ref_no, del_flag, create_by, f_deptid, create_time, update_by, update_time, charging_method, invoice_no, bank, water_bill_no, f_system_type, f_tracking_number, f_invoice_rise, f_sign, f_send_Time, f_apply_money, f_account_id, f_make, f_vslid, f_voyid, f_loadportid, f_destportid, f_dc, f_bank_number, f_reconciliation, invoice_remarks from t_fee insert into t_fee f_id, f_billno, f_ctrlcorpid, f_act_id, f_corpid, t_mblno, f_trans_act_id, f_amtdr, f_amtcr, f_billtype, f_billstatus, f_remarks, f_from_date, f_to_date, f_accbilldate, f_ref_no, del_flag, create_by, f_deptid, create_time, update_by, update_time, charging_method, invoice_no, bank, water_bill_no, f_system_type, f_tracking_number, f_invoice_rise, f_sign, f_send_Time, f_apply_money, f_account_id, f_make, f_vslid, f_voyid, f_loadportid, f_destportid, f_dc, f_bank_number, f_reconciliation, invoice_remarks, #{fId}, #{fBillno}, #{fCtrlcorpid}, #{fActId}, #{fCorpid}, #{tMblno}, #{fTransActId}, #{fAmtdr}, #{fAmtcr}, #{fBilltype}, #{fBillstatus}, #{fRemarks}, #{fFromDate}, #{fToDate}, #{fAccbilldate}, #{fRefNo}, #{delFlag}, #{createBy}, #{fDeptid}, #{createTime}, #{updateBy}, #{updateTime}, #{chargingMethod}, #{invoiceNo}, #{bank}, #{waterBillNo}, #{fSystemType}, #{fTrackingNumber}, #{fInvoiceRise}, #{fSign}, #{fSendTime}, #{fApplyMoney}, #{fAccountId}, #{fMake}, #{fVslid}, #{fVoyid}, #{fLoadportid}, #{fDestportid}, #{fDc}, #{fBankNumber}, #{fReconciliation}, #{invoiceRemarks}, update t_fee f_billno = #{fBillno}, f_ctrlcorpid = #{fCtrlcorpid}, f_act_id = #{fActId}, f_corpid = #{fCorpid}, t_mblno = #{tMblno}, f_trans_act_id = #{fTransActId}, f_amtdr = #{fAmtdr}, f_amtcr = #{fAmtcr}, f_billtype = #{fBilltype}, f_billstatus = #{fBillstatus}, f_remarks = #{fRemarks}, f_from_date = #{fFromDate}, f_to_date = #{fToDate}, f_accbilldate = #{fAccbilldate}, f_ref_no = #{fRefNo}, del_flag = #{delFlag}, create_by = #{createBy}, f_deptid = #{fDeptid}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, charging_method = #{chargingMethod}, invoice_no = #{invoiceNo}, bank = #{bank}, water_bill_no = #{waterBillNo}, f_system_type = #{fSystemType}, f_tracking_number = #{fTrackingNumber}, f_invoice_rise = #{fInvoiceRise}, f_sign = #{fSign}, f_send_Time = #{fSendTime}, f_apply_money = #{fApplyMoney}, f_account_id = #{fAccountId}, f_make = #{fMake}, f_vslid = #{fVslid}, f_voyid = #{fVoyid}, f_loadportid = #{fLoadportid}, f_destportid = #{fDestportid}, f_dc = #{fDc}, f_bank_number = #{fBankNumber}, f_reconciliation = #{fReconciliation}, invoice_remarks = #{invoiceRemarks}, where f_id = #{fId} delete from t_fee where f_id = #{fId} delete f.*, fd.* , fi.* from t_fee f LEFT JOIN t_fee_do fd ON fd.f_pid = f.f_id LEFT JOIN t_fee_invoice fi ON fi.f_pid = f.f_id where f.f_id in #{fId}