feat(report):基本完成报表查看部分内容的迁移。

This commit is contained in:
徐涛
2023-06-26 13:08:34 +08:00
parent fa03bf5dbd
commit 2792959d1e
7 changed files with 754 additions and 1 deletions

View File

@@ -52,6 +52,13 @@ type ReportSummary struct {
FinalDilutedOverall decimal.NullDecimal `json:"finalDilutedOverall" db:"final_diluted_overall"`
}
func (rs ReportSummary) GetConsumptionFee() decimal.Decimal {
if !rs.ConsumptionFee.Valid {
return rs.Overall.Fee.Sub(rs.BasicFee).Sub(rs.AdjustFee)
}
return rs.ConsumptionFee.Decimal
}
type ReportPublicConsumption struct {
ReportId string `json:"reportId" db:"report_id"`
MeterId string `json:"parkMeterId" db:"park_meter_id"`