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, 'params' => ['firstDay'=>$firstDay,'lastDay'=>$lastDay], 'name' => $filename, 'admin_id' => $this->adminId, ]); if (false === $result) { return $this->fail(ExportLogic::getError()); }*/ $params = $this->request->get(); $deadline_time = strtotime($params['deadline_time'])+86400; $settlement_type = $params['settlement_type']; $filename = "每".$settlement_type."截止到".$params['deadline_time']."批号".$params['deadline_time']."-最后结算余额"; $result = ExportLogic::add([ 'download_type' => 1, 'params' => ['settlement_type'=>$settlement_type,'deadline_time'=>$deadline_time], 'name' => $filename, 'admin_id' => $this->adminId, ]); if (false === $result) { return $this->fail(ExportLogic::getError()); } Log::info('导出参数:'.json_encode([$params,$result])); // 暂时 - 立即生成导出文件 (new ExcelExportService)->download($result); return $this->success('添加成功-'.$result, [], 1, 1); } }