|
|
@@ -968,6 +968,13 @@ class StatisticService extends StatisticCommonService
|
|
|
if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
|
|
|
if(! empty($data['code'])) $model->where('code', 'LIKE', '%'.$data['code'].'%');
|
|
|
if(! empty($data['state'])) $model->where('state', $data['state']);
|
|
|
+ if(! empty($data['year'])) {
|
|
|
+ $return = $this->getYearRangeInfo($data['year']);
|
|
|
+ if (is_null($return)) return [false, '年度格式错误'];
|
|
|
+ list($month_start, $month_end) = $return;
|
|
|
+ $model->where("start_time", ">=", $month_start)
|
|
|
+ ->where("end_time", "<", $month_end);
|
|
|
+ }
|
|
|
|
|
|
$list = $model->get()->toArray();
|
|
|
if(empty($list)) return [true,[]];
|