chengkun
2025-04-30 6ab292fb7415be124651e312ec4f21c594568f17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
 
 
 
class likeresume_controller extends company
{
 
    function index_action()
    {
 
        $JobM       =   $this->MODEL("job");
        $resumeM    =   $this->MODEL("resume");
 
        if ($_GET['jobid']) {
 
            $id     =   (int)$_GET['jobid'];
            $job    =   $JobM->getInfo(array('id' => $id), array('com' => 'yes'));
            $this->yunset('job', $job);
 
            $msg    =   $JobM->getYqmsList(array('fid' => $this->uid,'isdel'=>9,'jobid' => $id, 'groupby' => 'uid'));
 
            $rData['field']             =   "`id`,`uid`,`city_classid`,`job_classid`,`report`,`minsalary`,`maxsalary`,`edu`,`sex`,`exp`";
            $where['defaults']          =   1;
 
            if ($msg && is_array($msg)) {
 
                $uids                   =   array();
                foreach ($msg as $val) {
                    $uids[]             =   $val['uid'];
                }
                $where['uid']           =   array('notin', pylode(',', $uids));
            }
            $where['PHPYUNBTWSTART_A']  =   '';
            $where['job_classid'][]     =   array('findin', $job['job_post']);
            $where['job_classid'][]     =   array('findin', $job['job1'], 'or');
            $where['job_classid'][]     =   array('findin', $job['job1_son'], 'or');
            $where['PHPYUNBTWEND_A']    =   '';
 
            $where['PHPYUNBTWSTART_B']  =   '';
            $where['city_classid'][]    =   array('findin', $job['provinceid']);
            $where['city_classid'][]    =   array('findin', $job['cityid'], 'or');
            $where['city_classid'][]    =   array('findin', $job['three_cityid'], 'or');
            $where['PHPYUNBTWEND_B']    =   '';
 
            $where['orderby']           =   'lastupdate,desc';
            $where['limit']             =   15;
 
            $resume                     =   $resumeM->getList($where, $rData);
            $resume                     =   $resume['list'];
 
 
            if (is_array($resume)) {
                $uids           =   array();
                foreach ($resume as $v) {
                    $uids[]     =   $v['uid'];
                }
                if ($uids) {
                    $user       =   $resumeM->getResumeList(array('uid' => array('in', pylode(',', $uids))), array('field' => '`uid`,`name`,`nametype`,`sex`,`marriage`,`def_job`'));
                }
                foreach ($resume as $k => $v) {
 
                    if (isset($user) && !empty($user)) {
                        foreach ($user as $val) {
                            if ($v['uid'] == $val['uid']) {
                                $resume[$k]['name'] =   $val['name_n'];
                            }
                        }
                    }
                    if ($v['sex'] == '152') {
 
                        $resume[$k]['sex']  =   '女';
                    } elseif ($v['sex'] == '153') {
 
                        $resume[$k]['sex']  =   '男';
                    } else {
 
                        $resume[$k]['sex']  =   $v['sex_n'];
                    }
 
                    $resume[$k]['jobname']  =   $v['job_classname'];
                    $resume[$k]['cityname'] =   $v['city_classname'];
 
                    $pre        =   60;
 
                    if ($job['job_edu'] == $v['edu_n'] || $job['job_edu'] == '不限') {
                        $pre    =   $pre + 5;
                    }
                    if ($job['job_sex'] == $v['sex_n']) {
                        $pre    =   $pre + 5;
                    }
                    if (isset($user) && !empty($user)) {
                        foreach ($user as $val) {
                            if ($v['uid'] == $val['uid']) {
                                if ($job['job_marriage'] == $val['marriage_n'] || $job['job_marriage'] == "不限") {
                                    $pre = $pre + 5;
                                }
                            }
                        }
                    }
                    if ($job['job_report'] == $v['report_n'] || $job['job_report'] == "不限") {
                        $pre    =   $pre + 5;
                    }
                    if ($job['job_exp'] == $v['exp_n'] || $job['job_exp'] == "不限") {
                        $pre    =   $pre + 5;
                    }
                    $resume[$k]['pre']  =   $pre;
                }
 
                $sort       =   array(
                    'direction' =>  'SORT_DESC',
                    'field'     =>  'lastupdate',
                );
                $arrSort    =   array();
                foreach ($resume as $uniqid => $row) {
                    foreach ($row as $key => $value) {
 
                        $arrSort[$key][$uniqid] =   $value;
                    }
                }
                if ($sort['direction']) {
                    array_multisort($arrSort[$sort['field']], constant($sort['direction']), $resume);
                }
 
                $this->yunset("resume", $resume);
            }
        }
 
        $this->yqmsInfo();
        $this->public_action();
        $this->company_satic();
 
        $this->com_tpl('likeresume');
    }
}
 
?>