Merge branch 'develop' into educoder

dev_aliyun
daiao 5 years ago
commit 9a974edbba

@ -1746,7 +1746,7 @@ end
# 删除
def delete_applied_departments
transaction do
ActiveRecord::Base.transaction do
applied_department = ApplyAddDepartment.find params[:depart_id]
applied_message = AppliedMessage.where(:applied_id => applied_department.id, :applied_type => "ApplyAddDepartment")
applied_message.update_all(:status => 3)

@ -9,9 +9,9 @@ module EcMajorSchoolsHelper
subitem_ids = ec_year.ec_graduation_subitems.reorder(nil).pluck(:id)
relations = EcGraduationRequirementCalculation.joins(ec_course_support: :ec_graduation_subitem_courses).where('ec_graduation_subitem_id in (?)', subitem_ids)
relations = EcGraduationRequirementCalculation.joins(ec_course_support: :ec_graduation_subitem_courses).where('ec_graduation_subitem_courses.ec_graduation_subitem_id in (?)', subitem_ids)
reached_map = relations.where(status: true).group('ec_graduation_subitem_id').count
reached_map = relations.where(status: true).group('ec_graduation_subitem_courses.ec_graduation_subitem_id').count
reached_map.keys.size
end

Loading…
Cancel
Save