6000, 2 => 4000, 3 => 2000, 4 => 1000, 5 => 500, 6 => 200, 7 => 100, 8 => 0 ]; return $levelAndPoints[$level]; } /** * 通过层次得到层次名 * @param type $level * @return string */ public static function getLayerNameByLayer($level) { $level = $level ?: 8; $levelAndNames = [ 1 => "第一层次", 2 => "第二层次", 3 => "第三层次", 4 => "第四层次", 5 => "第五层次", 6 => "第六层次", 7 => "第七层次", 8 => "非优秀人才" ]; return $levelAndNames[$level]; } /** * 通过层次得到层次名 * @param type $level * @return string */ public static function getTypeName($type) { $typeAndNames = [ 1 => "晋江市现代产业体系人才", 2 => "晋江市集成电路产业优秀人才", 5 => "晋江市医疗卫生人才", 6 => "晋江市高等教育人才" ]; return $typeAndNames[$type]; } /** * 通过积分得到层次 * @param type $points * @return int */ public static function getLayerByPoints($points) { $level = 1; while ($levelPoints = CommonConst::getLayerPointsByLayer($level)) { if ($points >= $levelPoints) { break; } $level++; } return $level; } }