feat(report):安排部分基本报表计算。

This commit is contained in:
徐涛
2022-08-21 11:31:26 +08:00
parent 17c9dee24f
commit 0eb3be025c
3 changed files with 70 additions and 14 deletions

View File

@@ -7,7 +7,6 @@ import (
"time"
"github.com/google/uuid"
"github.com/shopspring/decimal"
"xorm.io/builder"
)
@@ -155,13 +154,3 @@ func (_ReportService) RetreiveParkSummary(rid string) (*model.ReportSummary, err
}
return summary, nil
}
func (_ReportService) CheckSummaryOverall(summary model.ReportSummary) bool {
var sum = decimal.Sum(summary.Critical, summary.Peak, summary.Valley)
return sum.LessThan(summary.Overall)
}
func (_ReportService) CheckSummaryOverallFee(summary model.ReportSummary) bool {
var sum = decimal.Sum(summary.CriticalFee, summary.PeakFee, summary.ValleyFee)
return sum.LessThan(summary.OverallFee)
}