|
|
@ -1207,7 +1207,7 @@ class CompanyStatementController extends ThinkController
|
|
|
|
$radioMap['_string'] = "start_time < {$end_time}";
|
|
|
|
$radioMap['_string'] = "start_time < {$end_time}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$map['tab_spend.pay_status'] = 1;
|
|
|
|
$map['tab_spend.pay_status'] = 1;
|
|
|
|
$map['pay_way'] = ['egt',0];
|
|
|
|
// $map['pay_way'] = ['egt',0];
|
|
|
|
|
|
|
|
|
|
|
|
$data = M("spend","tab_")
|
|
|
|
$data = M("spend","tab_")
|
|
|
|
->field("pay_amount,relation_game_id,relation_game_name,payed_time")
|
|
|
|
->field("pay_amount,relation_game_id,relation_game_name,payed_time")
|
|
|
@ -1268,7 +1268,17 @@ class CompanyStatementController extends ThinkController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($radioData as $key => $value) {
|
|
|
|
foreach ($relation_game_data as $rk => $rv) {
|
|
|
|
|
|
|
|
unset($radioMap['tab_company_game_ratio.relation_game_id']);
|
|
|
|
|
|
|
|
$radioMap['tab_company_game_ratio.relation_game_id'] = $rv;
|
|
|
|
|
|
|
|
$radioGameRatios = M("company_game_ratio","tab_")
|
|
|
|
|
|
|
|
->field("tab_company_game_ratio.*,game.relation_game_name")
|
|
|
|
|
|
|
|
->join("left join ({$game_data}) game on tab_company_game_ratio.relation_game_id=game.relation_game_id")
|
|
|
|
|
|
|
|
->where($radioMap)
|
|
|
|
|
|
|
|
->order("begin_time ASC")
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($radioGameRatios as $key => $value) {
|
|
|
|
|
|
|
|
|
|
|
|
if (strtotime(I('time_start')) <= $value['begin_time']) {
|
|
|
|
if (strtotime(I('time_start')) <= $value['begin_time']) {
|
|
|
|
$handleData[$_REQUEST['company_id']]['begin_time'][] = $value['begin_time'];
|
|
|
|
$handleData[$_REQUEST['company_id']]['begin_time'][] = $value['begin_time'];
|
|
|
@ -1319,7 +1329,7 @@ class CompanyStatementController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
//如果结算时间中有时间段间隔
|
|
|
|
//如果结算时间中有时间段间隔
|
|
|
|
if ($radioData[$key+1]) {
|
|
|
|
if ($radioData[$key+1]) {
|
|
|
|
if ($radioData[$key+1]['begin_time'] != ($value['end_time']+1)) {
|
|
|
|
if ($radioData[$key+1]['begin_time'] != ($value['end_time']+1)&&$value['end_time']!=0) {
|
|
|
|
$handleData[$_REQUEST['company_id']]['company_id'] = $_REQUEST['company_id'];
|
|
|
|
$handleData[$_REQUEST['company_id']]['company_id'] = $_REQUEST['company_id'];
|
|
|
|
$handleData[$_REQUEST['company_id']]['company_name'] = $companyData['company_name'];
|
|
|
|
$handleData[$_REQUEST['company_id']]['company_name'] = $companyData['company_name'];
|
|
|
|
$handleData[$_REQUEST['company_id']]['begin_time'][] = $value['end_time'] + 1;
|
|
|
|
$handleData[$_REQUEST['company_id']]['begin_time'][] = $value['end_time'] + 1;
|
|
|
@ -1331,7 +1341,8 @@ class CompanyStatementController extends ThinkController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// dump($handleData);die();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($handleData as $key => $value) {
|
|
|
|
foreach ($handleData as $key => $value) {
|
|
|
|
$handleData[$key]['row'] = 0;
|
|
|
|
$handleData[$key]['row'] = 0;
|
|
|
|
$timeArr = $value['begin_time'];
|
|
|
|
$timeArr = $value['begin_time'];
|
|
|
@ -1495,7 +1506,7 @@ class CompanyStatementController extends ThinkController
|
|
|
|
$amount_time['promote_id'] = '-1';
|
|
|
|
$amount_time['promote_id'] = '-1';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$amount_time['tab_spend.pay_status'] = 1;
|
|
|
|
$amount_time['tab_spend.pay_status'] = 1;
|
|
|
|
$amount_time['pay_way'] = ['egt',0];
|
|
|
|
// $amount_time['pay_way'] = ['egt',0];
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($statement_info as $k => $v) {
|
|
|
|
foreach ($statement_info as $k => $v) {
|
|
|
|
|
|
|
|
|
|
|
|