$sjId, 'year' => $data['year'], 'month' => $data['month'], 'usageId' => $usageId], true); if (empty($income)) { $income = self::add($data, true); } else { $income->amount += $amount; } $income = business::savePayWayAmount($income, $amount, $data['payWay']); $income->save(); return true; } }