dataLists(new EngineerBillLists()); } public function download() { $firstDay = date('Y-m-01 00:00:00', strtotime('first day of last month')); $lastDay = date('Y-m-t 23:59:59', strtotime('last day of last month')); $filename = date('Y-m-d',strtotime($firstDay))."-至-".date('Y-m-d',strtotime($lastDay))."最后结算余额"; $result = ExportLogic::add([ 'download_type' => 1, 'download_fun' => 'EngineerBillDownload', 'params' => ['firstDay'=>$firstDay,'lastDay'=>$lastDay], 'name' => $filename, 'admin_id' => $this->adminId, ]); if (false === $result) { return $this->fail(ExportLogic::getError()); } // 暂时 - 立即生成导出文件 (new ExcelExportService)->download($result); return $this->success('添加成功-'.$result, [], 1, 1); } }