|
@@ -566,19 +566,14 @@ class TicketJob implements ShouldQueue
|
|
|
$date = date("Y-m-d",time());
|
|
|
}
|
|
|
|
|
|
- if(!is_dir(base_path() . "/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}")){
|
|
|
+ if(!is_dir("/data/www/wwwroot/jucai/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}")){
|
|
|
Storage::makeDirectory("public/recruit/ticket/word/{$date}/{$name}/{$type}");
|
|
|
}
|
|
|
-// if(!is_dir(base_path() . "/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/{$type}" )){
|
|
|
-// Storage::makeDirectory("public/recruit/ticket/pdf/{$date}/{$name}/{$type}");
|
|
|
-// }
|
|
|
|
|
|
$filename = sha1($date . '_' . $data['realname'] . '_' . $data['card'] . '_' . $data['post']);
|
|
|
- $word_url = base_path() . "/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}/" . $filename . '.docx';
|
|
|
+ $word_url = "/data/www/wwwroot/jucai/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}/" . $filename . '.docx';
|
|
|
$templateProcessor->saveAs($word_url);//另存为
|
|
|
-// $pdf_url = base_path() . "/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/{$type}";
|
|
|
-// shell_exec('export DISPLAY=:0.0');
|
|
|
-// shell_exec('libreoffice --headless --convert-to pdf:writer_pdf_Export ' . $word_url . ' --outdir ' . $pdf_url);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
protected function word_exist($recruit,$type,$data)
|
|
@@ -591,7 +586,7 @@ class TicketJob implements ShouldQueue
|
|
|
$date = date("Y-m-d",time());
|
|
|
}
|
|
|
$filename = $date . '_' . $data['realname'] . '_' . $data['card'] . '_' . $data['post'];
|
|
|
- if(file_exists(base_path() . "/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}/" . $filename . '.docx')){
|
|
|
+ if(file_exists("/data/www/wwwroot/jucai/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}/" . $filename . '.docx')){
|
|
|
echo $filename . "跳过\r\n";
|
|
|
return true;
|
|
|
}else{
|
|
@@ -608,11 +603,11 @@ class TicketJob implements ShouldQueue
|
|
|
$name = uniqid();
|
|
|
$date = date("Y-m-d",time());
|
|
|
}
|
|
|
- if(!is_dir(base_path() . "/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/{$type}" )){
|
|
|
+ if(!is_dir("/data/www/wwwroot/jucai/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/{$type}" )){
|
|
|
Storage::makeDirectory("public/recruit/ticket/pdf/{$date}/{$name}/{$type}");
|
|
|
}
|
|
|
- $word_url = base_path() . "/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}/*.docx";
|
|
|
- $pdf_url = base_path() . "/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/{$type}";
|
|
|
+ $word_url = "/data/www/wwwroot/jucai/storage/app/public/recruit/ticket/word/{$date}/{$name}/{$type}/*.docx";
|
|
|
+ $pdf_url = "/data/www/wwwroot/jucai/storage/app/public/recruit/ticket/pdf/{$date}/{$name}/{$type}";
|
|
|
shell_exec('export DISPLAY=:0.0 && export HOME=/data/wwwroot &&libreoffice --headless --convert-to pdf:writer_pdf_Export ' . $word_url . ' --outdir ' . $pdf_url);
|
|
|
}
|
|
|
}
|