|  | @@ -33,6 +33,7 @@ class Import {
 | 
	
		
			
				|  |  |       * @return bool
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      public function deal($data): bool {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          if ($data['type'] == 1) {//企业导入
 | 
	
		
			
				|  |  |              $id = $data['id'];
 | 
	
		
			
				|  |  |              $res = Db::table("new_talent_zhiren")->where('id', $id)->findOrEmpty();
 | 
	
	
		
			
				|  | @@ -155,7 +156,8 @@ class Import {
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  return false;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -        } elseif ($data['type'] == 2) {//省级人才导入
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        elseif ($data['type'] == 2) {//省级人才导入
 | 
	
		
			
				|  |  |              $id = $data['id'];
 | 
	
		
			
				|  |  |              $res = Db::table("new_talent_zhiren")->where('id', $id)->findOrEmpty();
 | 
	
		
			
				|  |  |              if ($res) {
 | 
	
	
		
			
				|  | @@ -265,7 +267,9 @@ class Import {
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  return false;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -        } elseif ($data['type'] == 3){//泉州人才导入
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        elseif ($data['type'] == 3){//泉州人才导入
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              $id = $data['id'];
 | 
	
		
			
				|  |  |              $res = Db::table("new_talent_zhiren")->where('id', $id)->findOrEmpty();
 | 
	
		
			
				|  |  |              if ($res) {
 | 
	
	
		
			
				|  | @@ -273,10 +277,12 @@ class Import {
 | 
	
		
			
				|  |  |                      return false;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  try {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                      $path = dirname(dirname(dirname(__FILE__)));
 | 
	
		
			
				|  |  |                      $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($path ."/public/storage/" . $res['task_file']);
 | 
	
		
			
				|  |  |                      $sheet = $spreadsheet->getSheet(0);
 | 
	
		
			
				|  |  |                      $datas = $sheet->toArray();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                      $datas = array_slice($datas, 1); //去标题
 | 
	
		
			
				|  |  |                      $country = Db::table("sys_dict")->where("pid", 35)->column("code", "name");
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -392,6 +398,7 @@ class Import {
 | 
	
		
			
				|  |  |                      Db::table("new_talent_zhiren")->where('id', $id)->update(['task_result' => $res['task_file'], 'task_status' => 1, 'updateTime' => date("Y-m-d H:i:s", time())]);
 | 
	
		
			
				|  |  |                      return true;
 | 
	
		
			
				|  |  |                  } catch (\Exception $e) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                      Db::table("new_talent_zhiren")->where('id', $id)->update(['task_result' => $e->getMessage(), 'task_status' => 0, 'updateTime' => date("Y-m-d H:i:s", time())]);
 | 
	
		
			
				|  |  |                      return false;
 | 
	
		
			
				|  |  |                  }
 |