Integrated modelling of wastewater treatment and river water quality processes