Exemplo n.º 1
0
 public function generateApplicantCode($status, $department)
 {
     $year = date('Y');
     $month = date('m');
     if ($status != NgStatusApplicant::CONFIRMED) {
         $code_appl = 'REG';
     } else {
         $code_appl = 'FRM';
     }
     $dept_code = DepartmentPeer::retrieveByPK($department)->getNumCode() . '-';
     $stu_code = ParamsPeer::retrieveByCode('applicant_code');
     $sc = $stu_code->getValue();
     $sc = explode('$', $sc);
     array_shift($sc);
     $code_len = 0;
     $code = '';
     foreach ($sc as $k => $v) {
         $v = explode('#', $v);
         if ($v[0] == 'app') {
             $code_len += $v[1];
             $code .= str_pad($code_appl, $v[1], '0', STR_PAD_LEFT);
         } elseif ($v[0] == 'dept') {
             $code .= str_pad($dept_code, $v[1], '0', STR_PAD_LEFT);
             $code_len += $v[1];
         } elseif ($v[0] == 'year') {
             if (strlen($year) <= $v[1]) {
                 $code .= str_pad($year, $v[1], '0', STR_PAD_LEFT);
             } else {
                 $code .= substr($year, strlen($year) - $v[1]);
             }
             $code_len += $v[1];
         } elseif ($v[0] == 'month') {
             if (strlen($month) <= $v[1]) {
                 $code .= str_pad($month, $v[1], '0', STR_PAD_LEFT);
             } else {
                 $code .= substr($month, strlen($month) - $v[1]);
             }
             $code_len += $v[1];
         } elseif ($v[0] == 'seq') {
             $c = new Criteria();
             $c->add(NgTestApplicantPeer::CODE, $code . '%', Criteria::LIKE);
             $c->addDescendingOrderByColumn(NgTestApplicantPeer::CODE);
             $c->setLimit(1);
             $last_applicant = NgTestApplicantPeer::doSelectOne($c);
             if ($last_applicant) {
                 $lap = $last_applicant->getCode();
                 $lap = substr_replace($lap, '', 0, $code_len);
                 $lap = substr($lap, 0, $v[1]);
                 $lap++;
                 $code .= str_pad($lap, $v[1], '0', STR_PAD_LEFT);
             } else {
                 $code .= str_pad(1, $v[1], '0', STR_PAD_LEFT);
                 break;
             }
         }
         $sc[$k] = $v;
     }
     return $code;
 }
Exemplo n.º 2
0
 public function getNgTestApplicantsJoinSubdistrict($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseNgTestApplicantPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collNgTestApplicants === null) {
         if ($this->isNew()) {
             $this->collNgTestApplicants = array();
         } else {
             $criteria->add(NgTestApplicantPeer::NG_STATUS_APPLICANT_ID, $this->getId());
             $this->collNgTestApplicants = NgTestApplicantPeer::doSelectJoinSubdistrict($criteria, $con);
         }
     } else {
         $criteria->add(NgTestApplicantPeer::NG_STATUS_APPLICANT_ID, $this->getId());
         if (!isset($this->lastNgTestApplicantCriteria) || !$this->lastNgTestApplicantCriteria->equals($criteria)) {
             $this->collNgTestApplicants = NgTestApplicantPeer::doSelectJoinSubdistrict($criteria, $con);
         }
     }
     $this->lastNgTestApplicantCriteria = $criteria;
     return $this->collNgTestApplicants;
 }
Exemplo n.º 3
0
 public function getNgTestApplicant($con = null)
 {
     include_once 'lib/model/om/BaseNgTestApplicantPeer.php';
     if ($this->aNgTestApplicant === null && $this->ng_test_applicant_id !== null) {
         $this->aNgTestApplicant = NgTestApplicantPeer::retrieveByPK($this->ng_test_applicant_id, $con);
     }
     return $this->aNgTestApplicant;
 }
Exemplo n.º 4
0
 public function executeSavePayment()
 {
     #$user_id = $this->getContext()->getUser()->getAttribute('user_id', null, 'bo');
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     /**        
             $year = $this->getRequestParameter('year');
             $month = $this->getRequestParameter('month');
             
             $department = DepartmentPeer::retrieveByPK($this->getRequestParameter('department_id'));
             $dept_code = $department->getNumCode().'-';
             
             $code_appl = 'REG';
             $stu_code = ParamsPeer::retrieveByCode('applicant_code');
     
             $sc = $stu_code->getValue();
             $sc = explode('$', $sc);
             array_shift($sc);
             $code_len = 0;
             $code = '';
             foreach ($sc as $k => $v) {
                 $v = explode('#', $v);
                 if ($v[0] == 'app') {
                     $code_len += $v[1];
                     $code .= str_pad($code_appl, $v[1], '0', STR_PAD_LEFT);
                 } elseif ($v[0] == 'dept') {
                     $code .= str_pad($dept_code, $v[1], '0', STR_PAD_LEFT);
                     $code_len += $v[1];
                 } elseif ($v[0] == 'year') {
                     if (strlen($year) <= $v[1]) {
                         $code .= str_pad($year, $v[1], '0', STR_PAD_LEFT);
                     } else {
                         $code .= substr($year, strlen($year) - $v[1]);
                     }
                     $code_len += $v[1];
                 } elseif ($v[0] == 'month') {
                     if (strlen($month) <= $v[1]) {
                         $code .= str_pad($month, $v[1], '0', STR_PAD_LEFT);
                     } else {
                         $code .= substr($month, strlen($month) - $v[1]);
                     }
                     $code_len += $v[1];
                 } elseif ($v[0] == 'seq') {
                     $c = new Criteria();
                     $c->add(NgTestApplicantPeer::CODE, $code . '%', Criteria::LIKE);
                     $c->addDescendingOrderByColumn(NgTestApplicantPeer::CODE);
                     $c->setLimit(1);
                     $last_applicant = NgTestApplicantPeer::doSelectOne($c);
                     if ($last_applicant) {
                         $lap = $last_applicant->getCode();
                         $lap = substr_replace($lap, '', 0, $code_len);
                         $lap = substr($lap, 0, $v[1]);
                         $lap++;
                         $code .= str_pad($lap, $v[1], '0', STR_PAD_LEFT);
                     } else {
                         $code .= str_pad(1, $v[1], '0', STR_PAD_LEFT);
                         break;
                     }
                 }
                 $sc[$k] = $v;
             }
             **/
     $newCode = $this->pmbTools->generateApplicantCode(NgStatusApplicant::CONFIRMED, $this->getRequestParameter('department_id'));
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $ng_test_applicant = new NgTestApplicant();
     } else {
         $ng_test_applicant = NgTestApplicantPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($ng_test_applicant);
     }
     $ng_test_applicant->setCode($newCode);
     $ng_test_applicant->setNgStatusApplicantId(NgStatusApplicant::CONFIRMED);
     $ng_test_applicant->save();
     $c = new Criteria();
     $c->add(NgRegTestPeriodPeer::NG_REG_PERIOD_ID, $ng_test_applicant->getNgRegTestPeriod()->getNgRegPeriodId());
     $nrtps = NgRegTestPeriodPeer::doSelect($c);
     foreach ($nrtps as $nrtp) {
         $cw = new Criteria();
         $cw->add(NgTestSchedulePeer::NG_REG_TEST_PERIOD_ID, $nrtp->getId());
         $cw->addAscendingorderByColumn(NgTestSchedulePeer::ID);
         $scheds = NgTestSchedulePeer::doSelect($cw);
         $s1 = array();
         foreach ($scheds as $s) {
             $s1[$s->getNgRegTestPeriodId()][] = array('ng_reg_test_period_id' => $s->getNgRegTestPeriodId(), 'used' => $s->countNgTestApplScheds(), 'capacity' => $s->getCapacity(), 'sched' => $s);
         }
         foreach ($s1 as $s) {
             $c = new Criteria();
             $c->add(NgTestSchedulePeer::NG_REG_TEST_PERIOD_ID, $nrtp->getId());
             $c->addJoin(TestApplSchedPeer::TEST_SCHEDULE_ID, TestSchedulePeer::ID);
             $c->add(NgTestApplSchedPeer::NG_TEST_APPLICANT_ID, $ng_test_applicant->getId());
             $tas = NgTestApplSchedPeer::doSelectOne($c);
             if ($tas == null) {
                 $i = 0;
                 while ($s[$i]) {
                     $sched = $s[$i];
                     if ($sched['used'] < $sched['capacity']) {
                         $tas = new NgTestApplSched();
                         $tas->setNgTestApplicant($ng_test_applicant);
                         $tas->setNgTestSchedule($sched['sched']);
                         $tas->save();
                         break;
                     }
                     $i++;
                 }
             }
         }
     }
     return $this->redirect('ng_test_applicant/list');
 }
Exemplo n.º 5
0
 public function executeUpdateScore()
 {
     $this->ng_reg_period = NgRegPeriodPeer::retrieveByPK($this->getRequestParameter('ng_reg_period_id'));
     $this->forward404Unless($this->ng_reg_period);
     $scores = $this->getRequestParameter('score');
     foreach ($scores as $m => $score) {
         $ids = split('_', $m);
         $ng_test_applicant = NgTestApplicantPeer::retrieveByPK($ids[1]);
         $ng_test_applicant->setNgStatusApplicantId(4);
         $ng_test_applicant->save();
     }
     return $this->redirect('ng_reg_detail/list?id=' . $this->ng_reg_period->getId());
 }
 public static function doSelectJoinAllExceptNgAchievementLevel(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     NgTaAchievementRecordPeer::addSelectColumns($c);
     $startcol2 = NgTaAchievementRecordPeer::NUM_COLUMNS - NgTaAchievementRecordPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     NgTestApplicantPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + NgTestApplicantPeer::NUM_COLUMNS;
     NgAchievementTypePeer::addSelectColumns($c);
     $startcol4 = $startcol3 + NgAchievementTypePeer::NUM_COLUMNS;
     $c->addJoin(NgTaAchievementRecordPeer::NG_TEST_APPLICANT_ID, NgTestApplicantPeer::ID);
     $c->addJoin(NgTaAchievementRecordPeer::NG_ACHIEVEMENT_TYPE_ID, NgAchievementTypePeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = NgTaAchievementRecordPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = NgTestApplicantPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getNgTestApplicant();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addNgTaAchievementRecord($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initNgTaAchievementRecords();
             $obj2->addNgTaAchievementRecord($obj1);
         }
         $omClass = NgAchievementTypePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getNgAchievementType();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addNgTaAchievementRecord($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initNgTaAchievementRecords();
             $obj3->addNgTaAchievementRecord($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 public static function doSelectJoinAllExceptSubdistrict(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     NgTestApplicantParentsPeer::addSelectColumns($c);
     $startcol2 = NgTestApplicantParentsPeer::NUM_COLUMNS - NgTestApplicantParentsPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     NgTestApplicantPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + NgTestApplicantPeer::NUM_COLUMNS;
     ReligionPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + ReligionPeer::NUM_COLUMNS;
     DegreePeer::addSelectColumns($c);
     $startcol5 = $startcol4 + DegreePeer::NUM_COLUMNS;
     SalaryPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + SalaryPeer::NUM_COLUMNS;
     JobTypePeer::addSelectColumns($c);
     $startcol7 = $startcol6 + JobTypePeer::NUM_COLUMNS;
     CountryPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + CountryPeer::NUM_COLUMNS;
     RegionPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + RegionPeer::NUM_COLUMNS;
     CityPeer::addSelectColumns($c);
     $startcol10 = $startcol9 + CityPeer::NUM_COLUMNS;
     DistrictPeer::addSelectColumns($c);
     $startcol11 = $startcol10 + DistrictPeer::NUM_COLUMNS;
     $c->addJoin(NgTestApplicantParentsPeer::NG_TEST_APPLICANT_ID, NgTestApplicantPeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::RELIGION_ID, ReligionPeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::DEGREE_ID, DegreePeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::SALARY_ID, SalaryPeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::JOB_TYPE_ID, JobTypePeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::COUNTRY_ID, CountryPeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::REGION_ID, RegionPeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::CITY_ID, CityPeer::ID);
     $c->addJoin(NgTestApplicantParentsPeer::DISTRICT_ID, DistrictPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = NgTestApplicantParentsPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = NgTestApplicantPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getNgTestApplicant();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initNgTestApplicantParentss();
             $obj2->addNgTestApplicantParents($obj1);
         }
         $omClass = ReligionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getReligion();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initNgTestApplicantParentss();
             $obj3->addNgTestApplicantParents($obj1);
         }
         $omClass = DegreePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getDegree();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initNgTestApplicantParentss();
             $obj4->addNgTestApplicantParents($obj1);
         }
         $omClass = SalaryPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getSalary();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initNgTestApplicantParentss();
             $obj5->addNgTestApplicantParents($obj1);
         }
         $omClass = JobTypePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getJobType();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initNgTestApplicantParentss();
             $obj6->addNgTestApplicantParents($obj1);
         }
         $omClass = CountryPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getCountry();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initNgTestApplicantParentss();
             $obj7->addNgTestApplicantParents($obj1);
         }
         $omClass = RegionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj8 = new $cls();
         $obj8->hydrate($rs, $startcol8);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj8 = $temp_obj1->getRegion();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initNgTestApplicantParentss();
             $obj8->addNgTestApplicantParents($obj1);
         }
         $omClass = CityPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj9 = new $cls();
         $obj9->hydrate($rs, $startcol9);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj9 = $temp_obj1->getCity();
             if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj9->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj9->initNgTestApplicantParentss();
             $obj9->addNgTestApplicantParents($obj1);
         }
         $omClass = DistrictPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj10 = new $cls();
         $obj10->hydrate($rs, $startcol10);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj10 = $temp_obj1->getDistrict();
             if ($temp_obj10->getPrimaryKey() === $obj10->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj10->addNgTestApplicantParents($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj10->initNgTestApplicantParentss();
             $obj10->addNgTestApplicantParents($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 8
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(NgTestApplicantPeer::ID, $pks, Criteria::IN);
         $objs = NgTestApplicantPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Exemplo n.º 9
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = NgTestApplicantPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setNgRegInfoId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setDepartmentId($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setClassLevelId($arr[$keys[3]]);
     }
     if (array_key_exists($keys[4], $arr)) {
         $this->setNgRegTestPeriodId($arr[$keys[4]]);
     }
     if (array_key_exists($keys[5], $arr)) {
         $this->setNgStatusApplicantId($arr[$keys[5]]);
     }
     if (array_key_exists($keys[6], $arr)) {
         $this->setNgApplicantCategoryId($arr[$keys[6]]);
     }
     if (array_key_exists($keys[7], $arr)) {
         $this->setCountryId($arr[$keys[7]]);
     }
     if (array_key_exists($keys[8], $arr)) {
         $this->setReligionId($arr[$keys[8]]);
     }
     if (array_key_exists($keys[9], $arr)) {
         $this->setRegionId($arr[$keys[9]]);
     }
     if (array_key_exists($keys[10], $arr)) {
         $this->setCityId($arr[$keys[10]]);
     }
     if (array_key_exists($keys[11], $arr)) {
         $this->setDistrictId($arr[$keys[11]]);
     }
     if (array_key_exists($keys[12], $arr)) {
         $this->setSubdistrictId($arr[$keys[12]]);
     }
     if (array_key_exists($keys[13], $arr)) {
         $this->setCode($arr[$keys[13]]);
     }
     if (array_key_exists($keys[14], $arr)) {
         $this->setNik($arr[$keys[14]]);
     }
     if (array_key_exists($keys[15], $arr)) {
         $this->setNisn($arr[$keys[15]]);
     }
     if (array_key_exists($keys[16], $arr)) {
         $this->setName($arr[$keys[16]]);
     }
     if (array_key_exists($keys[17], $arr)) {
         $this->setUsername($arr[$keys[17]]);
     }
     if (array_key_exists($keys[18], $arr)) {
         $this->setPassword($arr[$keys[18]]);
     }
     if (array_key_exists($keys[19], $arr)) {
         $this->setEmail($arr[$keys[19]]);
     }
     if (array_key_exists($keys[20], $arr)) {
         $this->setPostcode($arr[$keys[20]]);
     }
     if (array_key_exists($keys[21], $arr)) {
         $this->setPhone($arr[$keys[21]]);
     }
     if (array_key_exists($keys[22], $arr)) {
         $this->setCellphone($arr[$keys[22]]);
     }
     if (array_key_exists($keys[23], $arr)) {
         $this->setShortname($arr[$keys[23]]);
     }
     if (array_key_exists($keys[24], $arr)) {
         $this->setApplicantType($arr[$keys[24]]);
     }
     if (array_key_exists($keys[25], $arr)) {
         $this->setHeregStatus($arr[$keys[25]]);
     }
     if (array_key_exists($keys[26], $arr)) {
         $this->setYear($arr[$keys[26]]);
     }
     if (array_key_exists($keys[27], $arr)) {
         $this->setPob($arr[$keys[27]]);
     }
     if (array_key_exists($keys[28], $arr)) {
         $this->setDob($arr[$keys[28]]);
     }
     if (array_key_exists($keys[29], $arr)) {
         $this->setSex($arr[$keys[29]]);
     }
     if (array_key_exists($keys[30], $arr)) {
         $this->setSchoolOfOriginType($arr[$keys[30]]);
     }
     if (array_key_exists($keys[31], $arr)) {
         $this->setSchoolOfOrigin($arr[$keys[31]]);
     }
     if (array_key_exists($keys[32], $arr)) {
         $this->setSchoolOfOriginAddress($arr[$keys[32]]);
     }
     if (array_key_exists($keys[33], $arr)) {
         $this->setGraduationYear($arr[$keys[33]]);
     }
     if (array_key_exists($keys[34], $arr)) {
         $this->setGraduationGrade($arr[$keys[34]]);
     }
     if (array_key_exists($keys[35], $arr)) {
         $this->setGraduationNo($arr[$keys[35]]);
     }
     if (array_key_exists($keys[36], $arr)) {
         $this->setGraduationDate($arr[$keys[36]]);
     }
     if (array_key_exists($keys[37], $arr)) {
         $this->setAddress($arr[$keys[37]]);
     }
     if (array_key_exists($keys[38], $arr)) {
         $this->setHomeNo($arr[$keys[38]]);
     }
     if (array_key_exists($keys[39], $arr)) {
         $this->setHomeRt($arr[$keys[39]]);
     }
     if (array_key_exists($keys[40], $arr)) {
         $this->setHomeRw($arr[$keys[40]]);
     }
     if (array_key_exists($keys[41], $arr)) {
         $this->setEnquirer($arr[$keys[41]]);
     }
     if (array_key_exists($keys[42], $arr)) {
         $this->setEnquiryRelation($arr[$keys[42]]);
     }
     if (array_key_exists($keys[43], $arr)) {
         $this->setChildNo($arr[$keys[43]]);
     }
     if (array_key_exists($keys[44], $arr)) {
         $this->setSiblingBloodTotal($arr[$keys[44]]);
     }
     if (array_key_exists($keys[45], $arr)) {
         $this->setSiblingAdoptTotal($arr[$keys[45]]);
     }
     if (array_key_exists($keys[46], $arr)) {
         $this->setSiblingSteptTotal($arr[$keys[46]]);
     }
     if (array_key_exists($keys[47], $arr)) {
         $this->setNativeLanguage($arr[$keys[47]]);
     }
     if (array_key_exists($keys[48], $arr)) {
         $this->setLiveWith($arr[$keys[48]]);
     }
     if (array_key_exists($keys[49], $arr)) {
         $this->setHomeDistance($arr[$keys[49]]);
     }
     if (array_key_exists($keys[50], $arr)) {
         $this->setTimeDistance($arr[$keys[50]]);
     }
     if (array_key_exists($keys[51], $arr)) {
         $this->setBloodType($arr[$keys[51]]);
     }
     if (array_key_exists($keys[52], $arr)) {
         $this->setNationalExamNo($arr[$keys[52]]);
     }
     if (array_key_exists($keys[53], $arr)) {
         $this->setNationalExamDate($arr[$keys[53]]);
     }
     if (array_key_exists($keys[54], $arr)) {
         $this->setLastClass($arr[$keys[54]]);
     }
     if (array_key_exists($keys[55], $arr)) {
         $this->setMovedNote($arr[$keys[55]]);
     }
     if (array_key_exists($keys[56], $arr)) {
         $this->setDateIn($arr[$keys[56]]);
     }
     if (array_key_exists($keys[57], $arr)) {
         $this->setVerifyCode($arr[$keys[57]]);
     }
     if (array_key_exists($keys[58], $arr)) {
         $this->setIsVerify($arr[$keys[58]]);
     }
     if (array_key_exists($keys[59], $arr)) {
         $this->setCreated($arr[$keys[59]]);
     }
 }