Hadronic production of the doubly charmed baryon via the proton–nucleus and the nucleus–nucleus collisions at the RHIC and LHC