Hello! Since your ducks are hurt I'd recommend completely bathing them and washing out any maggots or larvae, disinfecting their wounds with something like blue kote (you can get it at any farm store), and covering any big wounds as necessary. Next step is to clean their house before letting them back in. Remove bedding, scrub any mess from the floor and walls, and disinfect the inside to ward off any flies that might be attracted to smells. Clean their dishes (food and water) and their pools. Get fresh, clean bedding, make sure it isn't damp inside, and keep an eye on them.
Make sure those wounds aren't infected, since infection can attract the flies who lay the larvae which hatches into maggots.