Tripartite quantum state mapping and discontinuous entanglement transfer in a cavity QED open system