|
|
|
@@ -1676,6 +1676,8 @@ func getDurationStatistic(beginTime time.Time, endTime time.Time) (models.Durati |
|
|
|
C2NetUsageDuration := make(map[string]int) |
|
|
|
OpenIDurationRate := models.DurationRateStatistic{} |
|
|
|
C2NetDurationRate := models.DurationRateStatistic{} |
|
|
|
log.Info("beginTimeis:", beginTime) |
|
|
|
log.Info("endTimeis:", endTime) |
|
|
|
cardDurationStatistics, err := models.GetCardDurationStatistics(&models.DurationStatisticOptions{ |
|
|
|
BeginTime: beginTime, |
|
|
|
EndTime: endTime, |
|
|
|
@@ -1711,6 +1713,8 @@ func getDurationStatistic(beginTime time.Time, endTime time.Time) (models.Durati |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
log.Info("OpenIUsageDurationis:", OpenIUsageDuration) |
|
|
|
log.Info("OpenITotalDurationis:", OpenITotalDuration) |
|
|
|
ResourceAiCenterRes, err := models.GetResourceAiCenters() |
|
|
|
if err != nil { |
|
|
|
log.Error("Can not get ResourceAiCenterRes.", err) |
|
|
|
@@ -1744,7 +1748,7 @@ func getDurationStatistic(beginTime time.Time, endTime time.Time) (models.Durati |
|
|
|
for _, v := range OpenITotalDuration { |
|
|
|
totalCanUse += float64(v) |
|
|
|
} |
|
|
|
for _, v := range OpenIUsageRate { |
|
|
|
for _, v := range OpenIUsageDuration { |
|
|
|
totalUse += float64(v) |
|
|
|
} |
|
|
|
if totalCanUse == 0 || totalUse == 0 { |
|
|
|
|