LM324 output voltage gets low in difference amplifier configuration when UPS supply is turned on
The tolerance of resistor is 10%


If that is the case then THAT is a fundamental problem in your design. On the left (below) is a model of your op-amp circuit using perfectly exact values. On the right I've increased some resistors by 10% and decreased others by 10% to make a worst case tolerance scenario.



The good circuit produces 3.3 volts at the output and the bad circuit produces 1.1 volts at the output.

Just in case you are wondering about "my op-amp", I've used a VCVS with a gain of 100k to mimic an op-amp.