shopAdmin; if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) { util::fail('超管才能查看'); } //惠雅鲜花员工不能看收入情况 $shopAdmin = $this->shopAdmin; $adminId = $shopAdmin->adminId ?? 0; if (in_array($adminId, [3405, 2812, 4004,2812])) { util::fail('暂无权限'); } $get = Yii::$app->request->get(); $contain = $get['contain'] ?? 0; $incomeList = StatKdClass::eachChannelIncome($this->mainId, $this->shop, $contain); $totalIncome = 0; if (!empty($incomeList)) { foreach ($incomeList as $item) { $amount = $item['amount'] ?? 0; $totalIncome = bcadd($totalIncome, $amount, 2); $totalIncome = floatval($totalIncome); } } util::success(['list' => $incomeList, 'totalIncome' => $totalIncome]); } }