导出线索增加团队长
This commit is contained in:
@@ -370,7 +370,10 @@ class Clues extends BaseController
|
||||
$count = $this->clues_model->count($where);
|
||||
if ($count) {
|
||||
$rows = $this->clues_model->select($where, $sort_order, $page, $limit);
|
||||
$users = $this->pingan_users_model->get_map_by_ids(array_column($rows, 'pingan_user_id'), 'id,userCode,username,centerNumber,orgName');
|
||||
$uIdArray = array_column($rows, 'pingan_user_id');
|
||||
$teamIdArray = array_column($rows, 'team_id');
|
||||
$userIdArray = array_merge($uIdArray, $teamIdArray);
|
||||
$users = $this->pingan_users_model->get_map_by_ids($userIdArray, 'id,userCode,username,centerNumber,orgName');
|
||||
//所在地区
|
||||
$county_id_arr = array_filter(array_unique(array_column($rows, 'county_id')));
|
||||
if ($county_id_arr) {
|
||||
@@ -391,6 +394,7 @@ class Clues extends BaseController
|
||||
}
|
||||
foreach ($rows as $v) {
|
||||
$belongUserName = $users[$v['pingan_user_id']] ? $users[$v['pingan_user_id']][0] : '';
|
||||
$teamUser = $users[$v['teamId']] ? $users[$v['teamId']][0] : [];
|
||||
$brandList = $this->receiver_enroll_model->getBrandsByMobile($v['mobile']);
|
||||
$poi = '';
|
||||
$area = '';
|
||||
@@ -433,6 +437,7 @@ class Clues extends BaseController
|
||||
'belongUserName' => $belongUserName ? $belongUserName['username'] . '(' . $belongUserName['userCode'] . ')' : '',
|
||||
'centerNumber' => $belongUserName['centerNumber'] ? Pingan_users_model::TYPE_CENTER[$belongUserName['centerNumber']] : '',
|
||||
'orgName' => $belongUserName['orgName'] ?: '',
|
||||
'teamUser' => $teamUser['username'] ?: '',
|
||||
'brandList' => implode(',', $brandList),
|
||||
'provinceName' => $area['province_name'] ?: '',
|
||||
'cityName' => $area['city_name'] ?: '',
|
||||
@@ -464,7 +469,7 @@ class Clues extends BaseController
|
||||
}
|
||||
$columns = [];
|
||||
if ($limit >= 10000) {
|
||||
$columns = ['姓名', '手机号', '订单编号', '归属', '中心', '机构', '关注车型', '所属省', '所属市', '主状态', '子状态', '是否解锁', '未解锁原因', '客户等级', '入池时间'];
|
||||
$columns = ['姓名', '手机号', '订单编号', '归属', '团队长', '中心', '机构', '关注车型', '所属省', '所属市', '主状态', '子状态', '是否解锁', '未解锁原因', '客户等级', '入池时间'];
|
||||
}
|
||||
return ['list' => $list, 'count' => $count, 'statusList' => $statusList, 'columns' => $columns];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user