當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DaoFactory::StaffMst方法代碼示例

本文整理匯總了PHP中DaoFactory::StaffMst方法的典型用法代碼示例。如果您正苦於以下問題:PHP DaoFactory::StaffMst方法的具體用法?PHP DaoFactory::StaffMst怎麽用?PHP DaoFactory::StaffMst使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DaoFactory的用法示例。


在下文中一共展示了DaoFactory::StaffMst方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: perform

 /**
  * 店舗マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $staff_id = $this->af->get('staff_id');
     $staff_name = $this->af->get('staff_name');
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     try {
         $dao = DaoFactory::StaffMst();
         $dao->BeginTransaction();
         $staff = $dao->Retrieve('company_id = ? AND staff_id = ?', array($company_id, $staff_id));
         if (empty($staff)) {
             $params = array('company_id' => $company_id, 'staff_id' => $staff_id, 'staff_name' => $staff_name, 'UID' => $user_id, 'PGM' => get_class());
             $dao->Insert($params);
         } else {
             $params = array('staff_name' => $staff_name, 'UID' => $user_id, 'PGM' => get_class());
             $dao->Update($params, 'company_id = ? AND staff_id = ?', array($company_id, $staff_id));
         }
         // commit
         $dao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:34,代碼來源:Update.php

示例2: perform

 /**
  * 擔當マスタのデータをJSON形式で返す
  * @access public
  * @return array 擔當マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // 初期化
     $not_staff_id = $this->af->get('not_staff_id');
     $limit = $this->af->get('limit');
     // default 50
     $page = $this->af->get('page');
     // default 1
     $order = $this->af->get('order');
     // default asc
     $column = $this->af->get('column');
     // default warehouse_id
     $keyword = $this->af->get('keyword');
     $company_id = $this->session->get('company_id');
     // pager setting
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     $loginData = unserialize($this->session->get('loginData'));
     try {
         // DAO パラメータ定義
         $params = array('not_staff_id' => $not_staff_id, 'limit' => $limit, 'page' => $page, 'order' => $order, 'column' => $column, 'keyword' => $keyword, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page);
         // 一覧を取得
         $list = DaoFactory::StaffMst()->StaffMst_GetStaffListCdAndName($params)->fetchAll();
         // ページ情報を設定
         $pager = array('result_page' => $page, 'result_start_num' => $start_page, 'result_end_num' => $end_page, 'result_all_count' => count($list) ? $list[0]['FOUND_ROWS'] : 0, 'result_get_count' => count($list), 'result_limit' => $limit);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $list;
         $output['pagerData'] = $pager;
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:41,代碼來源:Get.php

示例3: perform

 /**
  * 擔當マスタの削除処理
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $staff_id_arr = $this->af->get('staff_id_arr');
     // get session params
     $company_id = $this->session->get('company_id');
     // dao
     $staffDao = DaoFactory::StaffMst();
     try {
         // begin
         $staffDao->BeginTransaction();
         $params = array('company_id' => $company_id);
         if ($_REQUEST['del'] == 'all') {
             $staffDao->Delete(' company_id = ? ', $params);
         } else {
             foreach ($staff_id_arr as $staff_id) {
                 $params['staff_id'] = $staff_id;
                 $staffDao->Delete(' company_id = ? AND staff_id = ? ', $params);
             }
         }
         $staffDao->CommitTransaction();
     } catch (Exception $e) {
         $staffDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:33,代碼來源:Delete.php

示例4: perform

 /**
  * 擔當編集のビュー名を返す
  * @access public
  * @return string ビュー名
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     $staff_id = $this->af->get('staff_id');
     $staff = DaoFactory::StaffMst()->Retrieve('staff_id = ?', array($staff_id));
     $this->af->set('staff_name', $staff['STAFF_NAME']);
     return 'master_staff_detail_edit';
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:13,代碼來源:Edit.php

示例5: perform

 /**
  * 擔當マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $staff_id = $this->af->get('staff_id');
     $staff_name = $this->af->get('staff_name');
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     // dao
     $staffDao = DaoFactory::StaffMst();
     try {
         // begin
         $staffDao->BeginTransaction();
         // pk 重複チェック
         $exist = $staffDao->Retrieve(' company_id = ? AND staff_id = ?  ', array($company_id, $staff_id));
         if (!empty($exist)) {
             $def1 = $this->af->getDef('staff_id');
             $err_msg = array('staff_id' => "入力された" . $def1['name'] . "は既に登録されています");
             return array(400, $err_msg);
         }
         // set params
         $params = array('staff_id' => $staff_id, 'staff_name' => $staff_name, 'company_id' => $company_id, 'UID' => $user_id, 'PGM' => get_class());
         // dao insert
         $staffDao->Insert($params);
         // commit
         $staffDao->CommitTransaction();
     } catch (Exception $e) {
         $staffDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:38,代碼來源:Insert.php

示例6: getArrayOption_staff_id

 /**
  * 擔當者の取得
  * @param string $name フォーム名
  */
 public function getArrayOption_staff_id()
 {
     $ret[''] = '';
     $company_id = $this->backend->getSession()->get('company_id');
     $list = DaoFactory::StaffMst()->Select(" company_id = ? order by staff_id ", array($company_id));
     foreach ($list as $val) {
         $ret[$val['STAFF_ID']] = $val['STAFF_ID'] . ':' . $val['STAFF_NAME'];
     }
     return $ret;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:14,代碼來源:Search.php

示例7: check_staff_not_exists

 /**
  * リクエストの端末IDがDBに登録されていないことをチェックする
  * @param string $name フォーム名
  */
 public function check_staff_not_exists($name)
 {
     // パラメータを取得
     $params = array('company_id' => $this->backend->getSession()->get('company_id'), 'staff_id' => $this->form_vars['staff_id']);
     $staff = DaoFactory::StaffMst()->Retrieve(' company_id = ? AND staff_id = ? ', $params);
     // 存在する場合
     if (!empty($terminal)) {
         $this->ae->add($name, "入力された{form}は既に登録されています", E_FORM_INVALIDCHAR);
     }
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:14,代碼來源:Control.php

示例8: perform

 function perform()
 {
     //パラメータ取得
     $company_name = $this->af->get('company_name');
     $address = $this->af->get('address');
     $contact = $this->af->get('contact');
     $tel = $this->af->get('tel');
     $mail = $this->af->get('mail');
     $psw = $this->af->get('psw');
     $psw2 = $this->af->get('psw2');
     $uuid = $this->af->get('uuid');
     $locale = $this->af->get('locale');
     if ($locale == "zh-Hans") {
         $default_locale = "zh-Hans-CN";
     } elseif ($locale == "ja") {
         $default_locale = "ja_JP";
     } else {
         $default_locale = "en_US";
     }
     $params = array('company_name' => $company_name, 'address' => $address, 'contact' => $contact, 'company_tel' => $tel, 'mail' => $mail, 'UID' => 'terminal', 'PGM' => get_class());
     try {
         //fixme
         $dao = DaoFactory::CompanyMst();
         $wdao = DaoFactory::WarehouseMst();
         $tdao = DaoFactory::TerminalMst();
         $sdao = DaoFactory::StaffMst();
         $tudao = DaoFactory::TerminalUdidMst();
         $dao->BeginTransaction();
         $company_id = $dao->getNewCompanyId();
         $argu = array('company_id' => $company_id, 'example_id' => $this->config->get('template_company_id'), 'uuid' => $uuid, 'upd_uid' => 'terminal', 'upd_pgm' => get_class());
         $dao->addNewCompanyForApi($argu);
         $where = ' COMPANY_ID = ? ';
         $bind = array($company_id);
         $dao->Update($params, $where, $bind);
         $wdao->Update(array('address' => $address, 'warehouse_tel' => $tel, 'contact' => $contact, 'UID' => 'terminal', 'PGM' => get_class()), $where, $bind);
         $sdao->Update(array('staff_tel' => $tel, 'UID' => 'terminal', 'PGM' => get_class()), $where, $bind);
         $tdao->Update(array('password' => $psw, 'UID' => 'terminal', 'PGM' => get_class()), $where, $bind);
         $tudao->Update(array('terminal_id' => $terminal_id, 'udid' => $udid, 'UID' => 'terminal', 'PGM' => get_class()), $where, $bind);
         DaoFactory::UserMst()->Update(array('user_pwd' => $psw, 'UID' => 'terminal', 'PGM' => get_class(), 'E_MAIL' => $mail, 'DEFAULT_LOCALE' => $default_locale), $where, $bind);
         $warehouse_id = $wdao->getMaxWarehouseIdByCompany(array('company_id' => $company_id));
         $terminal_id = $tdao->getMaxTerminalIdByCompany(array('company_id' => $company_id));
         $staff_id = $sdao->getMaxStaffIdByCompany(array('company_id' => $company_id));
         //commit
         $dao->CommitTransaction();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     mb_language('uni');
     if ($locale == 'ja') {
         $subject = "{$this->config->get('system_name')}利用開始のご案內";
         $message = "\r\n{$company_name} \r\n{$contact} 様\r\n\r\nこの度は「{$this->config->get('system_name')}」サービスにご登録いただきまして、誠にありがとうございます。\r\n本メールは iPhone/iPod touch の {$this->config->get('app_name')}アプリからアカウント申請を行っていただいた方に自動送信されています。\r\n本メールの心當たりがない場合は、本メールの破棄と弊社までご連絡頂ますようお願い申し上げます。\r\n\r\nアカウント申請後は {$this->config->get('app_name')}アプリのログイン畫麵にて申請時に入力したパスワードでログインが可能です。\r\n新規でご登録していただいたアカウントには端末1台2ヶ月まで無料ご利用いただけます。\r\n別の端末でログインするには、管理畫麵から端末追加登録とライセンス購入する必要がございます。\r\nライセンスのご購入はライセンスマスタ管理畫麵の購入リンクを押すか、直接AsShopにて、オンラインにてご購入いただけます。\r\n\r\nアカウント申請に伴い {$this->config->get('system_name')}に下記の情報が登録されています。\r\n-----------------アカウント情報------------------\r\n\t   會社ID:{$company_id}\r\n  初期管理者ユーザID:admin\r\n  管理者パスワード:申請時ご入力いただいたパスワード (端末のログインパスワードも同じです)※セキュリティのためパスワード本メールに含んでいません\r\n  WEB管理畫麵URL: {$this->config->get('url')}?company_id={$company_id}\r\n  \r\n------------------デモ情報-------------------------\r\n**登録後すぐに端末からログインし、ご利用いただけるように、上記のアカウント情報以外に\r\n下記必要なデモデータも自動的に作成されています。\r\n  倉庫/場所/発注先 コード:{$warehouse_id}\r\n  端末ID:{$terminal_id}\r\n  擔當者ID:{$staff_id}\r\n---------------------------------------------------\r\n\r\n本サービスはiPhone/iPod touch用バーコードリーダー「AsReader」を併用すると更に便利にご利用になれます。\r\n詳しくはホームページまで。\r\nhttp://asreader.com/\r\n\r\n本サービスご利用にあたり、質問などお困りの時がございましたら、下記のサイトまでご參照ください。\r\nサービスホーム http://www.asx4.net\r\nAsWiki https://wiki.asx4.net\r\nAsHelp https://support.asx4.net\r\nAsShop  https://ec.asx4.net\r\n\r\n ";
     } elseif ($locale == 'zh-Hans') {
         $subject = "{$this->config->get('app_name')}服務使用向導";
         $message = "\r\n{$company_name} \r\n{$contact} 您好!\r\n        \t\r\n非常感謝您登錄{$this->config->get('app_name')}。\r\n這封郵件是在您通過iPhone/iPod touch的{$this->config->get('app_name')}應用程序,申請賬號時自動發送給您的。\r\n如果您對該郵件不知情,請銷毀本郵件並與我們聯係。\r\n        \t\r\n賬戶申請後,您就可以使用申請賬號時所設置的密碼在 {$this->config->get('app_name')}應用程序的登錄畫麵中登錄使用了。\r\n新注冊的賬號裏已自動生成1台終端,可免費使用兩個月。\r\n如需新增使用其他終端,需要在管理畫麵中的“終端管理”進行終端添加並購買證書後方可使用。\r\n        \t\r\n以下是您所申請的{$this->config->get('app_name')}賬戶的相關信息。\r\n-----------------賬戶信息------------------\r\n\t   公司ID:{$company_id}\r\n \t   管理員ID:admin\r\n\t   管理員密碼:申請賬戶時填寫的密碼 (與終端登錄密碼相同)\r\n\t   WEB管理頁麵URL: {$this->config->get('url')}?company_id={$company_id}\r\n        \t        \r\n------------------模板信息-------------------------\r\n**為了在注冊後您可以馬上使用終端登錄來體驗我們的服務,除以上賬戶信息外,\r\n我們也為你創建了以下必要的基本信息。\r\n\t   倉庫/場所/供貨方 代碼:{$warehouse_id}\r\n\t   終端ID:{$terminal_id}\r\n\t   操作員ID:{$staff_id}\r\n---------------------------------------------------\r\n        \t\r\n如在使用本服務中遇到任何問題,請查看以下相關網站。\r\n服務總站 http://www.asx4.net\r\nAsWiki https://wiki.asx4.net\r\nAsHelp https://support.asx4.net\r\nAsShop  https://ec.asx4.net    \r\n    \t\r\n";
     } else {
         $subject = "Thank you for signing up {$this->config->get('app_name')} service";
         $message = "\r\n{$company_name} \r\nHi {$contact} \r\n        \t \r\nThank you for signing up our service {$this->config->get('app_name')}. \r\nThis mail is sent to every user who has registered an new account from our iOS app {$this->config->get('app_name')}.\r\nPlease feel free to contact us if you were not aware that you were going to receive it.\r\n        \t \r\nYou can login to the app {$this->config->get('app_name')} with the password you have input in the register form upon receipt of this email.\r\n        \t \r\nAccount Information:\r\n-----------------Account info------------------\r\n\t   Company ID:{$company_id}\r\n\t   Admin User ID:admin\r\n\t   Password:The password you set in registration form\r\n\t   Admin page URL: {$this->config->get('url')}?company_id={$company_id}\r\nEvery new account is assoiated with one preset terminal with a 2month free license.\r\nIf you want more terminals or longer licenses, please create terminal in the back-end admin system and buy license from our online shop.\r\n\r\n------------------demo data-------------------------\r\nBesides the account information above, we have also created some demo datas in order to help you test or learn our system easier.\r\n\t   Warehouse/Place/Seller ID:{$warehouse_id}\r\n\t   Terminal ID:{$terminal_id}\r\n\t   Staff ID:{$staff_id}\r\n---------------------------------------------------\r\n        \t                         \r\nOur app support AsReader 100% internally. AsReader is a series of hardware for iOS devices, they have ability to scan barcode or RFID tags and send the data to iOS devices.\r\nSo, it can easily turn your iPhones/iPods into a powerful handheld termials.\r\nfor more information, please refer to their official site:\r\nhttp://asreader.com/\r\n\r\nIf you have any question during using our service, please consult our following site for more information.\r\nService Home  http://www.asx4.net\r\nAsWiki        https://wiki.asx4.net\r\nAsHelp        https://support.asx4.net\r\nAsShop        https://ec.asx4.net\r\n\r\nBest regards,\r\n\r\nAsApps Team\r\n        \t     \r\n";
     }
     $headers = "From: {$this->config->get('admin_email_address')}";
     mb_send_mail($mail, $subject, $message, $headers);
     $output['company_id'] = $company_id;
     $output['warehouse_id'] = $warehouse_id;
     $output['terminal_id'] = $terminal_id;
     $output['staff_id'] = $staff_id;
     $output['server_url'] = $this->config->get('url');
     return array('json', $output);
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:70,代碼來源:Entry.php


注:本文中的DaoFactory::StaffMst方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。