On the partial $\Pi$-property of second minimal or second maximal subgroups of Sylow subgroups of finite groups