UPDATE project SET ORIGIN = 'work_event', ORIGIN_ID = #{gridId} WHERE CREATED_BY = #{staffId} AND CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND ORIGIN = 'agency'