|
@@ -168,4 +168,55 @@ class TalentCondition extends AdminController {
|
|
|
echo sprintf('<script>parent.IdentifyCondition.callBack(%s);</script>', json_encode($data));
|
|
|
}
|
|
|
|
|
|
+ public function import1(){
|
|
|
+ $datas = getExcelDatas("test.xls");
|
|
|
+ $datas = array_slice($datas, 1); //去标题
|
|
|
+ foreach ($datas as $k => $v){
|
|
|
+ $item = [];
|
|
|
+ if($v[4] != null){
|
|
|
+ switch ($v[1]){
|
|
|
+ case '第一层次':
|
|
|
+ $item['talentLevel'] = 1;
|
|
|
+ break;
|
|
|
+ case '第二层次':
|
|
|
+ $item['talentLevel'] = 2;
|
|
|
+ break;
|
|
|
+ case '第三层次':
|
|
|
+ $item['talentLevel'] = 3;
|
|
|
+ break;
|
|
|
+ case '第四层次':
|
|
|
+ $item['talentLevel'] = 4;
|
|
|
+ break;
|
|
|
+ case '第五层次':
|
|
|
+ $item['talentLevel'] = 5;
|
|
|
+ break;
|
|
|
+ case '第六层次':
|
|
|
+ $item['talentLevel'] = 6;
|
|
|
+ break;
|
|
|
+ case '第七层次':
|
|
|
+ $item['talentLevel'] = 7;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ $item['telentLevelCat'] = $v[2];
|
|
|
+ $item['type'] = 1;
|
|
|
+ $item['name'] = $v[3];
|
|
|
+ $item['active'] = 1;
|
|
|
+ $item['companyIds'] = $v[4];
|
|
|
+ if($v['5'] == null){
|
|
|
+ $item['bindFileTypes'] = 104;
|
|
|
+ }else{
|
|
|
+ $item['bindFileTypes'] = $v[5];
|
|
|
+ }
|
|
|
+ $item['companyWithFileType'] = $item['companyIds'] . ':' . $item['bindFileTypes'];
|
|
|
+ if(strpos($item['name'],"年薪")){
|
|
|
+ $item['isSalary'] = 1;
|
|
|
+ }else{
|
|
|
+ $item['isSalary'] = 0;
|
|
|
+ }
|
|
|
+ Db::table("new_talent_condition")->insert($item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //dd($datas);
|
|
|
+ }
|
|
|
+
|
|
|
}
|