diff --git a/app/services/management/school_report_service.rb b/app/services/management/school_report_service.rb
index 785786b2..981498cd 100644
--- a/app/services/management/school_report_service.rb
+++ b/app/services/management/school_report_service.rb
@@ -83,11 +83,11 @@ class Management::SchoolReportService
.select("#{base_query_column}, COUNT(*) student_count")
when 'homework_count' then
schools.joins('LEFT JOIN courses ON courses.school_id = schools.id')
- .joins('LEFT JOIN homework_commons hc ON shc.course_id = courses.id AND hc.homework_type = 4')
+ .joins('LEFT JOIN homework_commons hc ON hc.course_id = courses.id AND hc.homework_type = 4')
.select("#{base_query_column}, COUNT(*) homework_count")
when 'other_homework_count' then
schools.joins('LEFT JOIN courses ON courses.school_id = schools.id')
- .joins('LEFT JOIN homework_commons hc ON shc.course_id = courses.id AND hc.homework_type IN (1, 3)')
+ .joins('LEFT JOIN homework_commons hc ON hc.course_id = courses.id AND hc.homework_type IN (1, 3)')
.select("#{base_query_column}, COUNT(*) other_homework_count")
when 'course_count' then
schools.joins('LEFT JOIN courses cs ON cs.school_id = schools.id AND cs.is_delete = 0')
diff --git a/app/views/managements/schools/_data_contrast_list.html.erb b/app/views/managements/schools/_data_contrast_list.html.erb
index 88eb4c6b..c25a8bc4 100644
--- a/app/views/managements/schools/_data_contrast_list.html.erb
+++ b/app/views/managements/schools/_data_contrast_list.html.erb
@@ -21,8 +21,8 @@
序号 |
ID |
单位名称 |
- 时段一 <%= "(#{params[:begin_date]} 05:00至#{params[:end_date]} 05:00)" %> |
- 时段二 <%= "(#{params[:other_begin_date]} 05:00至#{params[:other_end_date]} 05:00)" %> |
+ 时段一 <%= "(#{params[:begin_date]} 05:00至#{(Time.zone.parse(params[:end_date]) + 1.days).strftime('%Y-%m-%d')} 05:00)" %> |
+ 时段二 <%= "(#{params[:other_begin_date]} 05:00至#{(Time.zone.parse(params[:other_end_date]) + 1.days).strftime('%Y-%m-%d')} 05:00)" %> |
<%= sort_tag('变化情况', name: 'percentage', path: school_data_contrast_managements_path) %>
( 新 增 数 | 新增百分比)
diff --git a/app/views/managements/schools/_data_grow_list.html.erb b/app/views/managements/schools/_data_grow_list.html.erb
index 81976044..af1fc200 100644
--- a/app/views/managements/schools/_data_grow_list.html.erb
+++ b/app/views/managements/schools/_data_grow_list.html.erb
@@ -1,12 +1,7 @@
统计总计:
<% if params[:grow_begin_date].present? %>
- <% if params[:grow_begin_date] == params[:grow_end_date] %>
- <%= Time.zone.parse(params[:grow_begin_date]).beginning_of_day.strftime('%Y-%m-%d') %> 05:00至
- <%= (Time.zone.parse(params[:grow_begin_date]).beginning_of_day + 1.days).strftime('%Y-%m-%d') %> 05:00
- <% else %>
- <%= params[:grow_begin_date] %> 05:00至<%= (Time.zone.parse(params[:grow_end_date]) + 1.days).strftime('%Y-%m-%d') %> 05:00
- <% end %>
+ <%= params[:grow_begin_date] %> 05:00至<%= (Time.zone.parse(params[:grow_end_date]) + 1.days).strftime('%Y-%m-%d') %> 05:00
<% else %>
<%= (Time.current - 5.hour).beginning_of_day.ago(1.days).strftime('%Y-%m-%d') %> 05:00至
<%= (Time.current - 5.hour).beginning_of_day.strftime('%Y-%m-%d') %> 05:00,
|