  Inspired by recent experimental findings that will be presented elsewhere, we
formulate and investigate a model of a superconducting junction that combines
the electron propagation in a quantum channel with an arbitrary transmission,
and that through a localized state. Interesting situation occurs if the energy
of the localized state is close to Fermi level, that is, the state is in
resonant tunnelling regime. Since this energy is affected by the gate voltage,
we expect a drastic modification of transport properties of the junction in a
narrow interval of the gate voltages where the energy distance to Fermi level
is of the order of $\Gamma, \Delta$, $\Gamma$ being the energy broadening of
the localized state, $\Delta$ being the superconducting energy gap.
  We consider the model neglecting the interaction in the localized state, as
well as accounting for the interaction in a simplistic mean-field approach
where it manifests itself as a spin-splitting. This spin splitting is also
contributed by external magnetic field. We also take into account the
spin-orbit interaction that can be significant in realistic experimental
circumstances.
  In normal state, we find that the model may describe both peak and dip in the
transmission at resonant gate voltage. Spin splitting splits the positions of
these peculiarities. Fano interference of the transmission amplitudes results
in an asymmetric shape of the peaks/dips. In superconducting state, the spin
splitting results in a complex dependence of the superconducting current on the
superconducting phase. In several cases, this is manifested as a pair of $0 -
\pi$ transitions in the narrow interval of gate voltages.
  The article in the present form is not intended for a journal submission.
