fix(report):更改两处计算错误。

This commit is contained in:
徐涛 2022-09-03 15:49:59 +08:00
parent 41c4dcea2e
commit 008ebcee79
2 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,7 @@ func (s *ReportSummary) CalculatePrices() {
s.ValleyPrice = decimal.NewNullDecimal(decimal.Zero)
}
s.Flat = s.Overall.Sub(s.Critical).Sub(s.Peak).Sub(s.Valley)
s.FlatFee = s.OverallFee.Sub(s.CriticalFee).Sub(s.PeakFee).Sub(s.ValleyFee)
s.FlatFee = s.ConsumptionFee.Decimal.Sub(s.CriticalFee).Sub(s.PeakFee).Sub(s.ValleyFee)
if s.Flat.GreaterThan(decimal.Zero) {
s.FlatPrice = decimal.NewNullDecimal(s.FlatFee.Div(s.Flat).RoundBank(8))
} else {

View File

@ -585,6 +585,7 @@ func (_ReportService) AssembleReportPublicity(reportId string) (*model.Publicity
Valley: summary.PublicConsumptionValley,
ValleyPrice: summary.ValleyPrice,
ValleyFee: summary.PublicConsumptionValleyFee,
Proportion: summary.PublicConsumptionProportion.Decimal,
}
otherCollection := model.OtherShouldCollectionPart{
MaintenanceFee: summary.FinalDilutedOverall,