diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 135d09342..82eb0728a 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -9328,6 +9328,15 @@ class ExportController extends Controller GROUP BY t.id $order"); } + if ($list) { + foreach ($list as &$item) + { + $item['total_create_count'] = $item['total_create_count'] ?? 0; + $item['total_accepted_count'] = $item['total_accepted_count'] ?? 0; + $item['total_handle_count'] = $item['total_handle_count'] ?? 0; + $item['total_complete_count'] = $item['total_complete_count'] ?? 0; + } + } $xlsName = '工单统计报表'; $xlsCell = array( array('nickname', "账号"), diff --git a/Application/Admin/Controller/StatisticsController.class.php b/Application/Admin/Controller/StatisticsController.class.php index c99dbed65..bda8b0c38 100644 --- a/Application/Admin/Controller/StatisticsController.class.php +++ b/Application/Admin/Controller/StatisticsController.class.php @@ -1248,7 +1248,12 @@ class StatisticsController extends ThinkController { $this->assign('_page', $page); } - $promoters = M('promote', 'tab_')->field('id, account')->where(array_merge(['level'=>$level], $pid ? ['parent_id'=>$pid] : []))->select(); + if ($pid && $level) { + $promoters = M('promote', 'tab_')->field('id, account')->where("level= $level and chain like '{$info['chain']}{$pid}/%'")->select(); + } else { + $promoters = M('promote', 'tab_')->field('id, account')->where(array_merge(['level'=>$level], $pid ? ['parent_id'=>$pid] : []))->select(); + } + unset($typeArr[0]); $this->assign('promoters', $promoters); $this->assign('types', $typeArr);