/**
  * 所有被质检的回复
  */
 public function actionAllReply()
 {
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $qualityOptions = $this->_getGlobalData('quality_options');
     //评价
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $this->_loadCore('Help_Page');
     #------生成sql------#
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $helpSqlSearch->set_tableName($this->_modelQuality->tName());
     if ($_REQUEST['quality_option']) {
         $helpSqlSearch->set_conditions("option_id={$_REQUEST['quality_option']}");
         $this->_view->assign('selectedQualityOption', $_REQUEST['quality_option']);
     }
     if ($_REQUEST['status_option']) {
         $helpSqlSearch->set_conditions("status={$_REQUEST['status_option']}");
         $this->_view->assign('selectedStatusOption', $_REQUEST['status_option']);
     }
     $conditions = $helpSqlSearch->get_conditions();
     $helpSqlSearch->set_orderBy("Id desc");
     $helpPage = new Help_Page(array('total' => $this->_modelQuality->findCount($conditions), 'perpage' => PAGE_SIZE));
     $sql = $helpSqlSearch->createSql();
     #------生成sql------#
     $dataList = $this->_modelQuality->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['quality_time'] = date('Y-m-d H:i:s', $value['quality_time']);
             $value['complain_time'] = $value['complain_time'] ? date('Y-m-d H:i:s', $value['complain_time']) : '';
             $value['word_option_id'] = $qualityOptions[$value['option_id']];
             $value['word_status'] = Util_FontColor::getQualityStatus($value['status'], $this->_statusOptions[$value['status']]);
             $value['url_detail'] = Tools::url(CONTROL, 'QualityDetail', array('work_order_id' => $value['work_order_id'], 'qa_id' => $value['qa_id']));
             $value['reply_time'] = $value['reply_time'] ? date('Y-m-d H:i:s', $value['reply_time']) : '';
             $users = $this->_getGlobalData('user');
             $users = Model::getTtwoArrConvertOneArr($users, 'Id', 'full_name');
             $value['word_quality_user_id'] = $users[$value['quality_user_id']];
         }
         $this->_view->assign('dataList', $dataList);
     }
     $this->_statusOptions[''] = '所有';
     $qualityOptions[''] = '所有';
     $this->_view->assign('qualityOptions', $qualityOptions);
     $this->_view->assign('statusOptions', $this->_statusOptions);
     $this->_view->assign('js', $this->_view->get_curJs());
     $this->_view->assign('pageBox', $helpPage->show());
     $this->_utilMsg->createNavBar();
     $this->_view->display();
 }
Beispiel #2
0
 /**
  * 统计并且存入表.
  * key=0的为总数,其它的都会user_id,统计完成后会自动入库.
  * @param int $startTime
  * @param int $endTime
  */
 public function user($startTime, $endTime)
 {
     $addArrs = array();
     $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
     $workOrderList = $this->_modelWorkOrder->select("select * from {$this->_modelWorkOrder->tName()} where create_time between {$startTime} and {$endTime}");
     if ($workOrderList) {
         foreach ($workOrderList as $list) {
             $addArrs[0]['game_type_num'][$list['game_type']]++;
             $addArrs[0]['question_type_num'][$list['question_type']]++;
             $addArrs[0]['source_num'][$list['source']]++;
             $addArrs[0]['operator_num'][$list['operator_id']]++;
             $addArrs[0]['vip_level_num'][$list['vip_level']]++;
             $addArrs[0]['evaluation_num'][$list['evaluation_status']]++;
             $curUserId = $list['owner_user_id'];
             $addArrs[$curUserId]['game_type_num'][$list['game_type']]++;
             //游戏类型计数
             $addArrs[$curUserId]['question_type_num'][$list['question_type']]++;
             //问题类型计数
             $addArrs[$curUserId]['source_num'][$list['source']]++;
             //来源计数
             $addArrs[$curUserId]['operator_num'][$list['operator_id']]++;
             //运营商计数
             $addArrs[$curUserId]['vip_level_num'][$list['vip_level']]++;
             //VIP等级计数
             $addArrs[$curUserId]['evaluation_num'][$list['evaluation_status']]++;
             //评价计数
         }
     }
     $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
     $workOrderQaList = $this->_modelWorkOrderQa->select("select * from {$this->_modelWorkOrderQa->tName()} where create_time between {$startTime} and {$endTime} and qa=1");
     if ($workOrderQaList) {
         foreach ($workOrderQaList as $list) {
             $curUserId = $list['user_id'];
             $list['is_quality'] = $list['is_quality'] ? '1' : '0';
             $addArrs[0]['reply_quality_num'][$list['is_quality']]++;
             //总数,被质检增加
             $addArrs[$curUserId]['reply_quality_num'][$list['is_quality']]++;
             //用户被质检数增加
             if ($list['is_timeout'] != null) {
                 $addArrs[0]['reply_timeout_num'][$list['is_timeout']]++;
                 //总数超时,增加
                 $addArrs[$curUserId]['reply_timeout_num'][$list['is_timeout']]++;
                 //用户超时,增加
             }
         }
     }
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $qualityList = $this->_modelQuality->select("select * from {$this->_modelQuality->tName()} where quality_time between {$startTime} and {$endTime}");
     if ($qualityList) {
         foreach ($qualityList as $list) {
             $curUserId = $list['quality_user_id'];
             $addArrs[0]['quality_option_num'][$list['option_id']]++;
             $addArrs[0]['quality_status_num'][$list['status']]++;
             $addArrs[$curUserId]['quality_option_num'][$list['option_id']]++;
             $addArrs[$curUserId]['quality_status_num'][$list['status']]++;
             if ($list['scores'] > 0) {
                 $addArrs[0]['quality_scores']['bonus'] += $list['scores'];
                 $addArrs[0]['quality_scores']['bonus_num']++;
                 $addArrs[$curUserId]['quality_scores']['bonus'] += $list['scores'];
                 $addArrs[$curUserId]['quality_scores']['bonus_num']++;
             } else {
                 $addArrs[0]['quality_scores']['deeduction'] += $list['scores'];
                 $addArrs[0]['quality_scores']['deeduction_num']++;
                 $addArrs[$curUserId]['quality_scores']['deeduction'] += $list['scores'];
                 $addArrs[$curUserId]['quality_scores']['deeduction_num']++;
             }
         }
     }
     $insertArr = array();
     foreach ($addArrs as $key => $list) {
         if ($key === '' || $key === null) {
             continue;
         }
         $list['user_id'] = $key;
         $list['create_time'] = $startTime;
         $list['game_type_num'] = serialize((array) $list['game_type_num']);
         $list['question_type_num'] = serialize((array) $list['question_type_num']);
         $list['source_num'] = serialize((array) $list['source_num']);
         $list['operator_num'] = serialize((array) $list['operator_num']);
         $list['vip_level_num'] = serialize((array) $list['vip_level_num']);
         $list['evaluation_num'] = serialize((array) $list['evaluation_num']);
         $list['reply_quality_num'] = serialize((array) $list['reply_quality_num']);
         $list['reply_timeout_num'] = serialize((array) $list['reply_timeout_num']);
         $list['quality_option_num'] = serialize((array) $list['quality_option_num']);
         $list['quality_status_num'] = serialize((array) $list['quality_status_num']);
         $list['quality_scores'] = serialize((array) $list['quality_scores']);
         $this->add($list);
         array_push($insertArr, $list);
     }
 }
Beispiel #3
0
 /**
  * 详细统计
  * @param array  $date
  * @param array $users
  */
 public function statsDetail($date, $users, $gameIds = NULL, $operators = null)
 {
     #------获取工单总数统计------#
     $sql = "select evaluation_status,evaluation_desc,create_time,owner_user_id,is_verify,status from {$this->tName()} where create_time between {$date['start']} and {$date['end']} and owner_user_id in (" . implode(',', $users) . ")";
     if ($gameIds) {
         if (is_array($gameIds)) {
             $gameIds = implode(',', $gameIds);
         }
         $sql .= " and game_type in ({$gameIds})";
     }
     if ($operators) {
         if (is_array($operators)) {
             $operators = implode(',', $operators);
         }
         $sql .= " and operator_id in ({$operators})";
     }
     // 		echo "<p>".$sql;
     $dataList = $this->select($sql);
     if ($dataList) {
         $evArr = array();
         //1游戏BUG
         //2游戏设置不满意
         //3回复不清晰
         //4回复错误
         //5客服服务态度恶劣
         //6其他
         $evaluationDesc = array(1 => 32, 2 => 32, 3 => 3, 4 => 3, 5 => 3, 6 => 32, '' => 3);
         //32扩展为游戏差评、3保留为服务差评
         $workOrderList = array();
         foreach ($dataList as $list) {
             $workOrderList['total']['total']['total']++;
             //				$workOrderList['total']['total']['ev_'.$list['evaluation_status']]++;
             $workOrderList['total'][date('Y-m-d', $list['create_time'])]['total']++;
             //				$workOrderList['total'][date('Y-m-d',$list['create_time'])]['ev_'.$list['evaluation_status']]++;
             if ($list['is_verify'] && in_array($list['status'], array(3, 4))) {
                 $workOrderList['total']['total']['verify']++;
                 $workOrderList['total'][date('Y-m-d', $list['create_time'])]['verify']++;
                 $workOrderList[$list['owner_user_id']]['total']['verify']++;
                 $workOrderList[$list['owner_user_id']][date('Y-m-d', $list['create_time'])]['verify']++;
             }
             $workOrderList[$list['owner_user_id']]['total']['total']++;
             //				$workOrderList[$list['owner_user_id']]['total']['ev_'.$list['evaluation_status']]++;
             $workOrderList[$list['owner_user_id']][date('Y-m-d', $list['create_time'])]['total']++;
             //				$workOrderList[$list['owner_user_id']][date('Y-m-d',$list['create_time'])]['ev_'.$list['evaluation_status']]++;
             //对差评进行扩展
             if ($list['evaluation_status'] == 3) {
                 $tmpEv = $evaluationDesc[$list['evaluation_desc']];
                 $workOrderList['total']['total']['ev_' . $tmpEv]++;
                 $workOrderList[$list['owner_user_id']]['total']['ev_' . $tmpEv]++;
                 $workOrderList['total'][date('Y-m-d', $list['create_time'])]['ev_' . $tmpEv]++;
                 $workOrderList[$list['owner_user_id']][date('Y-m-d', $list['create_time'])]['ev_' . $tmpEv]++;
             } else {
                 $workOrderList['total']['total']['ev_' . $list['evaluation_status']]++;
                 $workOrderList[$list['owner_user_id']]['total']['ev_' . $list['evaluation_status']]++;
                 $workOrderList['total'][date('Y-m-d', $list['create_time'])]['ev_' . $list['evaluation_status']]++;
                 $workOrderList[$list['owner_user_id']][date('Y-m-d', $list['create_time'])]['ev_' . $list['evaluation_status']]++;
             }
         }
     }
     $allDay = Tools::getdateArr($date['start'], $date['end']);
     foreach ($users as $user) {
         foreach ($allDay as $key => $value) {
             if (!isset($workOrderList['total'][$key])) {
                 $workOrderList['total'][$key] = array();
             }
             if (!isset($workOrderList[$user][$key])) {
                 $workOrderList[$user][$key] = array();
             }
         }
         krsort($workOrderList[$user]);
     }
     krsort($workOrderList['total']);
     #------获取工单总数统计------#
     #------获取回复总记录数------#
     $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
     $sql = "select is_timeout,user_id,create_time from {$this->_modelWorkOrderQa->tName()} where create_time between {$date['start']} and {$date['end']} and qa=1 and user_id in (" . implode(',', $users) . ")";
     if ($gameIds) {
         $sql .= " and game_type_id in ({$gameIds})";
     }
     if ($operators) {
         if (is_array($operators)) {
             $operators = implode(',', $operators);
         }
         $sql .= " and operator_id in ({$operators})";
     }
     // 		echo "<p>".$sql;
     $dataList = $this->_modelWorkOrderQa->select($sql);
     if ($dataList) {
         $qaList = array();
         foreach ($dataList as $list) {
             $qaList['total']['total']['total_reply']++;
             $qaList['total']['total']['timeout_' . $list['is_timeout']]++;
             $qaList['total'][date('Y-m-d', $list['create_time'])]['total_reply']++;
             $qaList['total'][date('Y-m-d', $list['create_time'])]['timeout_' . $list['is_timeout']]++;
             $qaList[$list['user_id']]['total']['total_reply']++;
             $qaList[$list['user_id']]['total']['timeout_' . $list['is_timeout']]++;
             $qaList[$list['user_id']][date('Y-m-d', $list['create_time'])]['total_reply']++;
             $qaList[$list['user_id']][date('Y-m-d', $list['create_time'])]['timeout_' . $list['is_timeout']]++;
         }
     }
     $allDay = Tools::getdateArr($date['start'], $date['end']);
     foreach ($users as $user) {
         foreach ($allDay as $key => $value) {
             if (!isset($qaList['total'][$key])) {
                 $qaList['total'][$key] = array();
             }
             if (!isset($qaList[$user][$key])) {
                 $qaList[$user][$key] = array();
             }
         }
         krsort($qaList[$user]);
     }
     krsort($qaList['total']);
     #------获取回复总记录数------#
     #------质检统计------#
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $sql = "select quality_user_id,reply_user_id,scores,quality_time from {$this->_modelQuality->tName()} where quality_time between {$date['start']} and {$date['end']} and (quality_user_id in (" . implode(',', $users) . ") or reply_user_id in (" . implode(',', $users) . ")) ";
     if ($gameIds) {
         $sql .= " and game_type_id in ({$gameIds})";
     }
     if ($operators) {
         $sql .= " and operator_id in ({$operators})";
     }
     // 		echo "<p>".$sql;
     $dataList = $this->_modelQuality->select($sql);
     if ($dataList) {
         $qualityList = array();
         foreach ($dataList as $list) {
             $qualityList['total']['total']['total_quality']++;
             $qualityList['total'][date('Y-m-d', $list['quality_time'])]['total_quality']++;
             $qualityList['total']['total']['quality_num']++;
             $qualityList['total']['total']['reply_num']++;
             $qualityList['total'][date('Y-m-d', $list['quality_time'])]['quality_num']++;
             $qualityList['total'][date('Y-m-d', $list['quality_time'])]['reply_num']++;
             $qualityList[$list['quality_user_id']]['total']['quality_num']++;
             //质检回复量
             $qualityList[$list['quality_user_id']][date('Y-m-d', $list['quality_time'])]['quality_num']++;
             $qualityList[$list['reply_user_id']]['total']['reply_num']++;
             //被质检回复量
             $qualityList[$list['reply_user_id']][date('Y-m-d', $list['quality_time'])]['reply_num']++;
             if ($list['scores'] > 0) {
                 $qualityList['total']['total']['bonus_num']++;
                 $qualityList['total']['total']['bonus'] += $list['scores'];
                 $qualityList['total'][date('Y-m-d', $list['quality_time'])]['bonus_num']++;
                 $qualityList['total'][date('Y-m-d', $list['quality_time'])]['bonus'] += $list['scores'];
                 $qualityList[$list['reply_user_id']]['total']['bonus_num']++;
                 $qualityList[$list['reply_user_id']]['total']['bonus'] += $list['scores'];
                 $qualityList[$list['reply_user_id']][date('Y-m-d', $list['quality_time'])]['bonus_num']++;
                 $qualityList[$list['reply_user_id']][date('Y-m-d', $list['quality_time'])]['bonus'] += $list['scores'];
             } elseif ($list['scores'] < 0) {
                 $qualityList['total']['total']['deduction_num']++;
                 $qualityList['total']['total']['deduction'] += $list['scores'];
                 $qualityList['total'][date('Y-m-d', $list['quality_time'])]['deduction_num']++;
                 $qualityList['total'][date('Y-m-d', $list['quality_time'])]['deduction'] += $list['scores'];
                 $qualityList[$list['reply_user_id']]['total']['deduction_num']++;
                 $qualityList[$list['reply_user_id']]['total']['deduction'] += $list['scores'];
                 $qualityList[$list['reply_user_id']][date('Y-m-d', $list['quality_time'])]['deduction_num']++;
                 $qualityList[$list['reply_user_id']][date('Y-m-d', $list['quality_time'])]['deduction'] += $list['scores'];
             }
         }
     }
     $allDay = Tools::getdateArr($date['start'], $date['end']);
     foreach ($users as $user) {
         foreach ($allDay as $key => $value) {
             if (!isset($qualityList['total'][$key])) {
                 $qualityList['total'][$key] = array();
             }
             if (!isset($qualityList[$user][$key])) {
                 $qualityList[$user][$key] = array();
             }
         }
         krsort($qualityList[$user]);
     }
     krsort($qualityList['total']);
     #------质检统计------#
     #------BUGLIST------#
     $this->_modelVerify = $this->_getGlobalData('Model_Verify', 'object');
     $sql = "select user_id,finish_user_id,create_time from {$this->_modelVerify->tName()} where create_time between {$date['start']} and {$date['end']} and (user_id in (" . implode(',', $users) . ") or finish_user_id in (" . implode(',', $users) . "))";
     if ($gameIds) {
         $sql .= " and game_type_id in ({$gameIds})";
     }
     if ($operators) {
         $sql .= " and operator_id in ({$operators})";
     }
     // 		echo "<p>".$sql;
     $dataList = $this->_modelVerify->select($sql);
     if ($dataList) {
         $bugList = array();
         foreach ($dataList as $list) {
             $curTime = date('Y-m-d', $list['create_time']);
             $bugList['total']['total']['submit']++;
             $bugList['total'][$curTime]['submit']++;
             $bugList[$list['user_id']]['total']['submit']++;
             $bugList[$list['user_id']][$curTime]['submit']++;
             if ($list['finish_user_id']) {
                 $bugList['total']['total']['finish']++;
                 $bugList['total'][$curTime]['finish']++;
                 $bugList[$list['finish_user_id']]['total']['finish']++;
                 $bugList[$list['finish_user_id']][$curTime]['finish']++;
             }
         }
     }
     $allDay = Tools::getdateArr($date['start'], $date['end']);
     foreach ($users as $user) {
         foreach ($allDay as $key => $value) {
             if (!isset($bugList['total'][$key])) {
                 $bugList['total'][$key] = array();
             }
             if (!isset($bugList[$user][$key])) {
                 $bugList[$user][$key] = array();
             }
         }
         krsort($bugList[$user]);
     }
     krsort($bugList['total']);
     #------BUGLIST------#
     $arrayList = array();
     $arrayList['total'] = array_merge_recursive($workOrderList['total'], $qaList['total'], $qualityList['total'], $bugList['total']);
     foreach ($users as $user) {
         $arrayList[$user] = array_merge_recursive($workOrderList[$user], $qaList[$user], $qualityList[$user], $bugList[$user]);
     }
     return $arrayList;
 }
Beispiel #4
0
 /**
  * 根据用户统计 
  */
 private function _getStatusUser()
 {
     if (is_array($this->_users)) {
         $users = implode(',', $this->_users);
     } else {
         $users = $this->_users;
     }
     $addArrs = array();
     $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
     $sql = "select Id,game_type,question_type,source,operator_id,vip_level,evaluation_status,evaluation_desc,create_time from {$this->_modelWorkOrder->tName()} where create_time between {$this->_statsTime['start']} and {$this->_statsTime['end']} and owner_user_id in (" . $users . ")";
     $gameType = NULL;
     if ($this->_gameType) {
         if (is_array($this->_gameType)) {
             $gameType = implode(',', $this->_gameType);
         }
         $sql .= " and game_type in ({$gameType})";
     }
     $workOrderList = $this->_modelWorkOrder->select($sql);
     if ($workOrderList) {
         //1游戏BUG
         //2游戏设置不满意
         //3回复不清晰
         //4回复错误
         //5客服服务态度恶劣
         //6其他
         $evaluationDesc = array(1 => 32, 2 => 32, 3 => 3, 4 => 3, 5 => 3, 6 => 32, '' => 3);
         //32扩展为游戏差评、3保留为服务差评
         foreach ($workOrderList as $list) {
             $addArrs['game_type_num'][$list['game_type']]++;
             $addArrs['question_type_num'][$list['question_type']]++;
             $addArrs['source_num'][$list['source']]++;
             $addArrs['operator_num'][$list['operator_id']]++;
             $addArrs['vip_level_num'][$list['vip_level']]++;
             //对差评进行扩展
             if ($list['evaluation_status'] == 3) {
                 $addArrs['evaluation_num'][$evaluationDesc[$list['evaluation_desc']]]++;
                 $addArrs['evaluation_desc_num'][$list['evaluation_desc']]++;
             } else {
                 $addArrs['evaluation_num'][$list['evaluation_status']]++;
             }
             //				$addArrs['evaluation_num'][$list['evaluation_status']]++;
             //				if ($list['evaluation_desc'])$addArrs['evaluation_desc_num'][$list['evaluation_desc']]++;
         }
         $isEvNum = $addArrs['evaluation_num'][1] + $addArrs['evaluation_num'][2] + $addArrs['evaluation_num'][3] + $addArrs['evaluation_num'][32];
         $addArrs['evaluation_num']['satisfaction'] = $addArrs['evaluation_num'][1] / ($isEvNum - $addArrs['evaluation_num'][32]) * 100;
         //服务满意度
         $totalEvNum = $addArrs['evaluation_num'][0] + $isEvNum;
         $addArrs['evaluation_num']['ev_percentage'] = $isEvNum / $totalEvNum * 100;
         //评价率
     }
     $this->_modelWorkOrderQa = $this->_getGlobalData('Model_WorkOrderQa', 'object');
     $sql = "select Id,is_quality,is_timeout,create_time from {$this->_modelWorkOrderQa->tName()} where create_time between {$this->_statsTime['start']} and {$this->_statsTime['end']} and qa=1 and user_id in (" . $users . ")";
     if ($gameType) {
         $sql .= " and game_type_id in ({$gameType})";
     }
     $workOrderQaList = $this->_modelWorkOrderQa->select($sql);
     if ($workOrderQaList) {
         foreach ($workOrderQaList as $list) {
             $list['is_quality'] = $list['is_quality'] ? '1' : '0';
             $addArrs['reply_quality_num'][$list['is_quality']]++;
             //总数,被质检增加
             if ($list['is_timeout'] != null) {
                 $addArrs['reply_timeout_num'][$list['is_timeout']]++;
                 //总数超时,增加
             }
         }
     }
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $sql = "select option_id,status,scores from {$this->_modelQuality->tName()} where quality_time between {$this->_statsTime['start']} and {$this->_statsTime['end']} and  (quality_user_id in ({$users}) or reply_user_id in ({$users})) ";
     if ($gameType) {
         $sql .= " and game_type_id in ({$gameType})";
     }
     $qualityList = $this->_modelQuality->select($sql);
     if ($qualityList) {
         foreach ($qualityList as $list) {
             $addArrs['quality_option_num'][$list['option_id']]++;
             $addArrs['quality_status_num'][$list['status']]++;
             if ($list['scores'] > 0) {
                 $addArrs['quality_scores']['bonus'] += $list['scores'];
                 $addArrs['quality_scores']['bonus_num']++;
             } elseif ($list['scores'] < 0) {
                 $addArrs['quality_scores']['deeduction'] += $list['scores'];
                 $addArrs['quality_scores']['deeduction_num']++;
             }
         }
     }
     foreach ($addArrs as $key => &$list) {
         $list['game_type_num'] = (array) $list['game_type_num'];
         $list['question_type_num'] = (array) $list['question_type_num'];
         $list['source_num'] = (array) $list['source_num'];
         $list['operator_num'] = (array) $list['operator_num'];
         $list['vip_level_num'] = (array) $list['vip_level_num'];
         $list['evaluation_num'] = (array) $list['evaluation_num'];
         $list['reply_quality_num'] = (array) $list['reply_quality_num'];
         $list['reply_timeout_num'] = (array) $list['reply_timeout_num'];
         $list['quality_option_num'] = (array) $list['quality_option_num'];
         $list['quality_status_num'] = (array) $list['quality_status_num'];
         $list['quality_scores'] = (array) $list['quality_scores'];
     }
     return $addArrs;
 }
 /**
  * 复检列表
  */
 public function actionAgainList()
 {
     #------初始化------#
     $this->_loadCore('Help_Page');
     $this->_loadCore('Help_SqlSearch');
     $helpSqlSearch = new Help_SqlSearch();
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
     $qualityStatus = $this->_getGlobalData('quality_status');
     $qualityOptions = $this->_getGlobalData('quality_options');
     $gameTypes = $this->_getGlobalData('game_type');
     $gameTypes = Model::getTtwoArrConvertOneArr($gameTypes, 'Id', 'name');
     $operatorList = Model::getTtwoArrConvertOneArr($this->_getGlobalData('operator_list'), 'Id', 'operator_name');
     $againStatus = array('0' => '未通过', '1' => '通过');
     #------初始化------#
     $selected = array();
     //模板默认值
     $users = $this->_getGlobalData('user');
     $helpSqlSearch->set_tableName($this->_modelQuality->tName());
     $helpSqlSearch->set_conditions('again_user_id is not null');
     if ($_REQUEST['quality_user_id'] != '') {
         //质检
         $helpSqlSearch->set_conditions("quality_user_id={$_REQUEST['quality_user_id']}");
         $selected['quality_user_id'] = $_REQUEST['quality_user_id'];
     }
     if ($_REQUEST['again_user_id'] != '') {
         //复检
         $helpSqlSearch->set_conditions("again_user_id={$_REQUEST['again_user_id']}");
         $selected['again_user_id'] = $_REQUEST['again_user_id'];
     }
     if ($_REQUEST['again_status'] != '') {
         //复检状态
         $helpSqlSearch->set_conditions("again_status={$_REQUEST['again_status']}");
         $selected['again_status'] = $_REQUEST['again_status'];
     }
     if ($_REQUEST['start_time'] && $_REQUEST['end_time']) {
         $startTime = strtotime($_REQUEST['start_time']);
         $endTime = strtotime($_REQUEST['end_time']);
         $helpSqlSearch->set_conditions("again_time between {$startTime} and {$endTime}");
         $selected['start_time'] = $_REQUEST['start_time'];
         $selected['end_time'] = $_REQUEST['end_time'];
     }
     $helpSqlSearch->set_orderBy('again_time desc');
     $helpSqlSearch->setPageLimit($_GET['page']);
     $allConditions = $helpSqlSearch->get_conditions();
     //返回所有条件
     $helpPage = new Help_Page(array('total' => $this->_modelQuality->findCount($allConditions), 'perpage' => PAGE_SIZE));
     $sql = $helpSqlSearch->createSql();
     $dataList = $this->_modelQuality->select($sql);
     if ($dataList) {
         Tools::import('Util_FontColor');
         foreach ($dataList as &$value) {
             $value['word_game_type_id'] = $gameTypes[$value['game_type_id']];
             $value['word_operator_id'] = $operatorList[$value['operator_id']];
             $value['again_time'] = date('Y-m-d H:i:s', $value['again_time']);
             $value['quality_time'] = date('Y-m-d H:i:s', $value['quality_time']);
             $value['complain_time'] = $value['complain_time'] ? date('Y-m-d H:i:s', $value['complain_time']) : '';
             $value['word_option_id'] = $qualityOptions[$value['option_id']];
             $value['word_status'] = Util_FontColor::getQualityStatus($value['status'], $this->_statusOptions[$value['status']]);
             $value['url_detail'] = Tools::url(CONTROL, 'QualityDetail', array('work_order_id' => $value['work_order_id'], 'qa_id' => $value['qa_id']));
             $value['url_document'] = Tools::url(CONTROL, 'Document', array('doaction' => 'add', 'Id' => $value['Id'], 'qa_id' => $value['qa_id'], 'work_order_id' => $value['work_order_id']));
             $value['word_quality_user_id'] = $users[$value['quality_user_id']]['nick_name'];
             $value['word_again_user_id'] = $users[$value['again_user_id']]['nick_name'];
             $value['word_reply_user_id'] = $users[$value['reply_user_id']]['nick_name'];
             $value['reply_content'] = strip_tags($value['reply_content']);
             $value['quality_content'] = strip_tags($value['quality_content']);
             $value['complain_content'] = strip_tags($value['complain_content']);
             $value['again_content'] = strip_tags($value['again_content']);
             $value['word_again_status'] = $againStatus[$value['again_status']];
         }
         $this->_view->assign('dataList', $dataList);
     }
     $againStatus[''] = '所有';
     $gameTypes[''] = '所有';
     $this->_view->assign('againStatus', $againStatus);
     $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();
 }