Insert Into LoadFeeItems (SysID, EntityID, LineNo, CarID, ItemID, ItemProp, ItemAuditType, Dc, Qty, Price, Amt, AMT1, AMT2, AMTORG, OpUserID, OpUserName, SrcActID, SrcEntityID, SrcLineNo) values (1, #{o.loadBillsEntityId}, #{i.lineNo}, #{o.carId}, #{i.itemId}, #{i.itemProp}, #{i.auditType}, 'C', 1, #{i.amt}, #{i.amt}, #{i.amt}, #{i.amt}, #{i.amt}, #{e.EmplId}, #{e.empl}, #{o.actId}, #{o.entityId}, #{o.lineNo}) insert into AttachMngs (SYSID, ENTITYID, ACTID, LINENO, USERNAME,ATTACHNAME) values (#{loadBillsSysId}, #{loadBillsEntityId}, #{actId}, #{lineNo}, #{userName}, #{attachName}) update OrderBillsPlans set LoadQty = #{loadQty}, LoadDate = #{loadDate}, UnLoadQty = #{unLoadQty}, UnLoadDate = #{unLoadDate}, ifDetour = #{ifDetour}, detourEmptyMile = #{detourEmptyMile}, detourLoadMile = #{detourLoadMile}, detourDesc = #{detourDesc}, driverassdesc = #{driverassdesc} where sysId = '1' and OrderNo = #{orderNo} update OrderBillsPlans set loadetc = #{loadetc}, loadtoll = #{loadtoll}, oilhomeQty = #{oilhomeQty}, oilhomeAmt = #{oilhomeAmt}, oilappoint1Qty = #{oilappoint1Qty}, oilappoint1Amt = #{oilappoint1Amt}, oilappoint2Qty = #{oilappoint2Qty}, oilappoint2Amt = #{oilappoint2Amt}, oilappoint3Qty = #{oilappoint3Qty}, oilappoint3Amt = #{oilappoint3Amt}, oilcash1Qty = #{oilcash1Qty}, oilcash1Amt = #{oilcash1Amt}, oilcardQty = #{oilcardQty}, oilcardAmt = #{oilcardAmt}, oilcard1Qty = #{oilcardQty}, oilcard1Amt = #{oilcardAmt}, driverassdesc = #{driverassdesc} where orderNo = #{orderNo} update LoadFeeItems set Price = #{amt}, Amt = #{amt}, AMT1 = #{amt}, AMT2 = #{amt}, AMTORG = #{amt}, remarks = #{remarks} where sysId = '1' AND entityid = #{entityId} and lineno = #{lineNo} update LoadBills set gasstation1 = #{gasstation1}, gasstation2 = #{gasstation2}, gasstation3 = #{gasstation3} where SrcEntityID = #{entityId} and SrcLineNo = #{lineNo} update OrderBillsPlans set IfStarted = 'S', startDate = CURRENT_TIMESTAMP where sysId = '1' and OrderNo = #{orderNo} update OrderBillsPlans set IfStarted = 'A', order4Date = CURRENT_TIMESTAMP where sysId = '1' and OrderNo = #{orderNo} update OrderBillsPlans set IfStarted = 'B', order4Date = CURRENT_TIMESTAMP where sysId = '1' and OrderNo = #{orderNo} UPDATE wf_TaskList SET status= 2 WHERE SYSID = '1' AND ACTID =#{actId} AND ENTITYID = #{entityId} UPDATE wf_TaskList SET status= 0 WHERE SYSID = '1' AND ACTID =#{actId} AND ENTITYID = #{entityId} update OrderBillsPlans set IfOrder2ed = 'S' where sysId = '1' and OrderNo = #{orderNo} update loadbills set audit2Desc = #{audit2Desc} where SrcEntityID = #{entityId} and SrcLineNo = #{lineNo} delete from LoadFeeItems where sysid = 1 and entityid = #{entityId} delete from AttachMngs where attachId = #{attachId}