A theoretical self-consistent method for the dislocation-based heterojunction