|
@@ -972,8 +972,8 @@ class StatisticService extends StatisticCommonService
|
|
|
$return = $this->getYearRangeInfo($data['year']);
|
|
$return = $this->getYearRangeInfo($data['year']);
|
|
|
if (is_null($return)) return [false, '年度格式错误'];
|
|
if (is_null($return)) return [false, '年度格式错误'];
|
|
|
list($month_start, $month_end) = $return;
|
|
list($month_start, $month_end) = $return;
|
|
|
- $model->where("start_time", ">=", $month_start)
|
|
|
|
|
- ->where("end_time", "<=", $month_end);
|
|
|
|
|
|
|
+ $model->where("start_time", "<", strtotime($month_end)) // 项目开始得比月份结束早
|
|
|
|
|
+ ->where("end_time", ">", strtotime($month_start)); // 项目结束得比月份开始晚
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$list = $model->get()->toArray();
|
|
$list = $model->get()->toArray();
|