diff --git a/app/controller/admin/system/financial/Financial.php b/app/controller/admin/system/financial/Financial.php index 6ad046cd..5bf2500a 100755 --- a/app/controller/admin/system/financial/Financial.php +++ b/app/controller/admin/system/financial/Financial.php @@ -149,7 +149,9 @@ class Financial extends BaseController { $where = $this->request->params(['date', 'status', 'financial_type', 'financial_status', 'keyword', 'is_trader', 'mer_id']); [$page, $limit] = $this->getPage(); - $data = app()->make(ExcelService::class)->financialLog($where,$page,$limit); + /** @var ExcelService $make */ + $make = app()->make(ExcelService::class); + $data = $make->financialLog($where,$page,$limit); return app('json')->success($data); } diff --git a/crmeb/services/ExcelService.php b/crmeb/services/ExcelService.php index ce520590..2fac4fd4 100755 --- a/crmeb/services/ExcelService.php +++ b/crmeb/services/ExcelService.php @@ -678,6 +678,10 @@ class ExcelService $list = $query->page($page, $limit)->select(); foreach ($list as $item) { if ($item->financial_type == 1) { + if (empty($item->financial_account->bank)) { + $acount = ''; + continue; + } $acount = '姓名:' . $item->financial_account->name . PHP_EOL; $acount .= '银行名称:' . $item->financial_account->bank . PHP_EOL; $acount .= '银行卡号:' . $item->financial_account->bank_code;