|
@@ -2077,7 +2077,7 @@ class RecruitController extends Controller
|
|
|
* @throws \Exception
|
|
|
*/
|
|
|
public function out_zip(Request $request)
|
|
|
- {
|
|
|
+ {
|
|
|
Permission::check('recruit_out_excel');
|
|
|
$recruit_id = $request->id;
|
|
|
$recruit = Recruit::find($recruit_id);
|
|
@@ -2085,22 +2085,23 @@ class RecruitController extends Controller
|
|
|
return response()->json(['status' => 0, 'msg' => '找不到对应的招考场次'], 200);
|
|
|
}
|
|
|
|
|
|
- $data = $request->all();
|
|
|
+
|
|
|
$where = [];
|
|
|
- $where[] = ['recruit_appoint_info.audit','>',0];
|
|
|
- $where[] = ['recruit_appoint_info.recruit_id', '=', $data['id']];
|
|
|
- $param = parse_url($data['where']);
|
|
|
- parse_str($param['query'],$param);
|
|
|
- if (is_array($param)) {
|
|
|
- unset($param['id']);
|
|
|
- foreach ($param as $k => $v) {
|
|
|
- if ($k == 'realname') {
|
|
|
- $where[] = [$k, 'like', "%$v%"];
|
|
|
- } elseif ($k != '_pjax' and $k != 'page' && $k != 'perpage') {
|
|
|
- $where[] = [$k, '=', $v];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ $where[] = ['recruit_appoint_info.audit','=',3];
|
|
|
+ $where[] = ['recruit_appoint_info.recruit_id', '=', $recruit_id];
|
|
|
+ $where[] = ['recruit_appoint_info.realname', 'in', ['廖赐艺','吴鑫','庄惠阳','傅承恩','游美','吴维灵','许世芳','林非余','黄其森','徐阳雍','郑金埭','王俊龙','张询','吴晓瑜','王传晔','许宏焱','李焕金','许雅玲','陈月超']];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
$select = ['recruit_appoint_info.*', 'recruit_post.code', 'recruit_post.name'];
|
|
|
$model = RecruitAppointInfo::where($where)->join('recruit_post', 'recruit_appoint_info.post_id', '=', 'recruit_post.id', 'left')->join('recruit_ticket','recruit_ticket.appoint_id','=','recruit_appoint_info.id','left');
|
|
|
if(in_array('expand_special',explode(',', $recruit->forms))){
|
|
@@ -2127,66 +2128,66 @@ class RecruitController extends Controller
|
|
|
}
|
|
|
|
|
|
if($list){
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ foreach ($list as $key => $value){
|
|
|
+ $path = base_path() . "/storage/app/public/recruit/zip/{$recruit->company}/{$value->realname}_{$value->card}/";
|
|
|
+ if(!is_dir($path)){
|
|
|
+ Storage::makeDirectory("public/recruit/zip/{$recruit->company}/{$value->realname}_{$value->card}");
|
|
|
+ }
|
|
|
+ if(in_array('expand_special',explode(',', $recruit->forms))){
|
|
|
+ $special = RecruitAppointExpandSpecial::where('recruit_appoint_id',$value->id)->first();
|
|
|
+ $material = json_decode($special['material'],true);
|
|
|
+ if($material){
|
|
|
+ foreach ($material as $k => $v){
|
|
|
+ $old_path = base_path() . "/public/" . $v['url'];
|
|
|
+ if (file_exists($old_path)) {
|
|
|
+ $basename = basename($old_path);
|
|
|
+ $new_path = $path . $basename;
|
|
|
+ copy($old_path, $new_path);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('identification',explode(',', $recruit->forms))){
|
|
|
+ $identification = json_decode($value->identification,true);
|
|
|
+ if($identification){
|
|
|
+ foreach ($identification as $k => $v){
|
|
|
+ $old_path = base_path() . "/public/" . $v['url'];
|
|
|
+ if (file_exists($old_path)) {
|
|
|
+ $basename = basename($old_path);
|
|
|
+ $new_path = $path . $basename;
|
|
|
+ copy($old_path, $new_path);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('education_certification',explode(',', $recruit->forms))){
|
|
|
+ $education_certification = json_decode($value->education_certification,true);
|
|
|
+ if($education_certification){
|
|
|
+ foreach ($education_certification as $k => $v){
|
|
|
+ $old_path = base_path() . "/public/" . $v['url'];
|
|
|
+ if (file_exists($old_path)) {
|
|
|
+ $basename = basename($old_path);
|
|
|
+ $new_path = $path . $basename;
|
|
|
+ copy($old_path, $new_path);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('other_certification',explode(',', $recruit->forms))){
|
|
|
+ $other_certification = json_decode($value->other_certification,true);
|
|
|
+ if($other_certification){
|
|
|
+ foreach ($other_certification as $k => $v){
|
|
|
+ $old_path = base_path() . "/public/" . $v['url'];
|
|
|
+ if (file_exists($old_path)) {
|
|
|
+ $basename = basename($old_path);
|
|
|
+ $new_path = $path . $basename;
|
|
|
+ copy($old_path, $new_path);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ copy(base_path() . "/public/" . $value->word_url, $path . basename($value->word_url));
|
|
|
+ }
|
|
|
|
|
|
$savename = base_path() . "/storage/app/public/recruit/zip/{$recruit->company}.zip";
|
|
|
$zipper = new Zipper();
|