Merge branch 'feature/fix_work_order' of wmtx/platform into release

修复统计问题
master
廖金灵 5 years ago committed by Gogs
commit a6dffecaf9

@ -9328,6 +9328,15 @@ class ExportController extends Controller
GROUP BY t.id GROUP BY t.id
$order"); $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 = '工单统计报表'; $xlsName = '工单统计报表';
$xlsCell = array( $xlsCell = array(
array('nickname', "账号"), array('nickname', "账号"),

@ -1248,7 +1248,12 @@ class StatisticsController extends ThinkController {
$this->assign('_page', $page); $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]); unset($typeArr[0]);
$this->assign('promoters', $promoters); $this->assign('promoters', $promoters);
$this->assign('types', $typeArr); $this->assign('types', $typeArr);

Loading…
Cancel
Save