Alex Bustamante, the inspector general, calculated that the city has paid $31 million over the last five years to resolve employment-related cases in which members of the LAPD contended they were victims of discrimination, harassment, retaliation or other misconduct.