Example #1
0
 private function getVacaionLeftQty($user_id)
 {
     $user = new Application_Model_User();
     $employeeInfo = $user->getEmployeeInfoById($user_id);
     $storage = new Hra_Model_Vacationstorage();
     $storage->refreshStorage($employeeInfo['id']);
     // 刷新当前员工最近一年的年假(如果没有刷新过的话)
     $qty = $storage->getVacationQty($employeeInfo['number']);
     return $qty['qty'];
 }
Example #2
0
 public function refreshvacationstorageAction()
 {
     $result = array('success' => true, 'info' => '刷新成功');
     $request = $this->getRequest()->getParams();
     $employee_id = isset($request['employee_id']) ? $request['employee_id'] : null;
     $cover = isset($request['cover']) ? $request['cover'] : 0;
     $storage = new Hra_Model_Vacationstorage();
     $result = $storage->refreshStorage($employee_id, $cover);
     echo Zend_Json::encode($result);
     exit;
 }