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


PHP DaoFactory::ZaikoBatchPkg方法代码示例

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


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

示例1: perform

 /**
  * PL/SQLのbatch_zaiko_nyuko_dを実行する
  * @see Ethna_ActionClass::perform()
  */
 function perform()
 {
     $package = DaoFactory::ZaikoBatchPkg();
     try {
         $package->beginTransaction();
         $param = array('company_id' => $this->company_id, 'shop_cd' => $this->shop_cd, 'upd_uid' => BATCH_UID, 'upd_pgm' => get_class());
         $package->batch_zaiko_nyuko_d($param);
         $package->commitTransaction();
     } catch (Exception $e) {
         $package->abortTransaction();
         $this->logger->log(LOG_ERR, $e->getMessage());
         die($e->getMessage());
     }
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:18,代码来源:Nyuko.php

示例2: perform

 /**
  * 棚卸調整マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $chousei_date = $this->af->get('chousei_date');
     $chousei = $this->af->get('chousei');
     $biko = $this->af->get('biko');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     // dao
     $zaikoChoseiDDao = DaoFactory::ZaikoChouseiD();
     $zaikoChouseiMDDao = DaoFactory::ZaikoChouseiMD();
     $warehouseDao = DaoFactory::WarehouseMst();
     $productDao = DaoFactory::ProductMst();
     try {
         // begin
         $zaikoChoseiDDao->BeginTransaction();
         //             print_r($chousei);
         if (!empty($chousei)) {
             foreach ($chousei as $warehouseId => $val) {
                 // shop_cd 存在チェック
                 $warehouse = $warehouseDao->Retrieve(' company_id = ? AND warehouse_id = ? ', array('company_id' => $company_id, 'warehouse_id' => $warehouseId));
                 if (empty($warehouse)) {
                     throw new Exception("入力された 倉庫ID: {$warehouseId} は登録されていません");
                 }
                 // 枝番号初期化
                 $edaban = 0;
                 foreach ($val as $product_id => $chousei_num) {
                     // chousei_num 空、0チェック
                     if (!$chousei_num) {
                         continue;
                     }
                     // ゼロ、空文字であればスルー
                     // 調整NOの最大値を取得
                     $chousei_no = intval($zaikoChoseiDDao->maxByColumn('CHOUSEI_NO', " company_id = ? AND terminal_id = '-' AND warehouse_id = ? ", array('company_id' => $company_id, 'warehouse_id' => $warehouseId)));
                     $chousei_no += 1;
                     // D に insert
                     $params = array('company_id' => $company_id, 'terminal_id' => '-', 'chousei_no' => $chousei_no, 'bc_bunrui' => '0', 'warehouse_id' => $warehouseId, 'chousei_date' => array('value' => $chousei_date, 'type' => 'date'), 'nyushutsu_kbn' => '1', 'soshin_flg' => '0', 'zaiko_koshin_flg' => '0', 'biko' => $biko, 'UID' => $s_user_id, 'PGM' => get_class());
                     // 	            		print_r($params);
                     $zaikoChoseiDDao->Insert($params);
                     // MD に insert
                     $edaban += 1;
                     $params = array('company_id' => $company_id, 'terminal_id' => '-', 'chousei_no' => $chousei_no, 'warehouse_id' => $warehouseId, 'edaban' => $edaban, 'bc_1' => '', 'stock_update_flg' => '0', 'product_id' => $product_id, 'suryo' => $chousei_num, 'UID' => $s_user_id, 'PGM' => get_class());
                     $zaikoChouseiMDDao->Insert($params);
                 }
             }
         }
         DaoFactory::ZaikoBatchPkg()->batch_zaiko_chousei_d(array('company_id' => $company_id, 'upd_uid' => $s_user_id, 'upd_pgm' => get_class()));
         // commit
         $zaikoChoseiDDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         //         	print_r($e);
         $zaikoChoseiDDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:64,代码来源:Insert.php


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