Merge branch 'sprint/209_hufangzhou_58573' into 'master'

* Finish task #58573.

See merge request easycorp/zentaopms!4170
This commit is contained in:
王怡栋
2022-06-28 01:52:23 +00:00
2 changed files with 15 additions and 11 deletions
+12 -10
View File
@@ -137,26 +137,28 @@ class personnelModel extends model
}
$users = $this->loadModel('user')->getListByAccounts(array_keys($accountPairs), 'account');
foreach($users as $user) $user->role = zget($this->lang->user->roleList, $user->role, $user->role);
foreach($accountPairs as $account => $projects)
{
$user = zget($users, $account, '');
$personnelList[$account]['realname'] = $user ? $user->realname : $account;
$personnelList[$account]['account'] = $account;
$personnelList[$account]['role'] = $user ? $user->role : '';
$personnelList[$account]['projects'] = $projects;
$personnelList[$account]['executions'] = zget($executionPairs, $account, 0);
if(!empty($user) and !isset($personnelList[$user->role])) $personnelList[$user->role] = array();
$personnelList[$account] += $taskInvest[$account];
$personnelList[$account] += $bugAndStoryInvest[$account];
$personnelList[$user->role][$account]['realname'] = $user ? $user->realname : $account;
$personnelList[$user->role][$account]['account'] = $account;
$personnelList[$user->role][$account]['role'] = $user ? zget($this->lang->user->roleList, $user->role, $user->role) : '';
$personnelList[$user->role][$account]['projects'] = $projects;
$personnelList[$user->role][$account]['executions'] = zget($executionPairs, $account, 0);
$personnelList[$user->role][$account] += $taskInvest[$account];
$personnelList[$user->role][$account] += $bugAndStoryInvest[$account];
if($this->config->edition == 'max')
{
$personnelList[$account] += $issueInvest[$account];
$personnelList[$account] += $riskInvest[$account];
$personnelList[$user->role][$account] += $issueInvest[$account];
$personnelList[$user->role][$account] += $riskInvest[$account];
}
}
krsort($personnelList);
return $personnelList;
}
+3 -1
View File
@@ -58,7 +58,8 @@
</tr>
</thead>
<tbody class="sortable">
<?php foreach($investList as $personnel):?>
<?php foreach($investList as $role => $personnelList):?>
<?php foreach($personnelList as $personnel):?>
<tr>
<td title='<?php echo $personnel['role'];?>' style="overflow: hidden; white-space:nowrap; text-overflow: ellipsis;"><?php echo $personnel['role'];?></td>
<td title='<?php echo $personnel['realname'];?>'><?php echo $personnel['realname'];?></td>
@@ -86,6 +87,7 @@
<?php endif;?>
</tr>
<?php endforeach;?>
<?php endforeach;?>
</tbody>
</table>
</form>