forked from free-lancers/electricity_bill_calc_service
feat(report):安排部分基本报表计算。
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user