| 
					
				 | 
			
			
				@@ -2676,4 +2676,34 @@ class RecruitController extends Controller 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //libreoffice --headless --convert-to pdf:writer_pdf_Export /data/wwwroot/jucai/storage/app/public/recruit/word/2020-11-30/jjhc/pen/*.docx --outdir /data/wwwroot/jucai/storage/app/public/recruit/pdf/2020-11-30/jjhc/pen
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public function batchFetchWord(Request $request)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        set_time_limit(0);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ini_set('memory_limit',-1);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $recruit_id = $request->recruit_id;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $audit = $request->audit;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(!empty($recruit_id)){
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $where = [['recruit_id','=',$recruit_id]];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!empty($audit)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if ($audit == 3) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $where[] = ['audit','=',3];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $where[] = ['audit','!=',0];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $where[] = ['audit','!=',3];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $where[] = ['audit','!=',0];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $list = RecruitAppointInfo::where($where)->pluck('id')->all();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!empty($list)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                foreach ($list as $appoint_id) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $this->fetch_word(['recruit_id'=>$recruit_id,'appoint_id'=>$appoint_id]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return response()->json(['status' => 1, 'msg' => '生成Word简历成功!', 'data' => 'ok']);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return response()->json(['status' => 0, 'msg' => '参数缺失!', 'data' => 'fail']);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |