erectile dysfunction affects most of the men at some point or the other in their lives. it has multifactoral etiology which can be categorized into :
1. Organic i.e. due to general medical condition
2. psychogenic i.e. due to psychological factors
3.Endocrinologic i.e. due to
hormonal problems
in your case if you don,t have any other illness like
Diabetes ,
hypertension or obesity then this is most likely due to your hernia as you have mentioned.
however hernia itself can cause Erectile Dysfunction (
impotence) either due to pain if it is inguinal or again it can be psychological if due to hernia you are unable to enjoy intercourse which gradually reduces desire and intern can lead to impotence, however this all depends upon the site and size of your hernia which you have not mentioned in this question.
coming to second part of your question which rather is your main concern in this question i.e. less volume of your semen, you are again quite right that hernia has no direct effect on volume of semen but again decrease in desire to have sex which you might have been experiencing due to impotence can reduce the volume of semen.
i hope i have answered your question.