本文整理汇总了PHP中DaoFactory::NyushutsuD方法的典型用法代码示例。如果您正苦于以下问题:PHP DaoFactory::NyushutsuD方法的具体用法?PHP DaoFactory::NyushutsuD怎么用?PHP DaoFactory::NyushutsuD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DaoFactory
的用法示例。
在下文中一共展示了DaoFactory::NyushutsuD方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
示例2: perform
/**
* 入出履歴一覧のデータを返す
* @access public
* @return array 入出履歴一覧
* @see Admin_ActionClass::perform()
*/
public function perform()
{
// get request params ( search )
$warehouse_id = $this->af->get('warehouse_id');
$product_id = $this->af->get('product_id');
$product_name = $this->af->get('product_name');
$nyushutsu_date_from = $this->af->get('nyushutsu_date_from');
$nyushutsu_date_to = $this->af->get('nyushutsu_date_to');
$denpyo_no = $this->af->get('denpyo_no');
$keyword = $this->af->get('keyword');
// 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
// 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 {
$dao = DaoFactory::NyushutsuD();
//検索
$params = array('warehouse_id' => $warehouse_id, 'product_id' => $product_id, 'product_name' => $product_name, 'nyushutsu_date_from' => $nyushutsu_date_from, 'nyushutsu_date_to' => $nyushutsu_date_to, 'denpyo_no' => $denpyo_no, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page, 'order' => $order, 'column' => $column, 'keyword' => $keyword);
$list = $dao->NyushutsuD_GetNyushutsuList($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);
// output にセット
$output['totalData'] = array();
$output['listData'] = $list;
$output['pagerData'] = $pagerData;
} catch (Exception $e) {
// 致命的なエラーが発生
$this->logger->log(LOG_DEBUG, $e->getTraceAsString());
return array('500', $e->getMessage());
}
return array('json', $output);
}