California lawmakers reach deal on state spending plan