Precedence means "the order of things", as in "Patients with life threatening injuries take precedence over people with minor flu symptoms in the ER".
Precedent means "an established historical norm or tradition", as in "The ruling in the court case established a precedent for future rulings regarding bankruptcy"