EXEC UpdateTransNo #{site}, #{transType} insert into ecss_CoDelNotifyHeader(site,bu_no,delNo,ready_date,customer_name,Destination,shipping_mode,erp_flag,notify_status, remark,createDate,createBy,cmc_invoice,overseasShipper,overseasAddress,cnative,localShipAddress,salesArea) values(#{site},#{buNo},#{delNo},#{readyDate},#{customerName,jdbcType=NVARCHAR},#{destination,jdbcType=NVARCHAR},#{shippingMode},'N',#{notifyStatus},#{remark,jdbcType=NVARCHAR},GetDate(), #{createBy},#{cmcInvoice},#{overseasShipper,jdbcType=NVARCHAR},#{overseasAddress,jdbcType=NVARCHAR},#{cnative,jdbcType=NVARCHAR},#{localShipAddress,jdbcType=NVARCHAR}, #{salesArea,jdbcType=NVARCHAR}) insert into ecss_CoDelNotifyDetail (site,bu_no,delNo,item_no,salesOrder,salesOrder_item_no,customerPO,line,version, status,family,part_no,part_description,qty,lt,cmc_comment,saleType, awb_bl,shipping_number,forwarder_info,currency,tp,ttl_amount,sum_price, so,upc,remark,pn,surplus_qty,vat,roll,carton,saleslt,manufacturer_name,modifyFlag,modifyQtyFlag,category,qty_roll,qty_box) values (#{item.site},#{item.buNo},#{item.delNo},#{item.itemNo,jdbcType=INTEGER},#{item.salesOrder,jdbcType=NVARCHAR},#{item.salesOrderItemNo},#{item.customerPO,jdbcType=NVARCHAR},#{item.line,jdbcType=NVARCHAR},#{item.version,jdbcType=NVARCHAR}, #{item.status,jdbcType=NVARCHAR},#{item.family,jdbcType=NVARCHAR},#{item.partNo},#{item.partDescription,jdbcType=NVARCHAR},#{item.qty,jdbcType=DECIMAL},#{item.lt,jdbcType=DECIMAL},#{item.cmcComment,jdbcType=NVARCHAR},#{item.saleType,jdbcType=NVARCHAR}, #{item.awbBl,jdbcType=NVARCHAR},#{item.shippingNumber,jdbcType=NVARCHAR},#{item.forwarderInfo,jdbcType=NVARCHAR},#{item.currency,jdbcType=NVARCHAR},#{item.tp,jdbcType=DECIMAL},#{item.ttlAmount,jdbcType=DECIMAL},#{item.sumPrice,jdbcType=DECIMAL}, #{item.so,jdbcType=NVARCHAR},#{item.upc,jdbcType=NVARCHAR},#{item.remark,jdbcType=NVARCHAR},#{item.pn,jdbcType=NVARCHAR},#{item.qty},#{item.vat},#{item.roll},#{item.carton},#{item.saleslt,jdbcType=NVARCHAR},#{item.manufacturerName,jdbcType=NVARCHAR}, #{item.modifyFlag},#{item.modifyQtyFlag},#{item.category,jdbcType=NVARCHAR},#{item.qtyRoll,jdbcType=NVARCHAR},#{item.qtyBox,jdbcType=NVARCHAR}) update ecss_CoDelNotifyHeader set ready_date=#{readyDate,jdbcType=TIMESTAMP} ,customer_name=#{customerName,jdbcType=NVARCHAR}, Destination=#{destination,jdbcType=NVARCHAR},shipping_mode=#{shippingMode},modifyFlag=#{modifyFlag},export_flag='N', remark=#{remark,jdbcType=NVARCHAR} ,cmc_invoice=#{cmcInvoice},overseasShipper=#{overseasShipper,jdbcType=NVARCHAR} ,overseasAddress=#{overseasAddress,jdbcType=NVARCHAR} where site=#{site} and delNo=#{delNo} delete from ecss_CoDelNotifyHeader where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyHeader set declaration_no=#{declarationNo} ,notify_status=#{status} where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyHeader set modifyFlag=#{modifyFlag}, modify_count = CASE WHEN #{modifyFlag} = 1 THEN ISNULL(modify_count, 0) + 1 ELSE 0 END where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyDetail set modifyFlag=#{modifyFlag},modifyQtyFlag=#{modifyFlag},surplus_qty=0 where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyDetail set surplus_qty=0 where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyHeader set notify_status=#{notifyStatus},walMartOrderFlag=#{walMartOrderFlag}, fscFlag=#{fscFlag},boxSizeFlag=#{boxSizeFlag} where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyDetail set status=#{notifyStatus} where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyDetail set status='正常' where site=#{site} and delNo=#{delNo} insert into ecss_CoDelNotifyDetail(site,bu_no,delNo,item_no,salesOrder,salesOrder_item_no,customerPO,line,version, status,family,part_no,part_description,qty,lt,cmc_comment,saleType, awb_bl,shipping_number,forwarder_info,currency,tp,ttl_amount,sum_price, so,upc,remark,pn,modifyFlag,modifyQtyFlag,surplus_qty,vat,roll,carton) values(#{site},#{buNo},#{delNo},#{itemNo,jdbcType=INTEGER},#{salesOrder},#{salesOrderItemNo},#{customerPO},#{line},#{version}, #{status},#{family},#{partNo},#{partDescription},#{qty,jdbcType=DECIMAL},#{lt,jdbcType=DECIMAL},#{cmcComment},#{saleType}, #{awbBl},#{shippingNumber},#{forwarderInfo},#{currency},#{tp,jdbcType=DECIMAL},#{ttlAmount,jdbcType=DECIMAL},#{sumPrice,jdbcType=DECIMAL}, #{so},#{upc},#{remark},#{pn},#{modifyFlag},#{modifyQtyFlag},#{qty},#{vat},#{roll},#{carton}) update ecss_CoDelNotifyDetail set salesOrder=#{salesOrder},customerPO=#{customerPO},line=#{line},version=#{version}, status=#{status},family=#{family},part_no=#{partNo},part_description=#{partDescription},qty=#{qty,jdbcType=DECIMAL}, lt=#{lt,jdbcType=DECIMAL},cmc_comment=#{cmcComment},saleType=#{saleType},pn=#{pn}, awb_bl=#{awbBl},shipping_number=#{shippingNumber},forwarder_info=#{forwarderInfo},currency=#{currency}, tp=#{tp,jdbcType=DECIMAL},ttl_amount=#{ttlAmount,jdbcType=DECIMAL},sum_price=#{sumPrice,jdbcType=DECIMAL}, so=#{so},upc=#{upc},remark=#{remark},modifyFlag=#{modifyFlag},modifyQtyFlag=#{modifyQtyFlag},surplus_qty=#{qty,jdbcType=DECIMAL},vat=#{vat},roll=#{roll},carton=#{carton} where site=#{site} and delNo=#{delNo} and item_no=#{itemNo} delete from ecss_CoDelNotifyDetail where site=#{site} and delNo=#{delNo} and item_no=#{itemNo} delete from ecss_CoDelNotifyDetail where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyDetail set ttl_amount = sum_price where site=#{site} and delNo=#{delNo} and sum_price is not null update ecss_CoDelNotifyHeader set notify_status=#{notifyStatus} ,notifyDate=#{notifyDate,jdbcType=TIMESTAMP} where site=#{site} and delNo=#{delNo} update ecss_CoDelNotifyHeader set ready_date=#{readyDate,jdbcType=TIMESTAMP},notifyDate=#{notifyDate,jdbcType=TIMESTAMP}, modifyFlag=1,export_flag='N',updateBy=#{updateBy},updateDate=GetDate() where site=#{site} and delNo=#{delNo} insert into ecss_hsCode (Site,BuNo,HsCode,Remark,CreateBy,CreateDate,codeNo,hsCodeDesc,hsCodeDescEn,unit) values(#{site},#{buNo},#{hsCode},#{remark},#{createBy},GetDate(),#{codeNo},#{hsCodeDesc},#{hsCodeDescEn},#{unit}) update ecss_hsCode set Remark=#{remark} ,codeNo=#{codeNo},HsCode=#{hsCode},unit=#{unit} ,UpdateDate=GetDate(),UpdateBy=#{updateBy},hsCodeDescEn=#{hsCodeDescEn} where site=#{site} and buNo=#{buNo} and hsCodeDesc=#{hsCodeDesc} update part_sub_properties_value set text_value=#{textValue}, num_value=#{numValue,jdbcType=DOUBLE} where Site = #{site} and code_no = #{codeNo} and part_no = #{partNo} and sub_code_seq_no = #{subCodeSeqNo} and item_no = #{itemNo} and bu_no=#{buNo} insert into part_sub_properties_value ( part_no, site, bu_no, code_no, sub_code_seq_no, sub_code_desc, item_no, properties_item_no, text_value, num_value, record_type) select #{partNo}, #{site}, #{buNo}, #{codeNo}, 1, d.code_desc, #{itemNo,jdbcType=DOUBLE}, c.item_no, case when c.value_type_db = 'T' then c.default_value else null end, case when c.value_type_db = 'N' and c.default_value != '' then c.default_value else null end, #{recordType} from plm_properties_item c left join plm_properties_model_header d on c.site=d.site and d.code_no=#{codeNo} and d.function_type=c.item_Type where c.Item_No = #{propertiesItemNo} and c.site = #{site} and c.bu_no=#{buNo} and c.item_Type = #{recordType} delete from part_sub_properties_value where site = #{site} and record_type = #{recordType} and bu_no=#{buNo} and code_no = #{codeNo} AND part_no = #{partNo,jdbcType=VARCHAR} and properties_item_no = #{propertiesItemNo} insert into ecss_CoDelPalletHeader (site,bu_no,delNo,seq_no,pallet_no,pallet_qty,[length],width,height,volume,gross_weight,net_weight,pallet_remark,create_by, create_date,pallet) values(#{site},#{buNo},#{delNo},#{seqNo},#{palletNo},#{palletQty},#{length},#{width},#{height},#{volume},#{grossWeight,jdbcType=DECIMAL},#{netWeight,jdbcType=DECIMAL},#{palletRemark},#{createBy}, GETDATE(),#{pallet}) insert into ecss_CoDelBoxList(site,bu_no,delNo,seq_no,item_no,gross_weight,net_weight,box_qty,rolls,create_by,create_date) values (#{site},#{buNo},#{delNo},#{seqNo},#{itemNo},#{grossWeight,jdbcType=DECIMAL},#{netWeight,jdbcType=DECIMAL},#{boxQty},#{rolls,jdbcType=DECIMAL},#{createBy},GETDATE()) insert into ecss_CoDelPalletDetail(site,bu_no,delNo,seq_no,item_no,part_no,qty,po_no,box_qty,create_by,create_date,rolls,pn,notify_detail_item_no) values (#{site},#{buNo},#{delNo},#{seqNo},#{itemNo},#{partNo},#{qty,jdbcType=DECIMAL},#{poNo},#{boxQty},#{createBy},GETDATE(),#{rolls,jdbcType=DECIMAL},#{pn},#{notifyDetailItemNo}) update ecss_CoDelPalletHeader set pallet_qty=#{palletQty,jdbcType=INTEGER},[length]=#{length,jdbcType=DECIMAL},width=#{width,jdbcType=DECIMAL},height=#{height,jdbcType=DECIMAL}, volume=#{volume,jdbcType=DECIMAL},gross_weight=#{grossWeight,jdbcType=DECIMAL},net_weight=#{netWeight,jdbcType=DECIMAL},pallet_remark=#{palletRemark}, update_by=#{updateBy},update_date=GetDate(),pallet=#{pallet} where site =#{site} and bu_no=#{buNo} and delNo=#{delNo} and seq_no=#{seqNo} update ecss_CoDelPalletHeader set gross_weight=#{grossWeight,jdbcType=DECIMAL},net_weight=#{netWeight,jdbcType=DECIMAL}, update_by=#{updateBy},update_date=GetDate() where site =#{site} and bu_no=#{buNo} and delNo=#{delNo} and seq_no=#{seqNo} update ecss_CoDelPalletHeader set pallet_qty=#{palletQty,jdbcType=INTEGER},height=#{height,jdbcType=DECIMAL}, update_by=#{updateBy},update_date=GetDate() where site =#{site} and bu_no=#{buNo} and delNo=#{delNo} and seq_no=#{seqNo} update ecss_CoDelPalletDetail set part_no=#{partNo},qty=#{qty,jdbcType=DECIMAL},po_no=#{poNo}, box_qty=#{boxQty,jdbcType=DECIMAL},update_by=#{updateBy},update_date=GetDate(),rolls=#{rolls},pn=#{pn} where site =#{site} and bu_no=#{buNo} and delNo=#{delNo} and seq_no=#{seqNo} and item_no=#{itemNo} delete from ecss_CoDelPalletHeader where site =#{site} and bu_no=#{buNo} and delNo=#{delNo} and seq_no=#{seqNo} delete from ecss_CoDelBoxList where site =#{site} and bu_no=#{buNo} and delNo=#{delNo} and seq_no=#{seqNo} delete from ecss_CoDelPalletDetail where site =#{site} and bu_no=#{buNo} and delNo=#{delNo} and seq_no=#{seqNo} and item_no=#{itemNo} insert into ecss_declaration_header (site,declaration_no,customs_office_code,input_code,local_shipper,local_ship_address,ship_type,ship_date,submit_date, filing_no,overseas_shipper,shipping_mode,shipping_data,deliver_no,sales_partner,regulatory_method,duty_status, permit_number,cmc_invoice,sales_area,receive_area,shipping_port,exit_port,documents,remark,package_type,package_qty, gross_weight,net_weight,payment_type,ship_price,premium,other_price,special_relationship_comfirm,price_influence_confirm, royalty_payments_confirm,create_by,create_date,delNo,overseas_address,box_qty) values(#{site},#{declarationNo},#{customsOfficeCode},#{inputCode},#{localShipper,jdbcType=NVARCHAR},#{localShipAddress,jdbcType=NVARCHAR},#{shipType},#{shipDate},#{submitDate}, #{filingNo},#{overseasShipper,jdbcType=NVARCHAR},#{shippingMode,jdbcType=NVARCHAR},#{shippingData},#{deliverNo},#{salesPartner,jdbcType=NVARCHAR},#{regulatoryMethod,jdbcType=NVARCHAR},#{dutyStatus,jdbcType=NVARCHAR}, #{permitNumber},#{cmcInvoice},#{salesArea,jdbcType=NVARCHAR},#{receiveArea,jdbcType=NVARCHAR},#{shippingPort,jdbcType=NVARCHAR},#{exitPort,jdbcType=NVARCHAR},#{documents,jdbcType=NVARCHAR},#{remark,jdbcType=NVARCHAR},#{packageType,jdbcType=NVARCHAR},#{packageQty,jdbcType=INTEGER}, #{grossWeight,jdbcType=DECIMAL},#{netWeight,jdbcType=DECIMAL},#{paymentType,jdbcType=NVARCHAR},#{shipPrice,jdbcType=DECIMAL},#{premium,jdbcType=DECIMAL},#{otherPrice,jdbcType=DECIMAL},#{specialRelationshipComfirm,jdbcType=NVARCHAR},#{priceInfluenceConfirm,jdbcType=NVARCHAR}, #{royaltyPaymentsConfirm,jdbcType=NVARCHAR},#{createBy},GETDATE(),#{delNo},#{overseasAddress,jdbcType=NVARCHAR},#{boxQty}) insert into ecss_declaration_detail(site,declaration_no,item_no,hs_code,hs_code_desc,qty,net_weight,unit_price,total_price,currency,made_area,destination, source_area,levy) values(#{site},#{declarationNo},#{itemNo,jdbcType=INTEGER},#{hsCode},#{hsCodeDesc},#{qty,jdbcType=DECIMAL},#{netWeight,jdbcType=DECIMAL},#{unitPrice,jdbcType=DECIMAL},#{totalPrice,jdbcType=DECIMAL},#{currency},#{madeArea},#{destination}, #{sourceArea},#{levy}) delete from ecss_declaration_header where site=#{site} and declaration_no=#{declarationNo} delete from ecss_declaration_detail where site=#{site} and declaration_no=#{declarationNo} insert into ecss_pallet (Site,BuNo,pallet_type,Remark,CreateBy,CreateDate,length,width, height,application_area,pallet_weight,pallet_no) values(#{site},#{buNo},#{palletType},#{remark},#{createBy},GetDate(),#{length},#{width}, #{height},#{applicationArea},#{palletWeight},#{palletNo}) update ecss_pallet set Remark=#{remark} ,pallet_type=#{palletType} , length=#{length} ,width=#{width} , height=#{height} ,application_area=#{applicationArea} , pallet_weight=#{palletWeight} ,pallet_no=#{palletNo}, UpdateDate=GetDate(),UpdateBy=#{updateBy} where site=#{site} and buNo=#{buNo} and id=#{id} insert into ecss_package (Site,BuNo,package_type,Remark,CreateBy,CreateDate,length,width, height,volume,weight,package_no) values(#{site},#{buNo},#{packageType},#{remark},#{createBy},GetDate(),#{length},#{width}, #{height},#{volume},#{weight},#{packageNo}) update ecss_package set Remark=#{remark} ,package_type=#{packageType} , length=#{length} ,width=#{width} ,volume=#{volume},weight=#{weight}, package_no=#{packageNo},height=#{height} , UpdateDate=GetDate(),UpdateBy=#{updateBy} where site=#{site} and buNo=#{buNo} and id=#{id} update ecss_declaration_header set upc=#{upc},so=#{so},origin=#{origin},pallet_weight=#{palletWeight},material=#{material}, hs_code=#{hsCode},packaging=#{packaging},kgs=#{kgs},shipping_mark=#{shippingMark},boxChange=#{boxChange}, hsCodeDesc=#{hsCodeDesc},contractFlag=#{contractFlag},hsCodeDescType=#{hsCodeDescType},goodsLabel=#{goodsLabel} where site=#{site} and declaration_no=#{declarationNo} update ecss_CoDelNotifydetail set lossratio=#{lossratio},ehundred=#{ehundred} where site=#{site} and delNo=#{delNo} and part_no=#{partNo} update ecss_CoDelNotifydetail set surplus_qty=#{surplusQty} where site=#{site} and bu_no=#{buNo} and delNo=#{delNo} and part_no=#{partNo} and item_no=#{itemNo} insert into ecss_template (customName,site,buNo,name,type,upc,so,origin,palletWeight,material,hsCode,packaging,itemNo, kgs,shippingMark,boxChange,hsCodeDesc,contractFlag,hsCodeDescType,goodsLabel,hsCodeFlag,shippingMode,CreateBy,CreateDate, salesMethod,currency,madeArea,sendPort,shipper,voyage,deliveryGoodsDate,shippingDate,fscWeight, remark,highPalletFlag,showWeight) values(#{customName,jdbcType=NVARCHAR},#{site},#{buNo},#{name},#{type},#{upc},#{so},#{origin},#{palletWeight},#{material},#{hsCode},#{packaging}, #{itemNo},#{kgs},#{shippingMark},#{boxChange}, #{hsCodeDesc},#{contractFlag},#{hsCodeDescType},#{goodsLabel},#{hsCodeFlag},#{shippingMode},#{createBy},GetDate(), #{salesMethod},#{currency},#{madeArea},#{sendPort},#{shipper},#{voyage},#{deliveryGoodsDate},#{shippingDate},#{fscWeight},#{remark},#{highPalletFlag},#{showWeight}) update ecss_template set buNo=#{buNo},name=#{name},type=#{type},upc=#{upc},so=#{so},origin=#{origin},boxChange=#{boxChange}, palletWeight=#{palletWeight},material=#{material},hsCode=#{hsCode},itemNo=#{itemNo}, packaging=#{packaging},kgs=#{kgs},shippingMark=#{shippingMark},hsCodeDesc=#{hsCodeDesc}, contractFlag=#{contractFlag},hsCodeDescType=#{hsCodeDescType},goodsLabel=#{goodsLabel},hsCodeFlag=#{hsCodeFlag}, shippingMode=#{shippingMode},UpdateDate=GetDate(),UpdateBy=#{updateBy},customName=#{customName,jdbcType=NVARCHAR},salesMethod= #{salesMethod}, currency= #{currency},madeArea= #{madeArea},sendPort= #{sendPort},shipper= #{shipper},remark= #{remark}, voyage= #{voyage},deliveryGoodsDate= #{deliveryGoodsDate},shippingDate= #{shippingDate},fscWeight=#{fscWeight},highPalletFlag=#{highPalletFlag},showWeight=#{showWeight} where buNo=#{buNo} and name=#{nameNative} insert into ecss_walMartOrder (site,buNo,sku,so,qty,rolls,grossWeight,verificationSheet,CreateBy,CreateDate) values(#{site},#{buNo},#{sku},#{so},#{qty},#{rolls},#{grossWeight},#{verificationSheet},#{createBy},GetDate()) insert into ecss_walMartOrder (site,buNo,sku,so,qty,rolls,grossWeight,verificationSheet,CreateBy,CreateDate) values (#{item.site},#{item.buNo},#{item.sku},#{item.so},#{item.qty}, #{item.rolls},#{item.grossWeight},#{item.verificationSheet},#{item.createBy},GetDate()) update ecss_walMartOrder set buNo=#{buNo},sku=#{sku},so=#{so},qty=#{qty},rolls=#{rolls},grossWeight=#{grossWeight}, verificationSheet=#{verificationSheet},UpdateDate=GetDate(),UpdateBy=#{updateBy} where buNo=#{buNo} and sku=#{sku} and so=#{so} and qty=#{qty} update ecss_CoDelNotifyHeader set export_flag = #{exportFlag}, updateBy = #{updateBy}, updateDate = GetDate() where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} update ecss_CoDelBoxList set box_qty = #{box_qty}, gross_weight = #{grossWeight}, net_weight = #{netWeight}, rolls = #{rolls}, remark = #{remark} where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} and item_no = #{item_no} update ecss_CoDelNotifyHeader set totalVolume = #{totalVolume} where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} delete from ecss_CoDelBoxList where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} and item_no = #{item_no} update ecss_CoDelPalletDetail set qty = #{qty}, rolls = #{rolls} where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} and seq_no = #{seqNo} and item_no = #{itemNo} delete from ecss_CoDelPalletDetail where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} and seq_no = #{seqNo} and item_no = #{itemNo} -- 删除明细后,如果该box下没有明细了,则删除对应的box delete from ecss_CoDelBoxList where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} and item_no = #{seqNo} and not exists ( select 1 from ecss_CoDelPalletDetail where site = #{site} and bu_no = #{buNo} and delNo = #{delNo} and seq_no = #{seqNo} ); update ecss_Customer_template set ccusname = #{ccusname},template_name = #{templateName}, localShipAddress = #{localShipAddress}, overseasShipper = #{overseasShipper}, overseasAddress = #{overseasAddress}, cnative = #{cnative}, salesArea = #{salesArea} where template_no = #{templateNo} UPDATE part_sub_properties_value SET num_value = #{numValue} WHERE site = #{site} AND bu_no = #{buNo} AND part_no = #{partNo} AND code_no = #{codeNo} AND record_type = #{recordType} AND properties_item_no = #{propertiesItemNo} INSERT INTO part_sub_properties_value (part_no, site, bu_no, code_no, sub_code_seq_no, sub_code_desc, item_no, properties_item_no, text_value, num_value, record_type) VALUES (#{partNo}, #{site}, #{buNo}, #{codeNo}, #{subCodeSeqNo}, #{subCodeDesc}, #{itemNo}, #{propertiesItemNo}, #{textValue}, #{numValue}, #{recordType}) INSERT INTO ecss_package (Site, BuNo, package_no, package_type, length, width, height, volume, weight, Remark, CreateBy, CreateDate) VALUES (#{site}, #{buNo}, #{packageNo}, #{packageType}, #{length}, #{width}, #{height}, #{volume}, #{weight}, #{remark}, #{createBy}, GETDATE()) UPDATE ecss_package SET length = #{length}, width = #{width}, height = #{height}, volume = #{volume}, UpdateBy = #{updateBy}, UpdateDate = GETDATE() WHERE site = #{site} AND BuNo = #{buNo} AND package_type = #{packageType} UPDATE part SET packageNo = #{packageNo} WHERE site = #{site} AND part_no = #{partNo}