From 008ebcee7972dd5197a724a8eb3b186bd9c9f04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Sat, 3 Sep 2022 15:49:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(report):=E6=9B=B4=E6=94=B9=E4=B8=A4?= =?UTF-8?q?=E5=A4=84=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/report_summary.go | 2 +- service/report.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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,