The $237,499 is the published bid and it represents your outstanding loan balance, any arrearages and some foreclosure related fees, but it does not include the second. The violations will not interfere with the trustee sale, but once the bank takes the property back or it's picked up by a third party at the trustee sale, the violations will have to be addressed. If I were you, I would be more concerned about the second lien holder pursuing a deficiency judgment than the violations holding up the sale. If the junior loan is not a purchase money loan (i.e., taken out when you purchased the property), then they can go after you for the unpaid loan balance after the foreclosure. Many people think that their troubles end with the foreclosure, but when there is a second loan involved, that's not necessarily the case. The foreclosure by the senior lien holder only wipes out the junior lien holder's security interest in the property. Most non-purchase money second loans are recourse loans and you are personally responsible to pay them back.
I would recommend you consult with an attorney and tax professional just so you know what to expect. You may not be able to avoid the foreclosure, but at least you would know what you will face after the foreclosure.
Let me know if you need a resource for very affordable legal consultation.