优化上游结算检索

master
chenzhi 4 years ago
parent e5d31aedf9
commit 75c7b635b6

@ -54,13 +54,13 @@ class CompanyStatementController extends ThinkController
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']); $time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399; $time_end = strtotime($_REQUEST['time_end'])+ 86399;
$map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end})"; $map["_string"] = "( (statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end}) )";
} elseif (isset($_REQUEST['time_start'])) { } elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']); $time_start = strtotime($_REQUEST['time_start']);
$map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})"; $map["_string"] = "( (statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start}) )";
} elseif (isset($_REQUEST['time_end'])) { } elseif (isset($_REQUEST['time_end'])) {
$time_end = strtotime($_REQUEST['time_end'])+ 86399; $time_end = strtotime($_REQUEST['time_end'])+ 86399;
$map["_string"] = "(statement_begin_time <= {$time_end} ) OR (statement_end_time <= {$time_end})"; $map["_string"] = "( (statement_begin_time <= {$time_end} ) OR (statement_end_time <= {$time_end}) )";
} }
if (isset($_REQUEST['time_start2']) && isset($_REQUEST['time_end2'])) { if (isset($_REQUEST['time_start2']) && isset($_REQUEST['time_end2'])) {
@ -144,7 +144,7 @@ class CompanyStatementController extends ThinkController
if(isset($_REQUEST['confirm_status'])){ if(isset($_REQUEST['confirm_status'])){
$map['confirm_status'] = $_REQUEST['confirm_status']; $map['confirm_status'] = $_REQUEST['confirm_status'];
} }
// dd($map);
// $this->checkListOrCountAuthRestMap($map);//导出权限 // $this->checkListOrCountAuthRestMap($map);//导出权限
//条件end //条件end
$data = M("company_statement","tab_") $data = M("company_statement","tab_")

Loading…
Cancel
Save