From 229d8d2a5056f23972a8bb858e81b38c6d65e7e0 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 15:37:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E5=AE=9A=E6=98=AF=E5=90=A6=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E8=BF=87=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 4bca64e9f..27394764c 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1152,19 +1152,32 @@ class CompanyStatementController extends ThinkController $statementInfo = json_decode($value['statement_info'],true);; if ($value['company_type'] == 2) { - $statementInfo = $statementInfo['game_list']; - } - foreach ($statementInfo as $k => $v) { - if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time - ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time - ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { - if (in_array($v['relation_game_id'], $relation_game_data)) { - $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + foreach ($statementInfo as $sk => $sv) { + $statementInfos = $sv['game_list']; + foreach ($statementInfos as $k => $v) { + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } + } + } + } + } else { + foreach ($statementInfo as $k => $v) { + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } } } } + // } }