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


PHP DaoFactory::StockInD方法代码示例

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


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

示例1: perform

 /**
  * 入庫Gs128のデータを返す
  * @access public
  * @return array 入庫Gs128
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $warehouse_id = $this->af->get('warehouse_id');
     $terminal_id = $this->af->get('terminal_id');
     $stock_in_no = $this->af->get('stock_in_no');
     $seq = $this->af->get('seq');
     $keyword = $this->af->get('keyword');
     // get request params ( pager )
     // 		$limit = $this->af->get('limit');				// default 50
     $limit = 500;
     $page = $this->af->get('page');
     // default 1
     $order = $this->af->get('order');
     // default desc
     $column = $this->af->get('column');
     // default uriage_bi
     // get session params
     $company_id = $this->session->get('company_id');
     // setting pager
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     $output = array();
     try {
         $stock = DaoFactory::StockInD();
         //検索
         $params = array();
         $params = array('company_id' => $company_id, 'warehouse_id' => array($warehouse_id), 'terminal_id' => array($terminal_id), 'stock_in_no' => $stock_in_no, 'seq' => $seq);
         $total = $stock->getStockinDetailList($params);
         if (empty($total)) {
             $total[0] = array();
         }
         $params['warehouse_id'] = $warehouse_id;
         $params['terminal_id'] = $terminal_id;
         $params['start_page'] = $start_page;
         $params['end_page'] = $end_page;
         $params['order'] = $order;
         $params['column'] = $column;
         $params['keyword'] = $keyword;
         $list = $stock->getStockinGs128List($params);
         // pager array setting
         $pagerData = 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, 'hyoji_kbn' => $hyoji_kbn);
         // output にセット
         $output['totalData'] = $total[0];
         $output['listData'] = $list;
         $output['pagerData'] = $pagerData;
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:58,代码来源:Get.php

示例2: perform

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

示例3: perform

 /**
  * xxxの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     $flg = $this->af->get('flg');
     $company_id = $this->session->get('company_id');
     $params = array('company_id' => $company_id);
     try {
         $methodarr = array();
         $methodarr[] = 'setStockInMDShohinCdNullForGtin14';
         $methodarr[] = 'setStockInMDShohinCdNullForBarcode';
         $methodarr[] = 'setStockInMDShohinCdNullByAi';
         $dao = DaoFactory::StockInD();
         $dao->BeginTransaction();
         // 一覧を取得
         $null_num_before = $dao->getStockInMDShohinCdNullCount($params);
         $res = false;
         foreach ($methodarr as $method) {
             $res = $dao->{$method}($params);
             if (!$res) {
                 throw new Exception("DB更新が失敗しました");
             }
         }
         $null_num_after = $dao->getStockInMDShohinCdNullCount($params);
         $dao->CommitTransaction();
         $dir = dirname(BASE) . DIRECTORY_SEPARATOR . 'batch';
         exec('php ' . $dir . DIRECTORY_SEPARATOR . 'batch_zaiko_all.php ' . $company_id . ' > /dev/null &');
         $output = array();
         $output['result'] = '0';
         $output['updated_count'] = intval($null_num_before) - intval($null_num_after);
         $output['null_num'] = $null_num_after;
         return array('json', $output);
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:43,代码来源:Hikiate.php

示例4: perform

 /**
  * 入庫一覧のデータを返す
  *
  * @access public
  * @return array 入庫一覧
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $hyoji_kbn = $this->af->get('hyoji_kbn');
     $start_date = $this->af->get('start_date');
     $end_date = $this->af->get('end_date');
     $warehouse_id_arr = $this->af->get('warehouse_id_arr');
     $terminal_id_arr = $this->af->get('terminal_id_arr');
     $staff_id_arr = $this->af->get('staff_id_arr');
     $shohin_cd = trim($this->af->get('shohin_cd'));
     $shohin_mei = trim($this->af->get('shohin_mei'));
     $barcode = trim($this->af->get('barcode'));
     $stock_update_flg = trim($this->af->get('stock_update_flg'));
     $keyword = $this->af->get('keyword');
     $ai = $this->af->get('ai');
     $ai_cd = $this->af->get('ai_cd');
     // get request params ( pager )
     $limit = $this->af->get('limit');
     // default 50
     $page = $this->af->get('page');
     // default 1
     $order = $this->af->get('order');
     // default desc
     $column = $this->af->get('column');
     // default uriage_bi
     if ($hyoji_kbn == '1' && ($column == 'shohin_cd' || $column == 'shohin_mei' || $column == 'barcode' || $column == 'stock_update_flg')) {
         $column = '';
     }
     if ($column == 'stock_in_no') {
         $column = 'to_number(stock_in_no)';
     }
     // get session params
     $company_id = $this->session->get('company_id');
     // setting pager
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     $output = array();
     $ai_arr = array();
     if ('' != $ai) {
         $tmparr = explode(';', $ai);
         foreach ($tmparr as $value) {
             $row = explode('=', $value);
             $ai_arr[] = '%(' . str_replace('y', '_', $row[0]) . ')' . $row[1] . '%';
         }
     }
     try {
         $stock = DaoFactory::StockInD();
         // 検索
         $params = array();
         $params = array('company_id' => $company_id, 'start_date' => $start_date, 'end_date' => $end_date, 'start_page' => $start_page, 'warehouse_id' => $warehouse_id_arr, 'terminal_id' => $terminal_id_arr, 'staff_id' => $staff_id_arr, 'shohin_cd' => $shohin_cd, 'shohin_mei' => $shohin_mei, 'stock_update_flg' => $stock_update_flg, 'barcode' => $barcode, 'ai_arr' => $ai_arr, 'end_page' => $end_page, 'order' => $order, 'column' => $column, 'keyword' => $keyword);
         if ($hyoji_kbn == '1') {
             $list = $stock->getStockInList($params);
         } else {
             $list = $stock->getStockInDetailList($params);
         }
         // pager array setting
         $pagerData = 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, 'hyoji_kbn' => $hyoji_kbn);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $list;
         $output['pagerData'] = $pagerData;
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:74,代码来源:Get.php


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