enhance(report):增加检查录入园区电量的功能。
This commit is contained in:
parent
9d7e96e4fa
commit
941c08ca89
@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/shopspring/decimal"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
@ -151,3 +152,8 @@ 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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user