About 28,000 former workers at 237 service stations in 28 states will receive up to $6.8 million in back pay in the nation's largest minimum wage and overtime settlement with a private company, the Labor Department announced yesterday.

The government had asked for $12.8 million for the workers, but department officials said that they agreed to accept $6.8 million to settle the case, which was started by the Labor Department 10 years ago against Hudson Oil and Affiliated Companies.

"The real winners in this case are the workers, who will finally receive money due to them under the law," Labor Secretary William E. Brock said in a statement. "This is certainly a landmark case for the Department of Labor."

The money is to be distributed to service station workers and managers who were not paid overtime or were paid for fewer hours than they actually worked. The settlement covers all shifts worked from July 1, 1974, through Dec. 31, 1981.

The Labor Department said yesterday its enforcement action in this case was complicated by the large number of potential witnesses and the poor record-keeping by the company. In an attempt to locate employes, 15,000 letters were mailed and Labor Department attorneys took depositions from 600 former Hudson workers across the country.

A federal bankruptcy judge must approve the proposed settlement, since Hudson filed for bankruptcy protection in 1984 during the Labor Department investigation.

In October 1983, U.S. District Court Judge Earl E. O'Connor ruled in favor of the Labor Department and found that that Hudson and its principal owner, Mary Hudson Vandegrift, violated the Fair Labor Standards Act.

In addition to the failure to pay employes for the hours they had worked, O'Connor found that station managers were denied overtime pay and that cash and merchandise shortages had been made up by withholding part of the wages of all service station attendants. He ordered that Hudson award back pay to all affected employes.

Vandegrift, 74, of Mission Hills, Kan., pleaded no contest in August 1983 to felony theft charges for personally ordering the rigging of gasoline pumps to shortchange customers. Evidence filed in the case indicated the company had tampered with its pumps in 16 states, including Maryland and Virginia.

Vandegrift, who was listed by Forbes Magazine in 1982 as one of the nation's 400 wealthiest individuals, was fined $500 and sentenced to 200 hours of public service work.

After O'Connor's ruling, the Labor Department needed almost a year to obtain the work records. In January 1984, while the department was in the middle of back-pay calculations, Hudson filed for reorganization under Chapter 11 of federal bankruptcy law. Since then, bankruptcy Judge Benjamin Franklin has removed "all major corporate officers" and appointed a trustee, the Labor Department said.

To ensure that the employes receive their back pay from Hudson, the Labor Department said the government will hold mortgages on various corporate real estate assets until the obligation is fulfilled.

The government has two years to try to track down employes who are to receive the back wages, the department said, adding that it does not have current addresses for most of the workers.