* add count source of story.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-10-30 01:05:27 +00:00
parent 85b875e8b8
commit b475ddf755
3 changed files with 21 additions and 0 deletions
+2
View File
@@ -176,6 +176,7 @@ $lang->story->report->selectReverse = 'Reverse';
$lang->story->report->charts['storysPerProduct'] = 'Product storys';
$lang->story->report->charts['storysPerModule'] = 'Module storys';
$lang->story->report->charts['storysPerSource'] = 'Source storys';
$lang->story->report->charts['storysPerPlan'] = 'Plan storys';
$lang->story->report->charts['storysPerStatus'] = 'Sotrys of status';
$lang->story->report->charts['storysPerStage'] = 'Storys of stage';
@@ -201,6 +202,7 @@ $lang->story->report->options->graph->showColumnShadow = 0;
$lang->story->report->storysPerProduct->graph->xAxisName = 'Product';
$lang->story->report->storysPerModule->graph->xAxisName = 'Module';
$lang->story->report->storysPerSource->graph->xAxisName = 'Source';
$lang->story->report->storysPerPlan->graph->xAxisName = 'Plan';
$lang->story->report->storysPerStatus->graph->xAxisName = 'Status';
$lang->story->report->storysPerStage->graph->xAxisName = 'Stage';
+2
View File
@@ -176,6 +176,7 @@ $lang->story->report->selectReverse = '反选';
$lang->story->report->charts['storysPerProduct'] = '产品需求数量';
$lang->story->report->charts['storysPerModule'] = '模块需求数量';
$lang->story->report->charts['storysPerSource'] = '需求来源统计';
$lang->story->report->charts['storysPerPlan'] = '计划进行统计';
$lang->story->report->charts['storysPerStatus'] = '状态进行统计';
$lang->story->report->charts['storysPerStage'] = '所处阶段进行统计';
@@ -201,6 +202,7 @@ $lang->story->report->options->graph->showColumnShadow = 0; // 是否显示柱
$lang->story->report->storysPerProduct->graph->xAxisName = '产品';
$lang->story->report->storysPerModule->graph->xAxisName = '模块';
$lang->story->report->storysPerSource->graph->xAxisName = '来源';
$lang->story->report->storysPerPlan->graph->xAxisName = '产品计划';
$lang->story->report->storysPerStatus->graph->xAxisName = '状态';
$lang->story->report->storysPerStage->graph->xAxisName = '所处阶段';
+17
View File
@@ -983,6 +983,23 @@ class storyModel extends model
return $datas;
}
/**
* Get report data of storys per source
*
* @access public
* @return array
*/
public function getDataOfStorysPerSource()
{
$datas = $this->dao->select('source as name, count(source) as value')->from(TABLE_STORY)
->beginIF($this->session->storyReport != false)->where($this->session->storyReport)->fi()
->groupBy('source')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
$this->lang->story->sourceList[''] = $this->lang->report->undefined;
foreach($datas as $key => $data) $data->name = isset($this->lang->story->sourceList[$key]) ? $this->lang->story->sourceList[$key] : $this->lang->report->undefined;
return $datas;
}
/**
* Get report data of storys per plan
*