Hull integrity is restored when you end your patrol (return to your "home" base). Refitting in a friendly base will not repair your hull. If you are doing a single patrol I don't think you can repair your hull, (but then I haven't played single patrols for quite some time, so

)
.