本文整理汇总了PHP中DaoFactory::StockCheckMD方法的典型用法代码示例。如果您正苦于以下问题:PHP DaoFactory::StockCheckMD方法的具体用法?PHP DaoFactory::StockCheckMD怎么用?PHP DaoFactory::StockCheckMD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DaoFactory
的用法示例。
在下文中一共展示了DaoFactory::StockCheckMD方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: perform
function perform()
{
//パラメータ取得
$company_id = $this->af->get('company_id');
$warehouse_id = $this->af->get('warehouse_id');
$date_from = $this->af->get('date_from');
$date_to = $this->af->get('date_to');
$dao = DaoFactory::StockCheckMD();
try {
$params = array('company_id' => $company_id, 'warehouse_id' => $warehouse_id, 'date_from' => $date_from, 'date_to' => $date_to);
$output = $dao->getAllWithZaikoDiff($params);
} catch (Exception $e) {
// 致命的なエラーが発生
$this->logger->log(LOG_DEBUG, $e->getTraceAsString());
return array('500', $e->getMessage());
}
return array('json', $output);
}
示例2: perform
/**
* 棚卸調整一覧のデータをJSON形式で返す
* @access public
* @return array 期間単価マスタ
* @see Admin_ActionClass::perform()
*/
public function perform()
{
// 初期化
$product_id = $this->af->get('product_id');
$product_name = $this->af->get('product_name');
$warehouse_id = $this->af->get('warehouse_id');
$start_date = $this->af->get('start_date');
$end_date = $this->af->get('end_date');
$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 shop_cd
$keyword = $this->af->get('keyword');
$company_id = $this->session->get('company_id');
// setting pager
$start_page = ($page - 1) * $limit + 1;
$end_page = ($page - 1) * $limit + $limit;
try {
// DAO 取得
$stockCheckDao = DaoFactory::StockCheckMD();
$params = array('product_id' => $product_id, 'product_name' => $product_name, 'warehouse_id' => $warehouse_id, 'start_date' => $start_date, 'end_date' => $end_date, 'start_page' => $start_page, 'end_page' => $end_page, 'order' => $order, 'column' => $column, 'keyword' => $keyword, 'company_id' => $company_id);
// 一覧を取得
$list = $stockCheckDao->getAdjustmentList($params)->fetchAll(PDO::FETCH_ASSOC);
// ページ情報を設定
$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);
}