123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace app\controller\store\export;
- use app\controller\store\AuthController;
- use app\services\other\export\ExportServices;
- use app\services\store\finance\StoreFinanceFlowServices;
- use think\facade\App;
- class ExportExcel extends AuthController
- {
-
- protected $service;
-
- public function __construct(App $app, ExportServices $services)
- {
- parent::__construct($app);
- $this->service = $services;
- }
-
- public function financeRecord(StoreFinanceFlowServices $services)
- {
- [$ids] = $this->request->getMore([
- ['ids', '']
- ], true);
- $where['id'] = $ids ? explode(',', $ids) : [];
- $where['is_del'] = 0;
- $where['store_id'] = $this->storeId;
- $where['no_type'] = 1;
- $data = $services->getList($where);
- return $this->success($this->service->financeRecord($data['list'] ?? []));
- }
- }
|