|
|
|
@ -40,18 +40,19 @@ class PartnerController extends ThinkController
|
|
|
|
|
if (!empty(I('partner'))) {
|
|
|
|
|
$map['partner'] = ['like', '%' . I('partner') . '%'];
|
|
|
|
|
}
|
|
|
|
|
if (!empty(I('timestart'))) {
|
|
|
|
|
$timestart = strtotime(I('timestart'));
|
|
|
|
|
$map['_string'] = "contract_start_time >= {$timestart}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I('timeend'))) {
|
|
|
|
|
$timeend = strtotime(I('timeend') . ' 23:59:59');
|
|
|
|
|
if (!empty($map['_string'])) {
|
|
|
|
|
$map['_string'] .= " and ";
|
|
|
|
|
}
|
|
|
|
|
$map['_string'] .= " contract_end_time < {$timeend}";
|
|
|
|
|
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {
|
|
|
|
|
$time_start = strtotime($_REQUEST['timestart']);
|
|
|
|
|
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
|
|
|
|
|
$map["_string"] = "(contract_start_time BETWEEN {$time_start} AND {$time_end}) OR (contract_end_time BETWEEN {$time_start} AND {$time_end})";
|
|
|
|
|
} elseif (isset($_REQUEST['timestart'])) {
|
|
|
|
|
$time_start = strtotime($_REQUEST['timestart']);
|
|
|
|
|
$map["_string"] = "(contract_start_time >= {$time_start} ) OR (contract_end_time >= {$time_start})";
|
|
|
|
|
} elseif (isset($_REQUEST['timeend'])) {
|
|
|
|
|
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
|
|
|
|
|
$map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$page = intval(I('get.p', 0));
|
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
|
$row = intval(I('row', 0));
|
|
|
|
|