* finish task #40911.

This commit is contained in:
wangyidong
2021-08-03 15:33:32 +08:00
parent a40762cb98
commit 7907a29cf8
5 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -353,7 +353,7 @@ class report extends control
if(empty($dept) and empty($userID)) $data['statusStat'] = $this->report->getAllTimeStatusStat();
$this->view->title = sprintf($this->lang->report->annualData->title, ($userID ? $users[$userID] : ($dept ? substr($depts[$dept], strrpos($depts[$dept], '/') + 1) : $depts[''])), $year);
$this->view->title = sprintf($this->lang->report->annualData->title, ($userID ? zget($users, $userID, '') : ($dept ? substr($depts[$dept], strrpos($depts[$dept], '/') + 1) : $depts[''])), $year);
$this->view->data = $data;
$this->view->year = $year;
$this->view->users = $users;
+1 -1
View File
@@ -68,7 +68,7 @@ section.active {border: 1px solid rgb(0, 166, 255);}
#executionData table tr>th, #productData table tr>th {color: #fff !important;}
#executionData .c-story, #executionData .c-task, #executionData .c-bug {text-align: center; width: 105px;}
#productData {margin-left: 20px;}
#productData .c-plan, #productData .c-requirement, #productData .c-story, #productData .c-finished {text-align: center; width: 105px;}
#productData .c-plan, #productData .c-requirement, #productData .c-story, #productData .c-closed {text-align: center; width: 105px;}
#productData .c-story {width: 115px;}
#productData .c-requirement {width: 140px;}
.table-hover>tbody>tr:hover>td {background-color: #888 !important;}
+13 -13
View File
@@ -1,10 +1,10 @@
/**
* Draw status pie chart.
*
* @param string $id
* @param string $title
* @param array $data
* @param function $callback
*
* @param string $id
* @param string $title
* @param array $data
* @param function $callback
* @access public
* @return object
*/
@@ -66,18 +66,18 @@ function drawStatusPieChart(id, title, data, callback)
}
chart.setOption(option);
if(typeof(callback) == 'function') chart.on('finished', callback);
return chart;
}
/**
* Draw months bar chart.
*
* @param string $id
* @param string $title
* @param array $legends
* @param array $xAxis
* @param array $data
*
* @param string $id
* @param string $title
* @param array $legends
* @param array $xAxis
* @param array $data
* @access public
* @return object
*/
@@ -141,7 +141,7 @@ function drawMonthsBarChart(id, title, legends, xAxis, data)
series: data
}
chart.setOption(option);
return chart;
}
+2 -2
View File
@@ -164,8 +164,8 @@ if(!empty($config->URAndSR))
{
$lang->report->annualData->productFields['requirement'] = "创建{$lang->URCommon}数";
}
$lang->report->annualData->productFields['story'] = "创建{$lang->SRCommon}数";
$lang->report->annualData->productFields['finished'] = "完成需求数";
$lang->report->annualData->productFields['story'] = "创建{$lang->SRCommon}数";
$lang->report->annualData->productFields['closed'] = "关闭需求数";
$lang->report->annualData->objectTypeList['product'] = $lang->productCommon;
$lang->report->annualData->objectTypeList['story'] = "需求";
+5 -5
View File
@@ -642,7 +642,7 @@ class reportModel extends model
}
/**
* Get count of created story,plan and finished story by accounts every product in this year.
* Get count of created story,plan and closed story by accounts every product in this year.
*
* @param array $accounts
* @param int $year
@@ -709,7 +709,7 @@ class reportModel extends model
->groupBy('product')
->fetchAll('product');
$closedStoryStats = $this->dao->select("product,sum(if((status = 'closed'), 1, 0)) as finished")->from(TABLE_STORY)
$closedStoryStats = $this->dao->select("product,sum(if((status = 'closed'), 1, 0)) as closed")->from(TABLE_STORY)
->where('product')->in(array_keys($products))
->andWhere('deleted')->eq(0)
->andWhere('LEFT(closedDate, 4)')->eq($year)
@@ -717,13 +717,13 @@ class reportModel extends model
->groupBy('product')
->fetchAll('product');
/* Merge created plan, created story and finished story in every product. */
/* Merge created plan, created story and closed story in every product. */
foreach($products as $productID => $product)
{
$product->plan = 0;
$product->requirement = 0;
$product->story = 0;
$product->finished = 0;
$product->closed = 0;
$plans = zget($planGroups, $productID, array());
if($plans) $product->plan = count($plans);
@@ -736,7 +736,7 @@ class reportModel extends model
}
$closedStoryStat = zget($closedStoryStats, $productID, '');
if($closedStoryStat) $product->finished = $closedStoryStat->finished;
if($closedStoryStat) $product->closed = $closedStoryStat->closed;
}
return $products;