master
cody 3 months ago
parent 09c0a6ae40
commit 2396221e9d

@ -299,9 +299,16 @@ class CompanyController extends BaseController
}
// 当前周期被投企业数(与 courses-home 的 course_signs_invested_current 口径一致)
// 当 start_year、end_year 均为空时,不按课程日期过滤,与 courses-home 的 start_date=、end_date= 全周期一致
$yearStart = (empty($start_year) && empty($end_year)) ? null : $start_date;
$yearEnd = (empty($start_year) && empty($end_year)) ? null : $end_date;
// 优先 start_year/end_year均为空时若有 course_start_date、course_end_date 则用其对齐 courses-home 的 start_date/end_date否则 (null,null) 全周期
$yearStart = null;
$yearEnd = null;
if (!empty($start_year) || !empty($end_year)) {
$yearStart = $start_date;
$yearEnd = $end_date;
} elseif (!empty($all['course_start_date']) && !empty($all['course_end_date'])) {
$yearStart = $all['course_start_date'];
$yearEnd = $all['course_end_date'];
}
$yearInvestedCompanies = CourseSign::yhInvestedTotal($yearStart, $yearEnd, $course_ids, true);
if ($yearInvestedCompanies) {
$yearInvestedCompaniesCollection = collect($yearInvestedCompanies);

Loading…
Cancel
Save