Browse Source

批量导出

linwu 2 năm trước cách đây
mục cha
commit
5fcd607937
1 tập tin đã thay đổi với 12 bổ sung1 xóa
  1. 12 1
      app/Admin/Controllers/Recruit/RecruitController.php

+ 12 - 1
app/Admin/Controllers/Recruit/RecruitController.php

@@ -2682,8 +2682,19 @@ class RecruitController extends Controller
         set_time_limit(0);
         ini_set('memory_limit',-1);
         $recruit_id = $request->recruit_id;
+        $audit = $request->audit;
         if(!empty($recruit_id)){
-            $list = RecruitAppointInfo::where('recruit_id',$recruit_id)->pluck('id')->all();
+            $where = [['recruit_id','=',$recruit_id]];
+            if (!empty($audit)) {
+                if ($audit == 3) {
+                    $where[] = ['audit','=',3];
+                } else {
+                    $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]);