* Finish task #73068.

This commit is contained in:
wangyuting2
2022-10-25 01:35:01 +00:00
parent 2651502b2c
commit 74131ae86a
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -99,7 +99,7 @@ class reportModel extends model
public function getExecutions($begin = 0, $end = 0)
{
$permission = common::hasPriv('report', 'showProject') or $this->app->user->admin;
$tasks = $this->dao->select('t1.*, IF(t3.multiple = "1", t2.name, "") as executionName, t3.name as projectName')->from(TABLE_TASK)->alias('t1')
$tasks = $this->dao->select('t1.*, IF(t3.multiple = "1", t2.name, "") as executionName, t3.name as projectName, t2.multiple')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
->where('t1.status')->ne('cancel')
@@ -126,6 +126,7 @@ class reportModel extends model
$executions[$executionID]->projectID = $task->project;
$executions[$executionID]->projectName = $task->projectName;
$executions[$executionID]->multiple = $task->multiple;
$executions[$executionID]->name = $task->executionName;
$executions[$executionID]->estimate += $task->estimate;
$executions[$executionID]->consumed += $task->consumed;
@@ -65,7 +65,11 @@
<?php echo $execution->name ? $execution->projectName : html::a($this->createLink('project', 'index', "projectID=$execution->projectID"), $execution->projectName);?>
</td>
<td class="text-left" title="<?php echo $execution->name;?>">
<?php if($execution->multiple):?>
<?php echo $execution->name ? html::a($this->createLink('execution', 'view', "executionID=$id"), $execution->name) : '';?>
<?php else:?>
<?php echo $lang->null;?>
<?php endif;?>
</td>
<td><?php echo round($execution->estimate, 2);?></td>
<td><?php echo round($execution->consumed, 2);?></td>