fix(report):修复配电物业费部分的计算。
This commit is contained in:
parent
008ebcee79
commit
37971f6875
|
@ -55,6 +55,7 @@ type ReportSummary struct {
|
|||
MaintenanceDilutedPrice decimal.NullDecimal `xorm:"numeric(16,8)" json:"maintencanceDilutedPrice"`
|
||||
LossDilutedPrice decimal.NullDecimal `xorm:"numeric(16,8)" json:"lossDilutedPrice"`
|
||||
PublicConsumptionDilutedPrice decimal.NullDecimal `xorm:"numeric(16,8)" json:"publicConsumptionDilutedPrice"`
|
||||
MaintenanceOverall decimal.NullDecimal `xorm:"numeric(16,8)" json:"maintenanceOverall"`
|
||||
FinalDilutedOverall decimal.NullDecimal `xorm:"numeric(14,2)" json:"finalDilutedOverall"`
|
||||
}
|
||||
|
||||
|
|
|
@ -79,13 +79,13 @@ func (_CalculateService) ComprehensivelyCalculateReport(reportId string) (err er
|
|||
summary.PublicConsumption.Decimal = summary.PublicConsumption.Decimal.Add(eu.Overall.Decimal)
|
||||
summary.PublicConsumptionCritical.Decimal = summary.PublicConsumptionCritical.Decimal.Add(eu.Critical.Decimal)
|
||||
summary.PublicConsumptionPeak.Decimal = summary.PublicConsumptionPeak.Decimal.Add(eu.Peak.Decimal)
|
||||
summary.PublicConsumptionFlat.Decimal = summary.PublicConsumptionPeak.Decimal.Add(eu.Flat.Decimal)
|
||||
summary.PublicConsumptionFlat.Decimal = summary.PublicConsumptionFlat.Decimal.Add(eu.Flat.Decimal)
|
||||
summary.PublicConsumptionValley.Decimal = summary.PublicConsumptionValley.Decimal.Add(eu.Valley.Decimal)
|
||||
} else {
|
||||
summary.CustomerConsumption.Decimal = summary.CustomerConsumption.Decimal.Add(eu.Overall.Decimal)
|
||||
summary.CustomerConsumptionCritical.Decimal = summary.CustomerConsumptionCritical.Decimal.Add(eu.Critical.Decimal)
|
||||
summary.CustomerConsumptionPeak.Decimal = summary.CustomerConsumptionPeak.Decimal.Add(eu.Peak.Decimal)
|
||||
summary.CustomerConsumptionFlat.Decimal = summary.CustomerConsumptionPeak.Decimal.Add(eu.Flat.Decimal)
|
||||
summary.CustomerConsumptionFlat.Decimal = summary.CustomerConsumptionFlat.Decimal.Add(eu.Flat.Decimal)
|
||||
summary.CustomerConsumptionValley.Decimal = summary.CustomerConsumptionValley.Decimal.Add(eu.Valley.Decimal)
|
||||
}
|
||||
}
|
||||
|
@ -162,6 +162,7 @@ func (_CalculateService) ComprehensivelyCalculateReport(reportId string) (err er
|
|||
}
|
||||
|
||||
// 计算摊薄总计
|
||||
summary.MaintenanceOverall = decimal.NewNullDecimal(maintenanceFeeTotal)
|
||||
summary.FinalDilutedOverall = decimal.NewNullDecimal(
|
||||
summary.BasicFee.
|
||||
Add(summary.AdjustFee).
|
||||
|
|
|
@ -572,6 +572,7 @@ func (_ReportService) AssembleReportPublicity(reportId string) (*model.Publicity
|
|||
publicSummary := model.PublicConsumptionOverallPart{
|
||||
Overall: summary.PublicConsumption.Decimal,
|
||||
OverallPrice: summary.OverallPrice.Decimal,
|
||||
ConsumptionFee: summary.PublicConsumptionFee.Decimal,
|
||||
OverallFee: summary.PublicConsumptionFee.Decimal,
|
||||
Critical: summary.PublicConsumptionCritical,
|
||||
CriticalPrice: summary.CriticalPrice,
|
||||
|
@ -588,7 +589,7 @@ func (_ReportService) AssembleReportPublicity(reportId string) (*model.Publicity
|
|||
Proportion: summary.PublicConsumptionProportion.Decimal,
|
||||
}
|
||||
otherCollection := model.OtherShouldCollectionPart{
|
||||
MaintenanceFee: summary.FinalDilutedOverall,
|
||||
MaintenanceFee: summary.MaintenanceOverall,
|
||||
BasicFees: summary.BasicFee.Add(summary.AdjustFee),
|
||||
}
|
||||
finalMaintenance := lossPart.ConsumptionFee.Add(publicSummary.ConsumptionFee).Add(otherCollection.MaintenanceFee.Decimal).Add(otherCollection.BasicFees)
|
||||
|
|
Loading…
Reference in New Issue
Block a user