|
@@ -14,6 +14,7 @@ use PhpOffice\PhpWord\TemplateProcessor;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
use App\Exceptions\ResponseException;
|
|
|
use Illuminate\Http\Request;
|
|
|
+use App\Services\Common\BaiduService;
|
|
|
|
|
|
class JjhcController extends WebBaseController
|
|
|
{
|
|
@@ -48,6 +49,10 @@ class JjhcController extends WebBaseController
|
|
|
if($keyword != "j0vOW5mBREZxdo3P"){
|
|
|
throw new ResponseException("who are you?", [], 404);
|
|
|
}
|
|
|
+ $baidu = new BaiduService();
|
|
|
+ $health_result = $baidu->health_code(file_get_contents(base_path() . "/public/test.jpg" ));
|
|
|
+ dd($health_result);
|
|
|
+
|
|
|
// for ($room = 1;$room <= 78; $room++){
|
|
|
// $list = DB::table("recruit_ticket")->leftJoin("recruit_appoint_info","recruit_ticket.appoint_id",'=','recruit_appoint_info.id')->where("recruit_ticket.ex_start",'2022-08-05 08:00:00')->where('recruit_ticket.ex_room',$room)->orderBy('ex_seat','ASC')->get()->toArray();
|
|
|
//
|
|
@@ -68,22 +73,22 @@ class JjhcController extends WebBaseController
|
|
|
// }
|
|
|
|
|
|
|
|
|
- for ($room = 1;$room <= 78; $room++){
|
|
|
- $word = new TemplateProcessor(base_path() . "/public/cunwu1.docx");
|
|
|
- $word->setValue('room', $room);
|
|
|
- if($room<10){
|
|
|
- $room = sprintf('%02s', $room);
|
|
|
- }
|
|
|
- $list = DB::table("recruit_ticket")->leftJoin("recruit_appoint_info","recruit_ticket.appoint_id",'=','recruit_appoint_info.id')->where("recruit_ticket.ex_start",'2022-08-05 08:00:00')->where('recruit_ticket.ex_room',$room)->orderBy('ex_seat','ASC')->get()->toArray();
|
|
|
- $rows = count($list);//总行数
|
|
|
- $word->cloneRow('id', $rows);//复制行
|
|
|
- for ($i = 0; $i < $rows; $i++) {
|
|
|
- $word->setValue("id#" . ($i + 1), $i + 1);//替换变量
|
|
|
- $word->setValue("realname#" . ($i + 1), $list[$i]->realname);
|
|
|
- $word->setValue("ex_number#" . ($i + 1), $list[$i]->ex_number);
|
|
|
- }
|
|
|
- $word->saveAs(base_path() ."/public/excel/cunwu_{$room}.docx");//另存为
|
|
|
- }
|
|
|
+// for ($room = 1;$room <= 78; $room++){
|
|
|
+// $word = new TemplateProcessor(base_path() . "/public/cunwu1.docx");
|
|
|
+// $word->setValue('room', $room);
|
|
|
+// if($room<10){
|
|
|
+// $room = sprintf('%02s', $room);
|
|
|
+// }
|
|
|
+// $list = DB::table("recruit_ticket")->leftJoin("recruit_appoint_info","recruit_ticket.appoint_id",'=','recruit_appoint_info.id')->where("recruit_ticket.ex_start",'2022-08-05 08:00:00')->where('recruit_ticket.ex_room',$room)->orderBy('ex_seat','ASC')->get()->toArray();
|
|
|
+// $rows = count($list);//总行数
|
|
|
+// $word->cloneRow('id', $rows);//复制行
|
|
|
+// for ($i = 0; $i < $rows; $i++) {
|
|
|
+// $word->setValue("id#" . ($i + 1), $i + 1);//替换变量
|
|
|
+// $word->setValue("realname#" . ($i + 1), $list[$i]->realname);
|
|
|
+// $word->setValue("ex_number#" . ($i + 1), $list[$i]->ex_number);
|
|
|
+// }
|
|
|
+// $word->saveAs(base_path() ."/public/excel/cunwu_{$room}.docx");//另存为
|
|
|
+// }
|
|
|
|
|
|
// $spreadsheet = new Spreadsheet();
|
|
|
// $sheet = $spreadsheet->getActiveSheet();
|