mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
修复:BigDecimal 改为to_f
This commit is contained in:
@@ -17,7 +17,8 @@ class Api::Pm::SprintIssuesController < Api::Pm::BaseController
|
||||
data = []
|
||||
curren_issues = @issues.group(:status_id, :due_date).count
|
||||
total_count = @issues.count
|
||||
cardinality = BigDecimal.new(total_count) / BigDecimal.new(time_count)
|
||||
cardinality = (total_count.zero? || time_count.zero?) ? 0 : total_count.to_f / time_count.to_f
|
||||
# cardinality = BigDecimal.new(total_count) / BigDecimal.new(time_count)
|
||||
time_count.times do |x|
|
||||
e_time = start_time + x
|
||||
completed = curren_issues[[5, e_time]].to_i + curren_issues[[3, e_time]].to_i - @issues.where(pm_issue_type: 3, status_id: 3).size
|
||||
|
||||
Reference in New Issue
Block a user