Thermodynamics of partonic matter in relativistic heavy-ion collisions from a multiphase transport model