本文整理汇总了PHP中EmployeeService::saveEmployeeImmigrationRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP EmployeeService::saveEmployeeImmigrationRecord方法的具体用法?PHP EmployeeService::saveEmployeeImmigrationRecord怎么用?PHP EmployeeService::saveEmployeeImmigrationRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmployeeService
的用法示例。
在下文中一共展示了EmployeeService::saveEmployeeImmigrationRecord方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: import
//.........这里部分代码省略.........
if (strlen($data[38]) <= 50) {
$employee->setCustom2($data[38]);
}
if (strlen($data[39]) <= 50) {
$employee->setCustom3($data[39]);
}
if (strlen($data[40]) <= 50) {
$employee->setCustom1($data[40]);
}
$employee = $empService->saveEmployee($employee);
if ($data[35] != "" && $data[36] != "") {
$employeeSalary = new EmployeeSalary();
$employeeSalary->setSalaryName("CTC");
$employeeSalary->setPayPeriodId("4");
$employeeSalary->setCurrencyCode($data[36]);
$employeeSalary->setAmount($data[35]);
$employeeSalary->setEmpNumber($employee);
$empDirectDebit = new EmpDirectdebit();
$empDirectDebit->setAccount($data[37]);
$empDirectDebit->setAccountType("SAVINGS");
$employeeSalary->setDirectDebit($empDirectDebit);
$empService->saveEmployeeSalary($employeeSalary);
}
if ($data[41] != "" && strlen($data[41]) <= 50) {
$empPassport = new EmployeeImmigrationRecord();
$empPassport->setEmployee($employee);
$empPassport->setNumber($data[41]);
$empPassport->setCountryCode($data[42]);
if ($data[43] != "") {
$expiryDate = $this->formatDate($data[43]);
$empPassport->setExpiryDate($expiryDate);
}
$empPassport->setType(1);
$empService->saveEmployeeImmigrationRecord($empPassport);
}
if ($data[44] != "" && strlen($data[44]) <= 50) {
$empVisaDetails = new EmployeeImmigrationRecord();
$empVisaDetails->setEmployee($employee);
$empVisaDetails->setNumber($data[44]);
if ($data[45] != "") {
$visaExpiryDate = $this->formatDate($data[45]);
$empVisaDetails->setExpiryDate($visaExpiryDate);
}
$empVisaDetails->setType(2);
$empService->saveEmployeeImmigrationRecord($empVisaDetails);
}
if ($data[46] != "" && $data[46] != '0' && strlen($data[46]) <= 50) {
$sequence1 = 1;
//$this->getDependentSeqNo($employee->getEmpNumber());
$dependent1 = $this->getEmployeeDependent($employee->getEmpNumber(), $sequence1);
$dependent1->setEmployee($employee);
$dependent1->setSeqno($sequence1);
$dependent1->setName($data[46]);
if ($data[47] != "") {
$dependent1->setDateOfBirth($this->formatDate($data[47]));
}
$dependent1->setRelationshipType($data[48]);
$dependent1->setRelationship($data[49]);
$dependent1->save();
}
if ($data[50] != "" && $data[50] != '0' && strlen($data[50]) <= 50) {
$sequence2 = 2;
//$this->getDependentSeqNo($employee->getEmpNumber());
$dependent2 = $this->getEmployeeDependent($employee->getEmpNumber(), $sequence2);
$dependent2->setEmployee($employee);
$dependent2->setSeqno($sequence2);