diff --git a/model/report_summary.go b/model/report_summary.go index b229aeb..02dea90 100644 --- a/model/report_summary.go +++ b/model/report_summary.go @@ -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 { diff --git a/service/report.go b/service/report.go index 87b94bd..71eb84e 100644 --- a/service/report.go +++ b/service/report.go @@ -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,