Merge branch 'new_change' of wmtx/platform into master

汇总bug修改
master
廖金灵 4 years ago committed by Gogs
commit da2dc09690

@ -367,7 +367,9 @@ class CompanyStatementPoolController extends ThinkController
if($is_export){
$v['statement_money'] = "=ROUND(";
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;
$row = 0;
foreach($v['statement_info'] as $ke=>&$va){
$va['row'] = count($va['game_list']);
@ -408,9 +410,7 @@ class CompanyStatementPoolController extends ThinkController
}
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;
$v['row'] = $row;
@ -427,6 +427,7 @@ class CompanyStatementPoolController extends ThinkController
}
}
if($is_export){
$count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)";
$count["week_money"] = "=ROUND(SUM(R2:R".$line."),2)";
@ -443,7 +444,7 @@ class CompanyStatementPoolController extends ThinkController
$game_list = [];
$old_line = $week_line;
// dump($statement_info);
//使用时间与会长账号作为键值分离数据
foreach($statement_info as $sk=>$sv){
@ -455,6 +456,7 @@ class CompanyStatementPoolController extends ThinkController
}
}
// dump($game_list);
$game_data = [];
$handle_data = [];
@ -495,6 +497,7 @@ class CompanyStatementPoolController extends ThinkController
}
}
// dump($handle_data);
$substract = 1;
// dump($game_list);
// dump($handle_data);
@ -503,6 +506,7 @@ class CompanyStatementPoolController extends ThinkController
foreach($handle_data as $hk => $hv) {
if($hk > 0) {
for (;;) {
if (!$handle_data[$hk-$substract]['time']) {
@ -512,64 +516,92 @@ class CompanyStatementPoolController extends ThinkController
}
}
// if (
//// $hv['account'] == 'zj9587' ||
// $hv['account'] == 'ruiyou' || $hv['account'] == 'weicheng') {
// dump($handle_data);
// }
// dump($hv);
if ($hv['time'] == $handle_data[$hk-$substract]['time']&&!$is_export) {
if ($hv['time'] == $handle_data[$hk-$substract]['time']) {
$handle_data[$hk-$substract]['time_row'] += $handle_data[$hk]['time_row'];
if ($is_export) {
$week_line++;
$handle_data[$hk-$substract]['week_amount'] = "=ROUND(SUM(O{$old_line}:O{$week_line}),2)";
$old_line++;
} else {
$handle_data[$hk-$substract]['week_amount'] += $handle_data[$hk]['week_amount'];
}
$handle_data[$hk-$substract]['week_amount'] += $handle_data[$hk]['week_amount'];
unset($handle_data[$hk]['time']);
unset($handle_data[$hk]['time_row']);
unset($handle_data[$hk]['week_amount']);
} else {
if ($is_export) {
// dump($old_line);
if (count($hv['game_list'])>1) {
$week_line += count($hv['game_list'])-1;
}
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(O{$old_line}:O{$week_line}),2)";
$old_line++;
$week_line++;
}
}
$substract = 1;
}else {
if ($is_export) {
if (count($hv['game_list'])>1) {
$week_line += count($hv['game_list'])-1;
}
}
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(O{$old_line}:O{$week_line}),2)";
}
// $substract = 0;
foreach($handle_data as $hk => $hv) {
$substract = 1;
if ($is_export) {
// if (
//// $hv['account'] == 'zj9587' ||
// $hv['account'] == 'ruiyou' || $hv['account'] == 'weicheng') {
// dump($handle_data);
// }
for (;;) {
if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]['account']) {
// if (
// $hv['account'] == 'zj9587' ||
// $hv['account'] == 'ruiyou' || $hv['account'] == 'weicheng') {
// dump($handle_data[$hk]['time']);
// }
if (count($hv['game_list'])>1) {
$old_line += count($hv['game_list'])-1;
$week_line++;
$substract++;
} else {
$old_line++;
break;
}
if(count($hv['game_list'])>1) {
}
$week_line = $old_line + 1;
} else {
$week_line = $old_line;
}
if (count($hv['game_list'])>1) {
$week_line += count($hv['game_list'])-1;
}
// if (
//// $hv['account'] == 'zj9587' ||
// $hv['account'] == 'ruiyou' || $hv['account'] == 'weicheng') {
// dump($handle_data);
// }
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(O{$old_line}:O{$week_line}),2)";
if (count($hv['game_list'])>1) {
$old_line += count($hv['game_list']);
// if (
//// $hv['account'] == 'zj9587' ||
// $hv['account'] == 'DCX1012' || $hv['account'] == 'chuangshi168') {
// dump($old_line);
// }
} else {
$old_line++;
}
if(count($hv['game_list'])>1) {
$week_line = $old_line ;
} else {
$week_line = $old_line;
}
// if (
//// $hv['account'] == 'zj9587' ||
// $hv['account'] == 'DCX1012' || $hv['account'] == 'chuangshi168') {
// dump($week_line);
// }
}
}
// dump($handle_data);
return $handle_data?$handle_data:[];
}

Loading…
Cancel
Save