fix(report):更改两处计算错误。
This commit is contained in:
parent
41c4dcea2e
commit
008ebcee79
@ -97,7 +97,7 @@ func (s *ReportSummary) CalculatePrices() {
|
|||||||
s.ValleyPrice = decimal.NewNullDecimal(decimal.Zero)
|
s.ValleyPrice = decimal.NewNullDecimal(decimal.Zero)
|
||||||
}
|
}
|
||||||
s.Flat = s.Overall.Sub(s.Critical).Sub(s.Peak).Sub(s.Valley)
|
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) {
|
if s.Flat.GreaterThan(decimal.Zero) {
|
||||||
s.FlatPrice = decimal.NewNullDecimal(s.FlatFee.Div(s.Flat).RoundBank(8))
|
s.FlatPrice = decimal.NewNullDecimal(s.FlatFee.Div(s.Flat).RoundBank(8))
|
||||||
} else {
|
} else {
|
||||||
|
@ -585,6 +585,7 @@ func (_ReportService) AssembleReportPublicity(reportId string) (*model.Publicity
|
|||||||
Valley: summary.PublicConsumptionValley,
|
Valley: summary.PublicConsumptionValley,
|
||||||
ValleyPrice: summary.ValleyPrice,
|
ValleyPrice: summary.ValleyPrice,
|
||||||
ValleyFee: summary.PublicConsumptionValleyFee,
|
ValleyFee: summary.PublicConsumptionValleyFee,
|
||||||
|
Proportion: summary.PublicConsumptionProportion.Decimal,
|
||||||
}
|
}
|
||||||
otherCollection := model.OtherShouldCollectionPart{
|
otherCollection := model.OtherShouldCollectionPart{
|
||||||
MaintenanceFee: summary.FinalDilutedOverall,
|
MaintenanceFee: summary.FinalDilutedOverall,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user