当前位置: 首页>>代码示例>>PHP>>正文


PHP DaoFactory类代码示例

本文整理汇总了PHP中DaoFactory的典型用法代码示例。如果您正苦于以下问题:PHP DaoFactory类的具体用法?PHP DaoFactory怎么用?PHP DaoFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DaoFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: perform

 /**
  * PL/SQLのbatch_zaiko_allを実行する
  * @see Ethna_ActionClass::perform()
  */
 function perform()
 {
     try {
         $this->alterDao = DaoFactory::AlterSql();
         $this->alterDao->BeginTransaction();
         $app_name = $this->config->get('app_name');
         // 更新所有项目
         $this->AlterDB_21275();
         $this->ModifyData_21275();
         if ($app_name == 'AsOrder') {
             //AsOrderのみ
         } elseif ($app_name == 'AsCount') {
             //AsCountのみ
         } elseif ($app_name == 'AsZai') {
             //AsZaiのみ
         }
         $params = array('CURRENT_VERSION' => $this->config->get('code_version'), 'UID' => 'script', 'PGM' => 'batch');
         DaoFactory::SystemInfo()->Update($params);
         $this->alterDao->CommitTransaction();
     } catch (Exception $e) {
         $this->alterDao->AbortTransaction();
         $this->logger->log(LOG_ERR, $e->getMessage());
         die($e->getMessage());
     }
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:29,代码来源:U026000.php

示例2: validateParams

 function validateParams($params)
 {
     $error_message_list = array();
     // 現在のパスワード
     $UserMst = DaoFactory::UserMst();
     $userData = $UserMst->UserMst_GetByUserId($params);
     if ($params['current_pwd'] == '') {
         $error_message_list['current_pwd'] = '現在のパスワードが入力されていません。';
     } else {
         if ($userData['USER_PWD'] != $params['current_pwd_hash']) {
             $error_message_list['current_pwd'] = '現在のパスワードが正しくありません。';
         }
     }
     // 新しいパスワード
     if ($params['new_pwd1'] == '') {
         $error_message_list['new_pwd1'] = '新しいパスワードが入力されていません。';
     }
     // 新しいパスワード(確認用)
     if ($params['new_pwd2'] == '') {
         $error_message_list['new_pwd2'] = '新しいパスワード(確認用)が入力されていません。';
     }
     if ($params['new_pwd1'] != $params['new_pwd2']) {
         $error_message_list['new_pwd1'] = '二つの新しいパスワードの入力内容が異なっています。';
     }
     return $error_message_list;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:26,代码来源:Update.php

示例3: getFactory

 /**
  * Get a factory instance. 
  * @return DaoFactory
  */
 public static function getFactory()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
开发者ID:jescacena,项目名称:cispAPI,代码行数:11,代码来源:class.DaoFactory.inc.php

示例4: perform

 /**
  * 出庫一覧の保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     set_time_limit(DEFAULT_CSV_PROCESS_TIME_LIMIT);
     // 初期化
     $nyushutsu_date_from = $this->af->get('nyushutsu_date_from');
     $nyushutsu_date_to = $this->af->get('nyushutsu_date_to');
     $warehouse_id = $this->af->get('warehouse_id');
     $product_id = $this->af->get('product_id');
     $product_name = $this->af->get('product_name');
     $denpyo_no = $this->af->get('denpyo_no');
     $record_arr = $this->af->get('record_arr');
     $keyword = $this->af->get('keyword');
     $company_id = $this->session->get('company_id');
     if (!empty($record_arr)) {
         $params = array('company_id' => $company_id, 'record_arr' => $record_arr);
     } else {
         $params = array('company_id' => $company_id, 'nyushutsu_date_from' => $nyushutsu_date_from, 'nyushutsu_date_to' => $nyushutsu_date_to, 'product_id' => $product_id, 'product_name' => $product_name, 'warehouse_id' => $warehouse_id, 'denpyo_no' => $denpyo_no, 'keyword' => $keyword);
     }
     try {
         // 一覧を取得
         $sth = DaoFactory::NyushutsuD()->getStoragerecordCsvData($params);
         // 書き込みクラスを生成
         require_once 'csv/NyushutsuDCsvWriter.class.php';
         $writer = new NyushutsuDCsvWriter();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('csv', $writer, $sth, 'NyushutsuD' . date('YmdHis') . '.csv');
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:36,代码来源:Export.php

示例5: perform

 /**
  * AIカスタムマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // 初期化
     $ai = $this->af->get('ai');
     $ai_name = $this->af->get('ai_name');
     $company_id = $this->session->get('company_id');
     $data_length = $this->af->get('data_length');
     $gtin14 = $this->af->get('gtin14');
     $user_id = $this->session->get('user_id');
     try {
         // 保存
         $dao = DaoFactory::AicustomMst();
         $dao->BeginTransaction();
         // WAREHOUSE_MSTに保存
         $params = array('ai_name' => $ai_name, 'data_length' => $data_length, 'UID' => $user_id, 'PGM' => get_class());
         // AIカスタムコード存在チェック
         //             $exist = $dao->Retrieve(' ai = ? AND company_id = ?  ', array($ai, $company_id));
         //             if(!is_array($exist)){
         //                 $def1 = $this->af->getDef('ai');
         //                 $err_msg = array(
         //                     'ai' =>  $def1['name'] ."が登録されていません",
         //                 );
         //                 return array(400, $err_msg);
         //             }
         $dao->Update($params, 'ai = ? and gtin14 = ? and company_id = ? ', array($ai, $gtin14, $company_id));
         $dao->CommitTransaction();
     } catch (Exception $e) {
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     return array('json', array('status' => '200'));
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:38,代码来源:Update.php

示例6: perform

 /**
  * 区分マスタのデータをJSON形式で返す
  * @access public
  * @return array 区分マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $buyer_cd = $this->af->get('buyer_cd');
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'buyer_cd' => $buyer_cd);
         // 詳細を取得
         $detail = DaoFactory::BuyerMst()->getBuyerByKeys($params);
         $detail['TERMINAL_ID'] = DaoFactory::BuyerMst()->GetAllTerminalsByBuyerCD($params);
         $detail['USER_ID'] = DaoFactory::BuyerMst()->GetAllUsersByBuyerCD($params);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $detail;
         $output['pagerData'] = array();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:31,代码来源:Get.php

示例7: perform

 /**
  * バーコードパターンマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $arr_data = $this->af->get('arr_data');
     // get session params
     $company_id = $this->session->get('company_id');
     // dao
     $BarcodePatternMstDao = DaoFactory::BarcodePatternMst();
     file_put_contents('/tmp/aszai_arr_datasss', var_export($arr_data, true));
     try {
         // mod params
         // start transaction
         $BarcodePatternMstDao->BeginTransaction();
         foreach ($arr_data as $key => $value) {
             // set dao params
             $params = array('regex' => $value, 'UID' => $user_id, 'PGM' => get_class());
             // update
             $BarcodePatternMstDao->Update($params, ' company_id = ? and data_type = ? ', array($company_id, $key));
         }
         // commit transaction
         $BarcodePatternMstDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $BarcodePatternMstDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:34,代码来源:Update.php

示例8: 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

示例9: perform

 /**
  * ロールマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $role_id_arr = $this->af->get('role_id_arr');
     // get session params
     $s_user_id = $this->session->get('user_id');
     $company_id = $this->session->get('company_id');
     // dao
     $roleDao = DaoFactory::RoleMst();
     $menuRoleDDao = DaoFactory::MenuRoleD();
     try {
         // begin
         $roleDao->BeginTransaction();
         $params = array('company_id' => $company_id);
         if ($_REQUEST['del'] == 'all') {
             $roleDao->Delete(' company_id = ? ', $params);
             $menuRoleDDao->Delete(' company_id = ? ', $params);
         } else {
             foreach ($role_id_arr as $role_id) {
                 $where = ' company_id = ? AND role_id = ? ';
                 $params['role_id'] = $role_id;
                 $roleDao->Delete($where, $params);
                 $menuRoleDDao->Delete($where, $params);
             }
         }
         // commit
         $roleDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $roleDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:40,代码来源:Delete.php

示例10: 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

示例11: perform

 /**
  * 店舗マスタのデータをJSON形式で返す
  * @access public
  * @return array 店舗マスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $warehouse_id = $this->af->get('warehouse_id');
     // get session params
     $company_id = $this->session->get('company_id');
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'warehouse_id' => $warehouse_id);
         // 詳細を取得
         $detail = DaoFactory::WarehouseMst()->Retrieve(' company_id = ? AND warehouse_id = ? ', $params);
         unset($detail['COMPANY_ID']);
         // パスワードは出力させない
         if ('' != $detail['STOCK_MOVE_RCV_WAYS']) {
             $arr = explode(',', $detail['STOCK_MOVE_RCV_WAYS']);
         } else {
             $arr = array();
         }
         foreach ($arr as $value) {
             $detail['STOCK_MOVE_RCV_WAYS[' . $value . ']'] = 1;
         }
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $detail;
         $output['pagerData'] = array();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:37,代码来源:Get.php

示例12: perform

 /**
  * ユーザマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $user_id_arr = $this->af->get('user_id_arr');
     // get session params
     $s_user_id = $this->session->get('user_id');
     $company_id = $this->session->get('company_id');
     // dao
     $userDao = DaoFactory::UserMst();
     try {
         // begin
         $userDao->BeginTransaction();
         if ($_REQUEST['del'] == 'all') {
             $userDao->Delete(' company_id = ? AND user_id <> ? ', array($company_id, $s_user_id));
         } else {
             foreach ($user_id_arr as $user_id) {
                 $userDao->Delete('company_id = ? AND user_id = ? ', array($company_id, $user_id));
             }
         }
         // commit
         $userDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:34,代码来源:Delete.php

示例13: perform

 function perform()
 {
     //パラメータ取得
     $company_id = $this->af->get('company_id');
     $warehouse_id = $this->af->get('warehouse_id');
     $product_id = $this->af->get('product_id');
     $keyword = $this->af->get('keyword');
     $bc_1 = $this->af->get('bc_1');
     $ai = $this->af->get('ai');
     $ai_arr = array();
     if (!empty($ai)) {
         foreach ($ai as $key => $value) {
             $ai_arr[] = '%(' . str_replace('y', '_', $key) . ')' . $value . '%';
         }
     }
     try {
         $dao = DaoFactory::ZaikoD();
         $params = array('company_id' => $company_id, 'warehouse_id' => $warehouse_id, 'product_id' => $product_id, 'barcode' => $bc_1, 'keyword' => $keyword, 'ai_arr' => $ai_arr);
         $output = $dao->searchZaikoListForApi($params);
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:26,代码来源:List.php

示例14: 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

示例15: perform

 function perform()
 {
     //パラメータ取得
     $order_id = $this->af->get('order_id');
     $service_list = json_decode($this->af->get('service_list'), true);
     $user_id = $this->session->get('user_id');
     $params = array('order_id' => $order_id, 'service_list' => $service_list, 'pgm' => get_class(), 'uid' => $user_id);
     try {
         $dao = DaoFactory::LicenseMst();
         $exist = $dao->Retrieve(' ORDER_ID = ? ', array($order_id));
         if (!empty($exist)) {
             echo 0;
             exit;
         }
         $dao->BeginTransaction();
         $dao->insertNewLicense($params);
         //commit
         $dao->CommitTransaction();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     echo 0;
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:27,代码来源:Entry.php


注:本文中的DaoFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。