column('name', 'value'); return !empty($data['invoice_type']) ? $dict[$data['invoice_type']] : ''; } /** * 统计合同金额 */ public function ContractFinancialMoney($where, $time, string $selectType, string $group = "", $sum = '') { switch ($selectType) { case "sum": $totalMoney = $this->where($where)->when(isset($time), function ($query) use ($time) { $query->whereBetweenTime('create_time', strtotime($time['start_time']), strtotime($time['end_time'])); })->sum($sum); break; case "group": $totalMoney = $this->getCurveData($where, $time, "sum($sum)", $group); break; default: throw new \Exception('ContractFinancialMoney:selectType参数错误'); } if ($group) { $totalMoney = $this->trendYdata((array)$totalMoney, $time); } return $totalMoney; } }