master
ELF 3 years ago
parent 13ab7e86ae
commit 647e612677

@ -2893,8 +2893,11 @@ function getAdminDepartmentList(array $ids)
return [];
}
$rows = M('auth_group_access', 'sys_')->field(['uid', 'group_id'])->where(['uid' => ['in', $ids]])->select();
$groups = M('auth_group', 'sys_')->field(['id', 'department_id', 'department_name'])->where(['id' => ['in', array_column($rows, 'group_id')]])->select();
$groups = index_by_column('id', $groups);
$groups = [];
if (count($groups) > 0) {
$groups = M('auth_group', 'sys_')->field(['id', 'department_id', 'department_name'])->where(['id' => ['in', array_column($rows, 'group_id')]])->select();
$groups = index_by_column('id', $groups);
}
$items = [];
foreach ($rows as $row) {
$group = $groups[$row['group_id']] ?? null;
@ -2907,7 +2910,11 @@ function getGroupDepartmentList(array $ids = null)
{
$map = [];
if ($ids) {
$map['id'] = ['in', $ids];
if (count($ids) > 0) {
$map['id'] = ['in', $ids];
} else {
$map['id'] = ['in', [-1]];
}
}
$groups = M('auth_group', 'sys_')->field(['id', 'department_id', 'department_name'])->where($map)->select();
$items = [];

@ -110,6 +110,7 @@
<th>开发类型</th>
<th>市场专员</th>
<th>所属市场部</th>
<th>下游性质</th>
<th>产品</th>
<th>产品类型</th>
@ -158,6 +159,13 @@
<td rowspan="{$com.row}">{$com.company_info.company_relation_str}</td>
<td rowspan="{$com.row}">{$com.company_info.nickname}</td>
<notempty name="com['statement_info']">
<td rowspan="{$com.row}">{:getAdminDepartmentNameByPromoteAccount($com['statement_info'][0]['account'])}</td>
<else />
<td rowspan="{$com.row}">-</td>
</notempty>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>
<notempty name="com['statement_info'][0]['game_list']">

@ -110,6 +110,7 @@
<th>开发类型</th>
<th>市场专员</th>
<th>所属市场部</th>
<th>下游性质</th>
<th>产品</th>
<th>产品类型</th>
@ -158,6 +159,11 @@
<td rowspan="{$com.row}">{$com.company_info.company_relation_str}</td>
<td rowspan="{$com.row}">{$com.company_info.nickname}</td>
<notempty name="com['statement_info']">
<td rowspan="{$com.row}">{:getAdminDepartmentNameByPromoteAccount($com['statement_info'][0]['account'])}</td>
<else />
<td rowspan="{$com.row}">-</td>
</notempty>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>
<notempty name="com['statement_info'][0]['game_list']">

@ -162,7 +162,7 @@
<notempty name="com['statement_info']">
<td rowspan="{$com.row}">{:getAdminDepartmentNameByPromoteAccount($com['statement_info'][0]['account'])}</td>
<else />
<td>-</td>
<td rowspan="{$com.row}">-</td>
</notempty>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>

Loading…
Cancel
Save