Example #1
0
 /**
  * 超时回复列表
  */
 public function actionTimeoutReply()
 {
     #------初始化------#
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
     $qualityStatus = $this->_getGlobalData('quality_status');
     $qualityOptions = $this->_getGlobalData('quality_options');
     #------初始化------#
     $users = $this->_getGlobalData('user');
     $allUser = Model::getTtwoArrConvertOneArr($users, 'user_name', 'nick_name');
     $helpSqlSearch->set_tableName($this->_modelWorkOrderQa->tName());
     $helpSqlSearch->set_conditions('is_timeout=1');
     $helpSqlSearch->set_conditions('qa=1');
     $helpSqlSearch->set_orderBy('create_time desc');
     $helpSqlSearch->setPageLimit($_GET['page'], 20);
     $allConditions = $helpSqlSearch->get_conditions();
     //返回所有条件
     $helpPage = new Help_Page(array('total' => $this->_modelWorkOrderQa->findCount($allConditions), 'perpage' => 20));
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelWorkOrderQa->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['word_is_quality'] = $value['is_quality'] ? $users[$value['is_quality']]['nick_name'] : '<font color="#666666">未质检</font>';
             $value['word_reply_name'] = $allUser[$value['reply_name']];
             $value['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
             $value['last_reply_time'] = date('Y-m-d H:i:s', $value['last_reply_time']);
             $value['url_detail'] = Tools::url('QualityCheck', 'Dialog', array('Id' => $value['work_order_id'], 'game_type_id' => $value['game_type_id'], 'operator_id' => $value['operator_id']));
             $value['content'] = strip_tags($value['content']);
         }
         $this->_view->assign('dataList', $dataList);
     }
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Example #2
0
 /**
  * 未发送致服务器的回复
  * @todo 新增动作
  */
 public function actionNotSendReply()
 {
     #------初始化------#
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
     $qualityStatus = $this->_getGlobalData('quality_status');
     $qualityOptions = $this->_getGlobalData('quality_options');
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     #------初始化------#
     $selected = array();
     //模板默认值
     $users = $this->_getGlobalData('user');
     $helpSqlSearch->set_tableName($this->_modelWorkOrderQa->tName());
     $helpSqlSearch->set_conditions('qa=1');
     if ($_REQUEST['game_type_id']) {
         $helpSqlSearch->set_conditions("game_type_id={$_REQUEST['game_type_id']}");
         $selected['game_type_id'] = $_REQUEST['game_type_id'];
     }
     if ($_REQUEST['reply_user_id'] != '') {
         $helpSqlSearch->set_conditions("user_id={$_REQUEST['reply_user_id']}");
         $selected['reply_user_id'] = $_REQUEST['reply_user_id'];
     }
     if ($_REQUEST['start_time'] && $_REQUEST['end_time']) {
         $startTime = strtotime($_REQUEST['start_time']);
         $endTime = strtotime($_REQUEST['end_time']);
         $helpSqlSearch->set_conditions("create_time between {$startTime} and {$endTime}");
         $selected['start_time'] = $_REQUEST['start_time'];
         $selected['end_time'] = $_REQUEST['end_time'];
     }
     $helpSqlSearch->set_conditions('content like \'<em>%\' ');
     $helpSqlSearch->set_orderBy('create_time desc');
     $helpSqlSearch->setPageLimit($_GET['page']);
     $allConditions = $helpSqlSearch->get_conditions();
     //返回所有条件
     $helpPage = new Help_Page(array('total' => $this->_modelWorkOrderQa->findCount($allConditions), 'perpage' => PAGE_SIZE));
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelWorkOrderQa->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['word_game_type_id'] = $gameTypes[$value['game_type_id']];
             $value['word_is_quality'] = $value['is_quality'] ? $users[$value['is_quality']]['nick_name'] : '<font color="#666666">未质检</font>';
             $value['word_reply_name'] = $users[$value['user_id']]['nick_name'];
             $value['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
             $value['last_reply_time'] = date('Y-m-d H:i:s', $value['last_reply_time']);
             $value['url_detail'] = Tools::url('QualityCheck', 'Dialog', array('Id' => $value['work_order_id'], 'game_type_id' => $value['game_type_id'], 'operator_id' => $value['operator_id']));
             $value['content'] = strip_tags($value['content']);
         }
         $this->_view->assign('dataList', $dataList);
     }
     $gameTypes[''] = '所有';
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('users', $users);
     $this->_view->assign('selected', $selected);
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Example #3
0
 /**
  * 回复列表
  */
 public function actionReplyIndex()
 {
     $selected = array();
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $timeOutArr = array(0 => Tools::getLang('NOT_TIMEOUT', 'Common'), 1 => Tools::getLang('TIMEOUT', 'Common'), '' => Tools::getLang('ALL', 'Common'));
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $gameTypes[''] = Tools::getLang('ALL', 'Common');
     $operatorList = $this->_getGlobalData('operator_list');
     $operatorList = Model::getTtwoArrConvertOneArr($operatorList, 'Id', 'operator_name');
     $operatorList[''] = Tools::getLang('ALL', 'Common');
     $userIndex = $this->_getGlobalData('user_index_id');
     $helpSqlSearch->set_tableName($this->_modelWorkOrderQa->tName());
     if ($_GET['game_type_id'] != '') {
         $_GET['game_type_id'] = Tools::coerceInt($_GET['game_type_id']);
         $helpSqlSearch->set_conditions("game_type_id={$_GET['game_type_id']}");
         $selected['game_type_id'] = $_GET['game_type_id'];
     }
     if ($_GET['operator_id'] != '') {
         $_GET['operator_id'] = Tools::coerceInt($_GET['operator_id']);
         $helpSqlSearch->set_conditions("operator_id={$_GET['operator_id']}");
         $selected['operator_id'] = $_GET['operator_id'];
     }
     if ($_GET['user_id']) {
         $_GET['user_id'] = Tools::coerceInt($_GET['user_id']);
         $helpSqlSearch->set_conditions("user_id={$_GET['user_id']}");
         $selected['user_id'] = $_GET['user_id'];
     } else {
         $helpSqlSearch->set_conditions("user_id!=0");
     }
     if ($_GET['start_time'] && $_GET['end_time']) {
         $selected['start_time'] = $_GET['start_time'];
         $selected['end_time'] = $_GET['end_time'];
         $helpSqlSearch->set_conditions("create_time between " . strtotime($_GET['start_time']) . " and " . strtotime($_GET['end_time']));
     }
     $helpSqlSearch->set_orderBy('create_time desc');
     $helpSqlSearch->setPageLimit($_GET['page'], PAGE_SIZE);
     $conditions = $helpSqlSearch->get_conditions();
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelWorkOrderQa->select($sql);
     if ($dataList) {
         $this->_loadCore('Help_Page');
         $helpPage = new Help_Page(array('total' => $this->_modelWorkOrderQa->findCount($conditions), 'perpage' => PAGE_SIZE));
         $this->_view->assign('pageBox', $helpPage->show());
         foreach ($dataList as &$list) {
             $list['word_game_type_id'] = $gameTypes[$list['game_type_id']];
             $list['word_operator_id'] = $operatorList[$list['operator_id']];
             $list['word_time_out'] = $timeOutArr[$list['is_timeout']];
             $list['word_user_id'] = $userIndex[$list['user_id']];
             $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
             $list['url_detail'] = Tools::url(CONTROL, 'Detail', array('Id' => $list['work_order_id']));
         }
         $this->_view->assign('dataList', $dataList);
     }
     $this->_view->assign('selected', $selected);
     $this->_view->assign('gameTypes', $gameTypes);
     $this->_view->assign('operatorList', $operatorList);
     $this->_view->assign('timeOutArr', $timeOutArr);
     $this->_view->assign('users', $userIndex);
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }