No, Undysworld is correct: if the compressor negative terminal is also the compressor chassis, and if the chassis is connected to the truck chassis, then the lower battery (the one that has it's negative connected the the truck chassis) will be shorted; certain to fry the negative compressor wire and make the sparks fly!Incorrect, you'll get 24v at the motor and that is only if that compressor motor is case grounded. Many of the good ones are not. The only sparks that could fly is the result of doubling the voltage that the motor is designed to operate at.
If everything we did to our trucks had to be UL safety approved we would never have anything but 24V equipment. There are ways of using 12V parts, but this quickly becomes frought with ways to "let the smoke out of things". Do so at your own risk.
Jim M.