public function doctorIncomeGroupbyDoctorOfDateSpan($request, $response) {/*{{{*/ if(false == in_array($this->curUser->name,FinancialInterceptor::$userAuditor)) { echo "权限不足"; exit; } ini_set("memory_limit","1024M"); ini_set("max_execution_time", "600"); $fromdate = $request->fromdate; $todate = $request->todate; $response->fromdate = $fromdate; $response->todate = $todate; $response->fileName = CsvFileGenerator::getDownLoadFileName(array(strtolower(__FUNCTION__)), $fromdate, $todate); $detailUrlDomain = 'hdfadmin.haodf.com/paymentfront/rpt/'; $lines = PaymentClient::getInstance()->getDoctorIncomeRptGroupbyDoctorOfDateSpan(ServiceDef::TYPE_TELORDER, $fromdate, $todate, $detailUrlDomain); $response->lines = $lines; }/*}}}*/
private function generateCsvFile($lineCount, $lines) { /*{{{*/ $fileName = "/tmp/doctor_" . strtotime("now") . ".csv"; $csvFileGenerator = new CsvFileGenerator($fileName, $lineCount); foreach ($lines as $line) { $csvFileGenerator->writeLine($line); } $csvFileGenerator->closeFp(); return $csvFileGenerator->getFileName(); }