A Queens charity that purportedly helps veterans readjust to civilian life raked in $150,000 from Donald Trump last year, but houses two dozen ex-military men in squalid — and possibly ­illegal — conditions.

The three homes run by Veterans-In-Command wouldn’t pass muster as military barracks, with residents complaining to The Post of poorly ventilated personal rooms, malfunctioning plumbing, broken doors and windows, and a steady march of rodents.

“I pay $800 a month and I just get a room for that,” griped one Vietnam veteran who lives at one of the single-family homes that currently houses seven other veterans on 97th Avenue in Jamaica.

Another veteran who said he gets by on disability lives in a stuffy room carved out of the first-floor parlor of one house. Laundry and canned food were piled on the floor, and he said he was dealing with a mouse infestation.

Peter Murphy, an 83-year-old Korean War vet, also has gripes with one of VIC’s houses in Jamaica.

“The shower needs a head, and we set traps for the mice but they keep coming back,” Murphy said. “Sometimes the plumbing doesn’t work.”

The buildings do not have required permits, according to the city’s Department of Buildings. In order to convert a single-family home into a collection of single-room occupancies, owners need approval from the city Department of Housing Preservation and Development.

When The Post contacted DOB last week, the agency sent an inspector to one of VIC’s Jamaica properties. At the home, the inspector was turned away. A DOB spokesman said inspectors plan to return.

Trump’s $150,000 gift mostly went to paying off debt, according to Larry Robertson, the head of VIC.

“We had to pay back a lot of the money we owed,” said Robertson, 69, a retired Port Authority maintenance worker who started the group in late 2012.

But Robertson would not provide The Post an accounting of the debts. The nonprofit did not file annual tax returns through 2015, records show, because it claimed to take in less than the $50,000 annual federal threshold for filing. It has not yet filed any tax paperwork for 2016.

Veterans contacted by The Post said they paid between $500 and $800 per month to VIC from their disability and government aid checks.

With 29 veterans in the program last year, the nonprofit presumably takes in between $14,000 and $23,000 per month in rent checks. VIC in turn pays $10,600 per month to the owners of the three houses and an office it rents, according to Robertson.

That would leave between $4,000 and $13,000 per month for other expenses. Robertson claims excess money went toward utilities and other costs. He says he also gets a stipend of $467 the charity pays to him every two weeks.

“When I finish paying office expenses, there’s not a lot left over,” he said.

New residents shell out three months’ rent in advance to the nonprofit, which also requires a two-month security deposit and charges a broker’s fee equivalent to a month’s rent, a resident told The Post.