...
|
...
|
@@ -235,7 +235,35 @@ class VolunteerController extends AdminBaseController |
|
|
|
|
|
public function excels()
|
|
|
{
|
|
|
// $where = [];
|
|
|
// $param = $this->request->param();
|
|
|
// $startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
|
|
|
// $endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
|
|
|
// if (!empty($startTime) && !empty($endTime)) {
|
|
|
// $where['create_time'] = [['>= time', $startTime], ['<= time', $endTime]];
|
|
|
// } else {
|
|
|
// if (!empty($startTime)) {
|
|
|
// $where['create_time'] = ['>= time', $startTime];
|
|
|
// }
|
|
|
// if (!empty($endTime)) {
|
|
|
// $where['create_time'] = ['<= time', $endTime];
|
|
|
// }
|
|
|
// }
|
|
|
// $category = empty($param['category']) ? '' : $param['category'];
|
|
|
// if (!empty($category)) {
|
|
|
// $where['status'] = ['eq', "$category"];
|
|
|
// }
|
|
|
// $type = empty($param['type']) ? '' : $param['type'];
|
|
|
// if (!empty($type)) {
|
|
|
// $where['type'] = ['eq', "$type"];
|
|
|
// }
|
|
|
// $keyword = empty($param['keyword']) ? '' : $param['keyword'];
|
|
|
// if (!empty($keyword)) {
|
|
|
// $where['name|province|city|county|email|move_phone|fixed_phone|card_number|school|postcode|nation|politics|sex|urgency_phone|qq'] = ['like', "%$keyword%"];
|
|
|
// }
|
|
|
|
|
|
$where = [];
|
|
|
$where1 = [];
|
|
|
$param = $this->request->param();
|
|
|
$startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
|
|
|
$endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
|
...
|
...
|
@@ -257,14 +285,31 @@ class VolunteerController extends AdminBaseController |
|
|
if (!empty($type)) {
|
|
|
$where['type'] = ['eq', "$type"];
|
|
|
}
|
|
|
$sex = empty($param['sex']) ? '' : $param['sex'];
|
|
|
if (!empty($sex)) {
|
|
|
$where['sex'] = ['eq', "$sex"];
|
|
|
}
|
|
|
$level = empty($param['level']) ? '' : $param['level'];
|
|
|
if (!empty($level)) {
|
|
|
$level_map['level'] = ['eq', "$level"];
|
|
|
$level=\db('level')->where('level',$level)->find();
|
|
|
$where['work_time']=['>=',$level['min']];
|
|
|
$where1['work_time']=['<',$level['max']];
|
|
|
|
|
|
}
|
|
|
$keyword = empty($param['keyword']) ? '' : $param['keyword'];
|
|
|
if (!empty($keyword)) {
|
|
|
$where['name|province|city|county|email|move_phone|fixed_phone|card_number|school|postcode|nation|politics|sex|urgency_phone|qq'] = ['like', "%$keyword%"];
|
|
|
}
|
|
|
$addr = empty($param['addr']) ? '' : $param['addr'];
|
|
|
if (!empty($addr)) {
|
|
|
$where['addr'] = ['like', "%$addr%"];
|
|
|
}
|
|
|
|
|
|
$data = Db::name('volunteer')
|
|
|
->where('delete_time', 0)
|
|
|
->where($where)
|
|
|
->where($where1)
|
|
|
->order('create_time asc')
|
|
|
->select()->toArray();
|
|
|
|
...
|
...
|
|