From bc4afc83b2c5a18010f14f2da7721eed72aa1d6d Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Fri, 8 Mar 2024 14:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AC=E8=B4=A6=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/admin/system/financial/Financial.php | 4 +++- crmeb/services/ExcelService.php | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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;