select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno, f_warehouseid, f_storekeeper, f_chargedate, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight, f_volumn, f_trademodeid, f_billingway, f_sbu, f_feetunit, f_mblno, f_vslvoy, f_inwarehouseid, f_marks, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid, f_billtype, f_billstatus, del_flag, create_by, create_time, f_items_status, update_by, update_time, remark, f_billing_deadline, f_product_name, f_review_date, f_truckno, f_driver_name, f_driver_tel, f_driver_id_car, f_business_type,f_labour,f_fleet, f_bstime,f_cartype ,f_goodsid ,f_new_trademodeid from t_warehousebills insert into t_warehousebills f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno, f_warehouseid, f_storekeeper, f_chargedate, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight, f_volumn, f_trademodeid, f_billingway, f_sbu, f_feetunit, f_mblno, f_vslvoy, f_marks, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid, f_billtype, f_billstatus, del_flag, create_by, create_time, f_items_status, update_by, update_time, remark, f_billing_deadline, f_product_name, f_review_date, f_truckno, f_driver_name, f_driver_tel, f_driver_id_car, f_business_type, f_labour, f_fleet, f_inwarehouseid, f_bstime, f_cartype, f_goodsid, f_new_trademodeid, #{fBillno}, #{fCustomsdeclartion}, #{fOriginalbillno}, #{fDeptid}, #{fBsdeptid}, #{fContacts}, #{fTel}, #{fCorpid}, #{fTocorpid}, #{fStltypeid}, #{fBscorpno}, #{fWarehouseid}, #{fStorekeeper}, #{fChargedate}, #{fBsdate}, #{fPlanqty}, #{fPlangrossweight}, #{fPlannetweight}, #{fPlanvolumn}, #{fQty}, #{fGrossweight}, #{fNetweight}, #{fVolumn}, #{fTrademodeid}, #{fBillingway}, #{fSbu}, #{fFeetunit}, #{fMblno}, #{fVslvoy}, #{fMarks}, #{fEta}, #{fCustomno}, #{fIfweigh}, #{fIfpledge}, #{fIfdamage}, #{fBankcorpid}, #{fBilltype}, #{fBillstatus}, #{delFlag}, #{createBy}, #{createTime}, #{fItemsStatus}, #{updateBy}, #{updateTime}, #{remark}, #{fBillingDeadline}, #{fProductName}, #{fReviewDate}, #{fTruckno}, #{fDriverName}, #{fDriverTel}, #{fDriverIdCar}, #{fBusinessType}, #{fLabour}, #{fFleet}, #{fInwarehouseid}, #{fBstime}, #{fCartype}, #{fGoodsid}, #{fNewTrademodeid}, update t_warehousebills f_billno = #{fBillno}, f_customsdeclartion = #{fCustomsdeclartion}, f_originalbillno = #{fOriginalbillno}, f_deptid = #{fDeptid}, f_bsdeptid = #{fBsdeptid}, f_contacts = #{fContacts}, f_tel = #{fTel}, f_corpid = #{fCorpid}, f_tocorpid = #{fTocorpid}, f_stltypeid = #{fStltypeid}, f_bscorpno = #{fBscorpno}, f_warehouseid = #{fWarehouseid}, f_storekeeper = #{fStorekeeper}, f_chargedate = #{fChargedate}, f_bsdate = #{fBsdate}, f_planqty = #{fPlanqty}, f_plangrossweight = #{fPlangrossweight}, f_plannetweight = #{fPlannetweight}, f_planvolumn = #{fPlanvolumn}, f_qty = #{fQty}, f_grossweight = #{fGrossweight}, f_netweight = #{fNetweight}, f_volumn = #{fVolumn}, f_trademodeid = #{fTrademodeid}, f_billingway = #{fBillingway}, f_sbu = #{fSbu}, f_feetunit = #{fFeetunit}, f_mblno = #{fMblno}, f_vslvoy = #{fVslvoy}, f_marks = #{fMarks}, f_eta = #{fEta}, f_customno = #{fCustomno}, f_ifweigh = #{fIfweigh}, f_ifpledge = #{fIfpledge}, f_ifdamage = #{fIfdamage}, f_bankcorpid = #{fBankcorpid}, f_billtype = #{fBilltype}, f_billstatus = #{fBillstatus}, del_flag = #{delFlag}, create_by = #{createBy}, create_time = #{createTime}, f_items_status = #{fItemsStatus}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, f_billing_deadline = #{fBillingDeadline}, f_product_name = #{fProductName}, f_review_date = #{fReviewDate}, f_truckno = #{fTruckno}, f_driver_name = #{fDriverName}, f_driver_tel = #{fDriverTel}, f_driver_id_car = #{fDriverIdCar}, f_business_type = #{fBusinessType}, f_review_date = null, f_labour = #{fLabour }, f_fleet = #{fFleet}, f_inwarehouseid = #{fInwarehouseid}, f_bstime = #{fBstime}, f_cartype = #{fCartype}, f_goodsid = #{fGoodsid}, f_new_trademodeid = #{fNewTrademodeid}, where f_id = #{fId} delete from t_warehousebills where f_id = #{fId} delete item.*, bill.*, fess.*, enclosure.* from t_warehousebills bill LEFT JOIN t_warehousebillsfees fess ON fess.f_pid = bill.f_id LEFT JOIN t_enclosure enclosure ON enclosure.f_pid = bill.f_id LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id where bill.f_id in #{fId} update t_warehousebills f_billstatus = #{fettle}, f_review_date = #{auditItem}, f_review_date = null, where f_id = #{fPid}