As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
DFW CREW REPORTED RT MLG INDICATED DOWN WITH HANDLE UP. GEAR DOOR OPEN LIGHT ON WITH HYD PUMPS ON LOW BUT LIGHT OFF WITH HYD PUMPS ON HIGH. EMERGENCY DECLARED FLIGHT RETURNED DFW LANDED WITHOUT INCIDENT. ACFT REMOVED FROM SERVICE. REPLACED RT MLG UPLOCK SENSOR. SYS GND CHECKED NORMAL, OPERATION CLOSED.