insert into po_order_roll_no (site,bu_no,inspection_no,order_no,item_no,roll_no,roll_qty,part_no,part_desc,supplier_id,supplier_name,order_qty, created_by,created_date,delflag,version,print_flag, hardtag_in_flag,batch_no,production_date,expiration_warning_date,expiration_date ) values (#{site},#{buNo},#{inspectionNo},#{orderNo},#{itemNo},#{rollNo},#{rollQty},#{partNo},#{partDesc},#{supplierId},#{supplierName},#{orderQty}, #{createdBy},GetDate(),#{delflag},#{version},#{printFlag}, #{hardtagInFlag},#{batchNo},#{productionDate},#{expirationWarningDate},#{expirationDate}) delete from po_order_roll_no where site=#{site} and bu_no=#{buNo} and roll_no=#{rollNo} and inspection_no=#{inspectionNo} update po_order_roll_no set print_flag=isnull(print_flag,0)+1 WHERE site = #{site} and bu_no=#{buNo} AND roll_no IN #{item.rollNo}