本文整理匯總了PHP中Default_Model_Employee::getEmployeeDetails方法的典型用法代碼示例。如果您正苦於以下問題:PHP Default_Model_Employee::getEmployeeDetails方法的具體用法?PHP Default_Model_Employee::getEmployeeDetails怎麽用?PHP Default_Model_Employee::getEmployeeDetails使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Default_Model_Employee
的用法示例。
在下文中一共展示了Default_Model_Employee::getEmployeeDetails方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: assignservicerequestpopupAction
/**
*
*/
public function assignservicerequestpopupAction()
{
$request_form = new Default_Form_Servicerequest();
$id = $this->_getParam('id', null);
$req_msg = "";
try {
if ($id != '') {
$sd_req_model = new Default_Model_Servicerequests();
$grid_type_arr = $sd_req_model->getGridtypearr();
if (is_numeric($id) && $id > 0) {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
$login_bu = $auth->getStorage()->read()->businessunit_id;
$login_dept = $auth->getStorage()->read()->department_id;
}
$data = $sd_req_model->getRequestById($id);
if (!empty($data)) {
$approver_level = "view";
if (($grid_type_arr[$grid_type] == 'rept_app' || $grid_type_arr[$grid_type] == 'approver') && $data['status'] == 'To management approve') {
$approver_level = $sd_req_model->getApproverLevel($loginUserId, $id);
}
$emp_model = new Default_Model_Employee();
$service_conf_model = new Default_Model_Servicedeskconf();
$other_approvers = $emp_model->get_Service_Executors($id);
foreach ($app_data as $key => $value) {
$app_names[$key] = $app_details[$value];
}
$conf_data = $service_conf_model->getServiceDeskConfbyID($data['service_desk_conf_id']);
$exec_data = $emp_model->getEmployeeDetails($conf_data[0]['request_recievers']);
$this->view->id = $id;
$this->view->data = $data;
$this->view->loginUserId = $loginUserId;
$this->view->other_approvers = $other_approvers;
$this->view->app_names = $app_names;
$this->view->exec_data = $exec_data;
if ($this->getRequest()->getPost()) {
$trDb = Zend_Db_Table::getDefaultAdapter();
// starting transaction
$trDb->beginTransaction();
try {
$req_id = $this->_getParam('hid_reqid', null);
$hid_status = $this->_getParam('hid_status', null);
$selexecutorid = trim($this->_getParam('executor_action', null));
$request_comments = trim($this->_getParam('request_comments', null));
$save_data = array('executor_id' => trim($selexecutorid), 'ticket_assigned_by' => trim($loginUserId), 'ticket_assigned_comments' => trim($request_comments), 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$req_msg['success'] = "Executor assigned to service request.";
$sd_result = "";
if ($data['status'] != 'Closed' && $data['status'] != 'Rejected') {
$sd_result = $sd_req_model->SaveorUpdateRequestData($save_data, 'id = ' . $id);
//email stuff ------------Start
$sEmailData = $sd_req_model->getRequestDataForEmail($id);
$sMailSubject = sprintf("%s - %s - %s - %s", $sEmailData['ticket_number'], $sEmailData['service_desk_name'], $sEmailData['service_request_name'], $sEmailData['status']);
$smessage = "A new executor for this service request.";
$summary_data = $sd_req_model->getDataSummary($id);
$stoEmailAddress1 = $sd_req_model->getEmailAddress($selexecutorid);
$stoEmailAddress2 = $sd_req_model->getEmailAddress($sEmailData['raised_by']);
$stoEmailAddress3 = constant('ITSUPPORT_0');
//$stoEmailAddress3 = $this->getSupportTeamEmailID($sEmailData['service_desk_conf_id']);
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress1);
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress2);
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress3);
//email stuff ------------End
}
//start of saving history
$reqh_model = new Default_Model_Requesthistory();
$reqh_data = array('request_id' => $id, 'description' => ucfirst($req_msg['success']), 'emp_id' => $loginUserId, 'emp_name' => ucfirst($auth->getStorage()->read()->userfullname), 'emp_profileimg' => $auth->getStorage()->read()->profileimg, 'createdby' => $loginUserId, 'modifiedby' => $loginUserId, 'comments' => trim($request_comments), 'isactive' => 1, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
if ($sd_result == 'update') {
$reqh_model->SaveorUpdateRhistory($reqh_data, '');
//end of saving history
//$this->send_req_mails($id);
$req_msg['success'] = "Executor assigned to service request successfully.";
} else {
$req_msg['error'] = "Some thing went wrong, please try again.";
}
$result = sapp_Global::logManager(SERVICEDESK, 2, $loginUserId, $id);
$trDb->commit();
$this->_helper->getHelper("FlashMessenger")->addMessage(array($req_msg));
$this->_redirect('servicerequests/index/t/' . sapp_Global::_encrypt($grid_type) . ($status_value != '' ? "/v/" . $status_value : ""));
} catch (Exception $ex) {
$trDb->rollBack();
$msgarray['executor_comments'] = "Something went wrong, please try again.";
}
}
} else {
$this->view->ermsg = 'norecord';
}
} else {
$this->view->ermsg = 'norecord';
}
} else {
$this->view->ermsg = 'norecord';
}
} catch (Exception $e) {
$this->view->ermsg = 'nodata';
//.........這裏部分代碼省略.........
示例2: viewAction
/**
*
* View function is used to populate the data for the particular ID.
*/
public function viewAction()
{
$id = $this->getRequest()->getParam('id');
$callval = $this->getRequest()->getParam('call');
if ($callval == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$objName = 'servicedeskconf';
$servicedeskconfform = new Default_Form_servicedeskconf();
$servicedeskconfmodel = new Default_Model_Servicedeskconf();
$servicedeskdepartmentmodel = new Default_Model_Servicedeskdepartment();
$departmentsmodel = new Default_Model_Departments();
$employeemodel = new Default_Model_Employee();
$approvingauthflag = '';
$servicedeskconfform->removeElement("submit");
$elements = $servicedeskconfform->getElements();
try {
if ($id) {
if (is_numeric($id) && $id > 0) {
$data = $servicedeskconfmodel->getServiceDeskConfbyID($id);
if (!empty($data)) {
$data = $data[0];
if ($data['department_id'] != '' && $data['department_id'] != 'NULL') {
$deptdata = $departmentsmodel->getSingleDepartmentData($data['department_id']);
if (sizeof($deptdata) > 0) {
$servicedeskconfform->department_id->addMultiOption($deptdata['id'], utf8_encode($deptdata['deptname']));
}
}
if ($data['service_desk_id'] != '' && $data['service_desk_id'] != 'NULL') {
$serviceDeptData = $servicedeskdepartmentmodel->getServiceDeskDepartmentDatabyID($data['service_desk_id']);
if (sizeof($serviceDeptData) > 0) {
$servicedeskconfform->service_desk_id->addMultiOption($serviceDeptData[0]['id'], utf8_encode($serviceDeptData[0]['service_desk_name']));
}
}
if ($data['request_recievers'] != '' && $data['request_recievers'] != 'NULL') {
$reqrecieverdata = $employeemodel->getEmployeeDetails($data['request_recievers']);
if (sizeof($reqrecieverdata) > 0) {
$servicedeskconfform->request_recievers->setMultiOptions($reqrecieverdata);
}
$req_recievers_arr = explode(',', $data['request_recievers']);
}
if ($data['cc_mail_recievers'] != '' && $data['cc_mail_recievers'] != 'NULL') {
$ccmaildata = $employeemodel->getEmployeeDetails($data['cc_mail_recievers']);
if (sizeof($ccmaildata) > 0) {
$servicedeskconfform->cc_mail_recievers->setMultiOptions($ccmaildata);
}
}
if ($data['approver_1'] != '' && $data['approver_1'] != 'NULL') {
$approver1data = $employeemodel->getIndividualEmpDetails($data['approver_1']);
if (sizeof($approver1data) > 0) {
$servicedeskconfform->approver_1->addMultiOption($approver1data['user_id'], utf8_encode($approver1data['userfullname']));
}
$approvingauthflag = 1;
}
if ($data['approver_2'] != '' && $data['approver_2'] != 'NULL') {
$approver2data = $employeemodel->getIndividualEmpDetails($data['approver_2']);
if (sizeof($approver2data) > 0) {
$servicedeskconfform->approver_2->addMultiOption($approver2data['user_id'], utf8_encode($approver2data['userfullname']));
}
$approvingauthflag = 2;
}
if ($data['approver_3'] != '' && $data['approver_3'] != 'NULL') {
$approver3data = $employeemodel->getIndividualEmpDetails($data['approver_3']);
if (sizeof($approver3data) > 0) {
$servicedeskconfform->approver_3->addMultiOption($approver3data['user_id'], utf8_encode($approver3data['userfullname']));
}
$approvingauthflag = 3;
}
$bunitModel = new Default_Model_Businessunits();
$bunitdata = $bunitModel->fetchAll('isactive=1', 'unitname');
$servicedeskconfform->businessunit_id->addMultiOptions(array('' => 'Select Business unit', '0' => 'No Business Unit'));
foreach ($bunitdata->toArray() as $bdata) {
$servicedeskconfform->businessunit_id->addMultiOption($bdata['id'], $bdata['unitname']);
}
$servicedeskconfform->setDefault('businessunit_id', $data['businessunit_id']);
$servicedeskconfform->setDefault('approvingauthority', $approvingauthflag);
$this->view->approvingauthflag = $approvingauthflag;
$this->view->service_desk_flag = $data['service_desk_flag'];
$this->view->request_recievers_value = $data['request_recievers'];
$this->view->cc_mail_recievers_value = $data['cc_mail_recievers'] != '' ? $data['cc_mail_recievers'] : '';
$servicedeskconfform->populate($data);
if (count($elements) > 0) {
foreach ($elements as $key => $element) {
if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
$element->setAttrib("disabled", "disabled");
}
}
}
} else {
$this->view->ermsg = 'norecord';
}
} else {
$this->view->ermsg = 'norecord';
}
} else {
$this->view->ermsg = 'norecord';
//.........這裏部分代碼省略.........
示例3: viewAction
public function viewAction()
{
$request_form = new Default_Form_Servicerequest();
$id = $this->_getParam('id', null);
$grid_type = $this->_getParam('t', null);
$status_value = $this->_getParam('v', null);
$req_msg = "";
try {
if ($id != '' && $grid_type != '') {
$grid_type = sapp_Global::_decrypt($grid_type);
$sd_req_model = new Default_Model_Servicerequests();
$grid_type_arr = $sd_req_model->getGridtypearr();
if (is_numeric($id) && $id > 0 && is_numeric($grid_type) && $grid_type > 0 && array_key_exists($grid_type, $grid_type_arr)) {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
$login_bu = $auth->getStorage()->read()->businessunit_id;
$login_dept = $auth->getStorage()->read()->department_id;
}
$data = $sd_req_model->getRequestById($id);
if (!empty($data)) {
$approver_level = "view";
if (($grid_type_arr[$grid_type] == 'rept_app' || $grid_type_arr[$grid_type] == 'approver') && $data['status'] == 'To management approve') {
$approver_level = $sd_req_model->getApproverLevel($loginUserId, $id);
}
$request_history = $sd_req_model->getRequestHistory($id);
$emp_model = new Default_Model_Employee();
$service_conf_model = new Default_Model_Servicedeskconf();
$raised_by_details = $emp_model->getEmp_from_summary($data['raised_by']);
$app_data = $sd_req_model->getApprovers($data['service_desk_conf_id'], "config");
$app_details = $emp_model->getEmployeeDetails(implode(',', $app_data));
foreach ($app_data as $key => $value) {
$app_names[$key] = $app_details[$value];
}
$conf_data = $service_conf_model->getServiceDeskConfbyID($data['service_desk_conf_id']);
$exec_data = $emp_model->getEmployeeDetails($conf_data[0]['request_recievers']);
$this->view->id = $id;
$this->view->data = $data;
$this->view->grid_type = $grid_type_arr[$grid_type];
$this->view->grid_type_arr = $sd_req_model->getGridtypearr_rev();
$this->view->status_value = $status_value;
$this->view->approver_level = $approver_level;
$this->view->loginUserId = $loginUserId;
$this->view->request_history = $request_history;
$this->view->raised_by_details = $raised_by_details;
$this->view->app_names = $app_names;
$this->view->exec_data = $exec_data;
if ($this->getRequest()->getPost()) {
$trDb = Zend_Db_Table::getDefaultAdapter();
// starting transaction
$trDb->beginTransaction();
try {
$req_id = $this->_getParam('hid_reqid', null);
$hid_status = $this->_getParam('hid_status', null);
if ($hid_status != '' && $hid_status == 'Cancelled') {
$save_data = array('status' => $hid_status, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$sd_req_model->SaveorUpdateRequestData($save_data, 'id = ' . $id);
//start of saving history
$reqh_model = new Default_Model_Requesthistory();
$reqh_data = array('request_id' => $id, 'description' => ucfirst($data['service_desk_name']) . " Request has been cancelled by ", 'emp_id' => $loginUserId, 'emp_name' => ucfirst($data['raised_by_name']), 'emp_profileimg' => $auth->getStorage()->read()->profileimg, 'createdby' => $loginUserId, 'modifiedby' => $loginUserId, 'isactive' => 1, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
$reqh_model->SaveorUpdateRhistory($reqh_data, '');
//end of saving history
$req_msg['success'] = "Request cancelled successfully.";
} else {
if ($hid_status != '' && $hid_status == 'To management approve') {
$hid_app_pos = $this->_getParam('hid_app_pos', null);
$hid_max_app = $this->_getParam('hid_max_app', null);
if ($hid_app_pos == '' && $hid_max_app == '') {
$request_comments = trim($this->_getParam('request_comments', null));
if ($request_comments != '') {
$save_data = array('status' => "To management approve", 'to_mgmt_comments' => trim($request_comments), 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$save_data = $save_data + $app_data;
$sd_result = "";
if ($data['status'] == 'Open') {
$sd_result = $sd_req_model->SaveorUpdateRequestData($save_data, 'status = "Open" and id = ' . $id);
}
//start of saving history
$reqh_model = new Default_Model_Requesthistory();
$reqh_data = array('request_id' => $id, 'description' => ucfirst($data['service_desk_name']) . " Request has been sent for management approval by ", 'emp_id' => $loginUserId, 'emp_name' => ucfirst($auth->getStorage()->read()->userfullname), 'emp_profileimg' => $auth->getStorage()->read()->profileimg, 'createdby' => $loginUserId, 'modifiedby' => $loginUserId, 'comments' => trim($request_comments), 'isactive' => 1, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
if ($sd_result == 'update') {
$reqh_model->SaveorUpdateRhistory($reqh_data, '');
//end of saving history
$this->send_req_mails($id);
$req_msg['success'] = "Request sent for management approval successfully.";
} else {
$req_msg['error'] = "Some thing went wrong, please try again.";
}
}
} else {
$request_comments = trim($this->_getParam('request_comments', null));
$request_action = $this->_getParam('request_action', null);
if ($request_comments != '' && $request_action != '') {
$save_data = array('approver_status_' . $approver_level['app_pos'] => $request_action, 'modifiedby' => $loginUserId, 'approver_' . $approver_level['app_pos'] . '_comments' => trim($request_comments), 'modifieddate' => gmdate("Y-m-d H:i:s"));
if ($request_action == 'Reject') {
$save_data['status'] = 'Management rejected';
}
if ($approver_level['app_pos'] == $approver_level['max_app']) {
$save_data['status'] = $request_action == 'Approve' ? "Management approved" : "Management rejected";
//.........這裏部分代碼省略.........