|
|
|
@ -161,11 +161,14 @@ class PlatformController extends ThinkController
|
|
|
|
|
|
|
|
|
|
//获取公司累计注册
|
|
|
|
|
$sendData = [];
|
|
|
|
|
$departmentName = A("Market",'Event')->getDepartmentNameByMarketType('uid');
|
|
|
|
|
foreach($data as $k=>$v){
|
|
|
|
|
$promote = getPromoteByLevel(0,$v['id']);
|
|
|
|
|
$promote = getPromoteByLevel(0,$v['id'],'id, account, real_name , admin_id');
|
|
|
|
|
if(empty($promote)){
|
|
|
|
|
$promoteIds = '';
|
|
|
|
|
$v["department"] = '无';
|
|
|
|
|
}else{
|
|
|
|
|
$v["department"] = $departmentName[$promote[0]['admin_id']]??'无';
|
|
|
|
|
$promoteIds = implode(",",array_column($promote,"id"));
|
|
|
|
|
}
|
|
|
|
|
$list = self::setYearList($year);
|
|
|
|
@ -184,8 +187,6 @@ class PlatformController extends ThinkController
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dump($sendData);die();
|
|
|
|
|
|
|
|
|
|
$th = array_keys(self::setYearList($year));
|
|
|
|
|
$this->assign('th', $th);
|
|
|
|
|
$this->assign('list_data', $sendData);
|
|
|
|
@ -333,7 +334,7 @@ class PlatformController extends ThinkController
|
|
|
|
|
private static function setPromotePoolTitle($year,$type="promote")
|
|
|
|
|
{
|
|
|
|
|
if($type =="promote"){
|
|
|
|
|
$range = ["推广公司","内外团归属"];
|
|
|
|
|
$range = ["推广公司","内外团归属",'所属市场部'];
|
|
|
|
|
$csvFileName = '推广公司汇总.csv';
|
|
|
|
|
}else{
|
|
|
|
|
$range = ["游戏名称"];
|
|
|
|
@ -1046,10 +1047,14 @@ class PlatformController extends ThinkController
|
|
|
|
|
->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left')
|
|
|
|
|
->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : [];
|
|
|
|
|
|
|
|
|
|
$departmentName = A("Market",'Event')->getDepartmentNameByMarketType('nickname');
|
|
|
|
|
|
|
|
|
|
$companys = $companys ? array_column($companys, null, 'id') : [];
|
|
|
|
|
foreach ($data as &$item) {
|
|
|
|
|
$item['company_name'] = $companys[$item['id']]['company_name'] ?? '无';
|
|
|
|
|
$item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无';
|
|
|
|
|
$item['admin_department'] =$departmentName[$item['admin_username']] ?? '无';
|
|
|
|
|
|
|
|
|
|
if($item['id'] == 0){
|
|
|
|
|
$item['promote_account'] = C('OFFICIEL_CHANNEL');
|
|
|
|
|
} else {
|
|
|
|
@ -1061,6 +1066,7 @@ class PlatformController extends ThinkController
|
|
|
|
|
'company_name' => '公司',
|
|
|
|
|
"promote_account"=>"推广员账号",
|
|
|
|
|
'admin_username' => '市场专员',
|
|
|
|
|
'admin_department' => '所属市场部',
|
|
|
|
|
'relation_game_name' => '游戏',
|
|
|
|
|
"count"=>"累计注册",
|
|
|
|
|
"rand"=>"排行榜",
|
|
|
|
@ -1316,9 +1322,12 @@ class PlatformController extends ThinkController
|
|
|
|
|
->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left')
|
|
|
|
|
->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : [];
|
|
|
|
|
$companys = $companys ? array_column($companys, null, 'id') : [];
|
|
|
|
|
|
|
|
|
|
$departmentName = A("Market",'Event')->getDepartmentNameByMarketType('nickname');
|
|
|
|
|
foreach ($data as &$item) {
|
|
|
|
|
$item['company_name'] = $companys[$item['id']]['company_name'] ?? '无';
|
|
|
|
|
$item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无';
|
|
|
|
|
$item['admin_department'] = $departmentName[$item['admin_username']] ?? '无';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($_REQUEST['export'])){
|
|
|
|
@ -1332,6 +1341,7 @@ class PlatformController extends ThinkController
|
|
|
|
|
'company_name' => '公司',
|
|
|
|
|
"promote_account"=>"会长账号",
|
|
|
|
|
'admin_username' => '当前市场专员',
|
|
|
|
|
'admin_department' => '所属市场部',
|
|
|
|
|
'relation_game_name' => '游戏',
|
|
|
|
|
"count"=>"累计充值",
|
|
|
|
|
"unpay_count"=>"累计不结算充值",
|
|
|
|
|