ifs.shipment_id,ifs.site,ifs.customer_no,ifs.customer_name,ifs.ship_date,sh.create_date insert into shipment_handle(shipment_id, site, create_by, create_date) values (#{shipmentId}, #{site}, #{createBy}, #{createDate}) insert into TransDetail(transno, site, itemno, partno, locationid, transqty, direction, batchno, standcost, actualcost, price, freight, duty, orderref1, orderref2, orderref3, orderref4, orderref5, remark, vitualpartflag, manufacturedate, expireddate, transqty2, costgroupid, orderreftype_db, orderreftype, wdr_no, enterdate, enterby) values (#{item.transNo}, #{item.site}, #{item.itemNo}, #{item.partNo}, #{item.locationID}, #{item.transQty}, #{item.direction}, #{item.batchNo}, #{item.standCost}, #{item.actualCost}, #{item.price}, #{item.freight}, #{item.duty}, #{item.orderRef1}, #{item.orderRef2}, #{item.orderRef3}, #{item.orderRef4}, #{item.orderRef5}, #{item.remark}, #{item.vitualPartFlag}, #{item.manufactureDate}, #{item.expiredDate}, #{item.transQty2}, #{item.costGroupID}, #{item.orderRefTypeDb}, #{item.orderRefType}, #{item.wdrNo}, #{item.enterDate}, #{item.enterBy}) insert into TransDetailsub(transno, site, seqno, itemno, locationid, batchno, boxno, rollno, rollqty, orderref1, orderref2, orderref3, orderref4, orderref5, remark) values (#{item.transNo}, #{item.site}, #{item.seqNo}, #{item.itemNo}, #{item.locationID}, #{item.batchNo}, #{item.boxNo}, #{item.rollNo}, #{item.rollQty}, #{item.orderRef1}, #{item.orderRef2}, #{item.orderRef3}, #{item.orderRef4}, #{item.orderRef5}, #{item.remark}) delete from shipment_handle where shipment_id = #{shipmentId} and site = #{site} update TransHeader set Status = #{status},LinkOrderFlag = #{linkOrderFlag},Remark = #{remark} where Site = #{site} and TransNo = #{transNo} exec dbo.UpdateTransNo #{site},#{spr} insert into TransHeader(transno, site, warehouseid, transdate, transtype_db, transtype, username, receiver, transyear, transmonth, partnerid, partnername, partnertype, authorizeflag, authorizedate, authorizor, transferflag, transferdate, transferguys, voucherdate, projectid, projectname, enterdate, remark, uselocation, orderref1, linkorderflag, deladdid, status) values (#{transNo}, #{site}, #{warehouseID}, #{transDate}, #{transTypeDb}, #{transType}, #{userName}, #{receiver}, #{transYear,jdbcType=FLOAT}, #{transMonth,jdbcType=FLOAT}, #{partnerID}, #{partnerName}, #{partnerType}, #{authorizeFlag}, #{authorizeDate}, #{authorizor}, #{transferFlag}, #{transferDate}, #{transferGuys}, #{voucherDate}, #{projectID}, #{projectName}, #{enterDate}, #{remark}, #{useLocation}, #{orderRef1}, #{linkOrderFlag}, #{delAddID}, #{status})