作者 jinglong
1 个管道 的构建 通过 耗费 2 秒

修改报表列表时间检索

... ... @@ -1222,7 +1222,7 @@ class CommonController extends RestBaseController
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('i.create_time', '<=', $endTime);
$query->where('i.create_time', '<', $endTime);
}
})
->page($data['page'],$limit)
... ... @@ -1256,7 +1256,7 @@ class CommonController extends RestBaseController
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('i.create_time', '<=', $endTime);
$query->where('i.create_time', '<', $endTime);
}
})
->group("i.project_id,DATE_FORMAT(FROM_UNIXTIME(i.create_time),'%Y-%m-%d')")
... ... @@ -1464,7 +1464,7 @@ class CommonController extends RestBaseController
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where($ins_m_time, '<=', $endTime);
$query->where($ins_m_time, '<', $endTime);
}
})
->page($data['page'],$limit)
... ... @@ -1515,9 +1515,9 @@ class CommonController extends RestBaseController
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
if($table == 'check'){
$query->where('c.ins_m_time', '<=', $endTime);
$query->where('c.ins_m_time', '<', $endTime);
}else{
$query->where('c.year_m_time', '<=', $endTime);
$query->where('c.year_m_time', '<', $endTime);
}
}
})
... ... @@ -1532,7 +1532,7 @@ class CommonController extends RestBaseController
$res = Db::name($table)
->alias('r')
->join('project p','r.project_id = p.id','LEFT')
->whereIn('r.project_id',$pids)
// ->whereIn('r.project_id',$pids)
->where(function ($query) use ($data) {
//状态
if (isset($data['status'])) {
... ... @@ -1560,7 +1560,7 @@ class CommonController extends RestBaseController
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('r.create_time', '<=', $endTime);
$query->where('r.create_time', '<', $endTime);
}
})
->page($data['page'],$limit)
... ... @@ -1577,7 +1577,7 @@ class CommonController extends RestBaseController
$count = Db::name($table)
->alias('r')
->join('project p','r.project_id = p.id','LEFT')
->whereIn('r.project_id',$pids)
// ->whereIn('r.project_id',$pids)
->where(function ($query) use ($data) {
//状态
if (isset($data['status'])) {
... ... @@ -1605,7 +1605,7 @@ class CommonController extends RestBaseController
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where('r.create_time', '<=', $endTime);
$query->where('r.create_time', '<', $endTime);
}
})
->count();
... ... @@ -1625,7 +1625,7 @@ class CommonController extends RestBaseController
$res = Db::name($table)
->alias('r')
->join('project p','r.project_id = p.id','LEFT')
->whereIn('r.project_id',$pids)
// ->whereIn('r.project_id',$pids)
->where(function ($query) use ($data,$train_time) {
//状态
if (isset($data['status'])) {
... ... @@ -1675,7 +1675,7 @@ class CommonController extends RestBaseController
$count = Db::name($table)
->alias('r')
->join('project p','r.project_id = p.id','LEFT')
->whereIn('r.project_id',$pids)
// ->whereIn('r.project_id',$pids)
->where(function ($query) use ($data,$train_time) {
//状态
if (isset($data['status'])) {
... ... @@ -1703,7 +1703,7 @@ class CommonController extends RestBaseController
}
if (!empty($endTime)) {
$endTime = strtotime(date('Y-m-d',$endTime))+86400;
$query->where($train_time, '<=', $endTime);
$query->where($train_time, '<', $endTime);
}
})
->count();
... ...