正在显示
2 个修改的文件
包含
1 行增加
和
85 行删除
| @@ -193,90 +193,6 @@ class ComController extends BaseController | @@ -193,90 +193,6 @@ class ComController extends BaseController | ||
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | public function ceshi(){ | 195 | public function ceshi(){ |
| 196 | - $model = new Service(); | ||
| 197 | - $info = $model->read(['type'=>5]); | ||
| 198 | - $values = json_decode($info['values']); | ||
| 199 | - $values = array_reverse($values); | ||
| 200 | - foreach ($values as $k => $v){ | ||
| 201 | - $v = (array)$v; | ||
| 202 | -// $data = [ | ||
| 203 | -// 'name'=>$v['name'], | ||
| 204 | -// 'mobile'=>$v['mobile'], | ||
| 205 | -// 'password'=>'$2y$10$ZNHxlIddWiQzQbIIzFgYJOsPlQ4n0cwWl8Sea53qvQvDXtu3WeYMC', | ||
| 206 | -// 'created_at'=>date('Y-m-d H:i:s'), | ||
| 207 | -// 'updated_at'=>date('Y-m-d H:i:s'), | ||
| 208 | -// ]; | ||
| 209 | -// $manager_id = DB::table('gl_manage')->insertGetId($data); | ||
| 210 | - if($v['sex'] == '女'){ | ||
| 211 | - $v['sex'] = 2; | ||
| 212 | - }else{ | ||
| 213 | - $v['sex'] = 1; | ||
| 214 | - } | ||
| 215 | - $education = [ | ||
| 216 | - '专科' => 1, | ||
| 217 | - '大专' => 4, | ||
| 218 | - '中专' => 0, | ||
| 219 | - '本科' => 2, | ||
| 220 | - '自考本科'=>0, | ||
| 221 | - '全日制本科'=>2, | ||
| 222 | - '本科在读'=>2, | ||
| 223 | - '大学本科'=>2, | ||
| 224 | - '硕士研究生' => 3, | ||
| 225 | - '硕士'=>3, | ||
| 226 | - '其他' => 0, | ||
| 227 | - ]; | ||
| 228 | - var_dump(isset($education[$v['education']]) ? $education[$v['education']] : 0); | ||
| 229 | - die(); | ||
| 230 | - //获取入职岗位 | ||
| 231 | - $entryPositionModel = new EntryPosition(); | ||
| 232 | - $entry_position = $entryPositionModel->read(['name'=>$v['entry_position']]); | ||
| 233 | - if($entry_position !== false){ | ||
| 234 | - $entry_position = $entry_position['id']; | ||
| 235 | - }else{ | ||
| 236 | - $entry_position = ''; | ||
| 237 | - } | ||
| 238 | - //获取级别 | ||
| 239 | - $jobLevelModel = new JobLevel(); | ||
| 240 | - $p_level = $jobLevelModel->read(['name'=>$v['p_level']]); | ||
| 241 | - if($entry_position !== false){ | ||
| 242 | - $p_level = $p_level['id']; | ||
| 243 | - }else{ | ||
| 244 | - $p_level = ''; | ||
| 245 | - } | ||
| 246 | - $manager_data = [ | ||
| 247 | - 'manage_id'=>$manager_id ?? '', | ||
| 248 | - 'name'=>$v['name'], | ||
| 249 | - 'id_card'=>$v['id_card'], | ||
| 250 | - 'mobile'=>$v['mobile'], | ||
| 251 | - 'birthday'=>$v['birthday'], | ||
| 252 | - 'address'=>$v['address'], | ||
| 253 | - 'sex'=>$v['sex'], | ||
| 254 | - 'nationality'=>$v['nationality'], | ||
| 255 | - 'education'=>isset($education[$v['education']]) ? $education[$v['education']] : 0, | ||
| 256 | - 'major'=>$v['major'], | ||
| 257 | - 'graduate_school'=>$v['graduate_school'], | ||
| 258 | - 'english_level'=>$v['english_level'], | ||
| 259 | - 'entry_position'=>$entry_position, | ||
| 260 | - 'p_level'=>$p_level, | ||
| 261 | - 'residential_address'=>$v['residential_address'], | ||
| 262 | - 'emergency_contact'=>$v['emergency_contact'], | ||
| 263 | - 'career_history'=>json_encode((array)$v['career_history']), | ||
| 264 | - 'learning_history'=>json_encode((array)$v['learning_history']), | ||
| 265 | - 'bank_card'=>$v['bank_card'], | ||
| 266 | - 'photo_gallery'=>json_encode((array)$v['photo_gallery']), | ||
| 267 | - 'id_card_gallery'=>json_encode((array)$v['id_card_gallery']), | ||
| 268 | - 'certificate_gallery'=>json_encode((array)$v['certificate_gallery']), | ||
| 269 | - 'dangyuan'=>$v['dangyuan'], | ||
| 270 | - 'dangzhibu'=>$v['dangzhibu'], | ||
| 271 | - 'dang_address'=>$v['dang_address'], | ||
| 272 | - 'join_date'=>$v['join_date'], | ||
| 273 | - 'status'=>($v['status'] == '在职') ? 1 : 2, | ||
| 274 | - 'computer_account'=>$v['computer_account'], | ||
| 275 | - 'qq_account'=>$v['qq_account'] | ||
| 276 | - ]; | ||
| 277 | - $hrModel = new ManageHr(); | ||
| 278 | - $hrModel->add($manager_data); | ||
| 279 | - } | ||
| 280 | - return 1; | 196 | + |
| 281 | } | 197 | } |
| 282 | } | 198 | } |
-
请 注册 或 登录 后发表评论