Self-consistent determination of the fictitious temperature in thermally-assisted-occupation density functional theory