|
...
|
...
|
@@ -8,6 +8,9 @@ use App\Helper\FormGlobalsoApi; |
|
|
|
use App\Helper\Translate;
|
|
|
|
use App\Http\Logic\Bside\User\UserLogic;
|
|
|
|
use App\Http\Logic\Bside\User\UserLoginLogic;
|
|
|
|
use App\Models\Manage\EntryPosition;
|
|
|
|
use App\Models\Manage\JobLevel;
|
|
|
|
use App\Models\Manage\Manage;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\Project\Project as ProjectModel;
|
|
|
|
use App\Models\Service\Service;
|
|
...
|
...
|
@@ -192,8 +195,72 @@ class ComController extends BaseController |
|
|
|
$model = new Service();
|
|
|
|
$info = $model->read(['type'=>5]);
|
|
|
|
$values = json_decode($info['values']);
|
|
|
|
var_dump($values);
|
|
|
|
die();
|
|
|
|
$data = [];
|
|
|
|
foreach ($values as $k => $v){
|
|
|
|
$v = (array)$v;
|
|
|
|
$data = [
|
|
|
|
'name'=>$v['name'],
|
|
|
|
'mobile'=>$v['mobile'],
|
|
|
|
'password'=>'$2y$10$ZNHxlIddWiQzQbIIzFgYJOsPlQ4n0cwWl8Sea53qvQvDXtu3WeYMC',
|
|
|
|
];
|
|
|
|
$manager_id = DB::table('gl_manage')->insertGetId($data);
|
|
|
|
if($v['sex'] == '女'){
|
|
|
|
$v['sex'] = 2;
|
|
|
|
}else{
|
|
|
|
$v['sex'] = 1;
|
|
|
|
}
|
|
|
|
$education = [
|
|
|
|
'专科' => 1,
|
|
|
|
'大专' => 1,
|
|
|
|
'中专' => 0,
|
|
|
|
'本科' => 2,
|
|
|
|
'自考本科'=>0,
|
|
|
|
'全日制本科'=>2,
|
|
|
|
'本科在读'=>2,
|
|
|
|
'大学本科'=>2,
|
|
|
|
'硕士研究生' => 3,
|
|
|
|
'硕士'=>3,
|
|
|
|
'其他' => 0,
|
|
|
|
];
|
|
|
|
//获取入职岗位
|
|
|
|
$entryPositionModel = new EntryPosition();
|
|
|
|
$entry_position = $entryPositionModel->read(['name'=>$v['entry_position']]);
|
|
|
|
if($entry_position !== false){
|
|
|
|
$entry_position = $entry_position['id'];
|
|
|
|
}else{
|
|
|
|
$entry_position = '';
|
|
|
|
}
|
|
|
|
//获取级别
|
|
|
|
$jobLevelModel = new JobLevel();
|
|
|
|
$p_level = $jobLevelModel->read(['name'=>$v['p_level']]);
|
|
|
|
if($entry_position !== false){
|
|
|
|
$p_level = $p_level['id'];
|
|
|
|
}else{
|
|
|
|
$p_level = '';
|
|
|
|
}
|
|
|
|
var_dump($v['career_history']);
|
|
|
|
$manager_data = [
|
|
|
|
'manage_id'=>$manager_id,
|
|
|
|
'name'=>$v['name'],
|
|
|
|
'id_card'=>$v['id_card'],
|
|
|
|
'mobile'=>$v['mobile'],
|
|
|
|
'birthday'=>$v['birthday'],
|
|
|
|
'address'=>$v['address'],
|
|
|
|
'sex'=>$v['sex'],
|
|
|
|
'nationality'=>$v['nationality'],
|
|
|
|
'education'=>isset($education[$v['education']]) ?? 0,
|
|
|
|
'major'=>$v['major'],
|
|
|
|
'graduate_school'=>$v['graduate_school'],
|
|
|
|
'english_level'=>$v['english_level'],
|
|
|
|
'entry_position'=>$entry_position,
|
|
|
|
'p_level'=>$p_level,
|
|
|
|
'residential_address'=>$v['residential_address'],
|
|
|
|
'emergency_contact'=>$v['emergency_contact'],
|
|
|
|
'career_history'=>json_encode((array)$v['career_history']),
|
|
|
|
'learning_history'=>json_encode((array)$v['learning_history']),
|
|
|
|
''
|
|
|
|
];
|
|
|
|
}
|
|
|
|
$data = json_decode();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|