/** * 画面表示のためのテンプレート初期化 */ public function &Anken_Edit_getInitData() { $data = array(); // 締め日 $enum = new ShimeDayEnum(); $data['shime_day'] = $enum->getArray(); // 案件カテゴリ $enum = new AnkenGategoryEnum(); $data['category'] = $enum->getArray(); // 実施タイプ $enum = new AnkenTypeEnum(); $data['type'] = $enum->getArray(); // 案件種別 $enum = new AnkenSyubetsuEnum(); $data['syubetsu'] = $enum->getArray(); // 案件タイプ $enum = new AnkenType2Enum(); $data['type2'] = $enum->getArray(); // 成果地点 $enum = new AnkenSeikaPointEnum(); $data['seika_point'] = $enum->getArray(); // デバイス $enum = new AnkenDeviceEnum(); $data['device'] = $enum->getArray(); //↓↓===========nm00189 2010/03/29 start=================================== // 成果計測方式追加 $enum = new AnkenSeikaCountTypeEnum(); $data['seika_count_type'] = $enum->getArray(); //↑↑===========nm00189 2010/03/29 end===================================== // クライアント $list =& $this->Anken_Edit_getClientList(); $data['client_list'] = $list; // 入力モード $data['input_type'] = 'input'; // 成果UL時紐付けID $enum = new AcceptUseActionIdEnum(); $data['accept_use_action_id'] = $enum->getArray(); // 成果 $enum = new AcceptDankaiEnum(); $data['accept_dankai'] = $enum->getArray(); // 成果承認 $enum = new AutoAcceptEnum(); $data['auto_accept'] = $enum->getArray(); // 単価タイプ $enum = new PriceTypeCdEnum(); $data['price_type'] = $enum->getArray(); //↓↓===========nm90073 2013/07/24 start=================================== // 売上端数調整方法追加 $enum = new RoundingTypeEnum(); $data['rounding_type'] = $enum->getArray(); //↑↑===========nm90073 2013/07/24 end===================================== // 消費税 $enum = new ClientAmountIncludeTaxEnum(); $data['client_amount_include_tax'] = $enum->getArray(); // 退会率 $enum = new AnkenTaikaiOptionCdEnum(); $data['taikai_option_cd'] = $enum->getArray(); return $data; }
/** * 実行 */ protected function perform() { // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; // 基本情報 $anken =& $m->getAnkenData($ankenId); $this->appendDataFrom($anken); // ログインクライアントIDチェック if ($this->_core->getLoginKind() == 'client' && $this->_loginClientId != $anken['client_id']) { throw new RequestParamsException('ログインクライアントIDと要求したクライアントIDが一致しません。'); } // 締め日 $shime = $anken['shime_date']; // キャンペーン期間 $from = $anken['campaign_from']; $to = $anken['campaign_to']; // 空の期間配列を作成 $blank = DateManager::getArrayShimeSpan($ankenId, $from, $to, $shime); // 集計 $data =& $m->Result_ClientReportResult_counting($anken, $blank); // テンプレートに渡す $this->_dataFrom['list'] =& $data; // 案件情報のアクションID対応の値 $enum = new AcceptUseActionIdEnum(); $this->_dataFrom["accept_use_action"] = $enum->getKey('アクションID'); // 案件情報の定率対応の値 $enum = new PriceTypeCdEnum(); $this->_dataFrom["price_use_rate"] = $enum->getKey('定率'); //--------------------------------------- // UPLOAD用のフォームのカスタム処理 //--------------------------------------- $path = $m->Result_ClientReportResult_getUploadFormTmplPath($ankenId); $this->_dataFrom["upform_path"] = $path; //--------------------------------------- // CSVの追加オプション表示 //--------------------------------------- $this->_dataFrom["add_option_name"] = $m->Result_ClientReportResult_getAddLabelForUploadForm($ankenId); //--------------------------------------- // フッターのリンク //--------------------------------------- $tmpl = $m->getExtraLinkTmplPath($ankenId); $this->_dataFrom["extra_link_path"] = $tmpl; //--------------------------------------- // レポートの表示/非表示制御 //--------------------------------------- $this->_dataFrom["disp"] =& $m->getReportDisp($ankenId, $this->_core->getLoginKind()); }
/** * 実行 */ protected function perform() { // 案件情報のアクションID対応の値 $enum = new AcceptUseActionIdEnum(); $acceptUseAction = $enum->getKey('アクションID'); // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; // キャンペーンコード取得 $anken =& $m->getAnkenData($ankenId); $code = $anken['campaign_code']; if ($code === null) { throw new AnkenNotFountException(); } $this->appendDataFrom($anken); // ファイル名称 $filename = ""; // 結果 $data = null; // 振り分け $kind =& $this->_like['kind']; if ($kind == 1) { // 承認前 $data =& $m->Result_ClientResultDownload_getUnacceptData($code, $this->_like); $this->_fileName = "report_unaccept.csv"; } else { if ($kind == 2) { // 承認後(アクション日付基準) $data =& $m->Result_ClientResultDownload_getAcceptByActionDate($code, $this->_like); $this->_fileName = "report_accept_by_action_date.csv"; } else { if ($kind == 3) { // 承認後(承認日付基準) $data =& $m->Result_ClientResultDownload_getAcceptByAceeptDate($code, $this->_like); $this->_fileName = "report_accept_by_accept_date.csv"; } } } // 案件情報のアクションID対応の値 $this->_dataFrom["accept_use_action"] = $acceptUseAction; // テンプレート $this->_dataFrom['list'] =& $data; // 承認前 (アクションID対応の場合アクションIDを付加) if ($anken['accept_use_action_id'] == $acceptUseAction) { $data =& $m->attachPrefixActionIdForList($data, $anken['id_prefix']); } // 承認前 (nm付与の場合、任意のIDに「nm」を付与) if ($anken['client_user_id_add_nm'] == 1) { $data =& $m->attachNmClientUserIdForList($data); } // 成果前後フラグ $this->_dataFrom['is_unaccept_download'] = false; if ($kind == 1) { $this->_dataFrom['is_unaccept_download'] = true; } return 'result/download/csv_client_report_result'; }
/** * 実行 */ protected function perform() { // 案件情報のアクションID対応の値 $enum = new AcceptUseActionIdEnum(); $acceptUseAction = $enum->getKey('アクションID'); // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; // キャンペーンコード取得 $anken =& $m->getAnkenData($ankenId); $code = $anken['campaign_code']; if ($code === null) { throw new AnkenNotFountException(); } $this->appendDataFrom($anken); // 単価タイプ $priceTypeCd = $anken['price_type_cd']; // デバイス情報表示フラグ $clientReportDeviceDisplay = $m->Result_ClientResultWithPostApiDownload_getClientReportDeviceDisplayFlg($anken); $this->_dataFrom['client_report_device_info_display'] = $clientReportDeviceDisplay; // ファイル名称 $filename = ""; // 結果 $data = null; // 振り分け $kind =& $this->_like['kind']; if ($kind == 2) { // 承認後(アクション日付基準) $data =& $m->Result_ClientResultWithPostApiDownload_getAcceptByActionDate($code, $this->_like, $priceTypeCd, $clientReportDeviceDisplay); $this->_fileName = "report_accept_by_action_date_with_non_af.csv"; } // ASP媒体情報表示フラグ $clientReportBaitaiDisplay = $m->Result_ClientResultWithPostApiDownload_getClientReportBaitaiDisplayFlg($anken); $this->_dataFrom['client_report_baitai_info_display'] = $clientReportBaitaiDisplay; // ASP媒体情報つけ if ($clientReportBaitaiDisplay == 1 || $this->_core->getLoginKind() == 'admin' && $clientReportBaitaiDisplay != null) { $data =& $m->Result_ClientResultWithPostApiDownload_attachClientReportBaitaiInfo($data, $anken); } // 案件情報のアクションID対応の値 $this->_dataFrom["accept_use_action"] = $acceptUseAction; // テンプレート $this->_dataFrom['list'] =& $data; if ($this->_core->getLoginKind() == 'admin') { // 管理者権限の場合アクションIDを付加 $data =& $m->attachPrefixActionIdForList($data, $anken['id_prefix']); } else { // 承認前 (アクションID対応の場合アクションIDを付加) if ($anken['accept_use_action_id'] == $acceptUseAction) { $data =& $m->attachPrefixActionIdForList($data, $anken['id_prefix']); } } // 承認前 (nm付与の場合、任意のIDに「nm」を付与) if ($anken['client_user_id_add_nm'] == 1) { $data =& $m->attachNmClientUserIdForList($data); } // 「,」(カンマ)使用の場合、「""」(ダブルクォーテーション)を囲むことが必要です $data =& $m->getFormatDataList($data); // 成果前後フラグ $this->_dataFrom['is_unaccept_download'] = false; if ($kind == 1) { $this->_dataFrom['is_unaccept_download'] = true; } // CSVの追加オプション表示情報取得 $dispOption =& $m->getSeikaOptionDispForDownLoadCsv($ankenId); $this->_dataFrom = array_merge($this->_dataFrom, $dispOption); // 追加パラメータ名称リスト取得 $valueNameList =& $m->getSeikaOptionValueNameList($ankenId); $this->_dataFrom['valueNameList'] =& $valueNameList; return 'result/download/csv_client_report_result_with_non_af'; }