From a13193cfa4bf73703fd93c472b982c726dfc87a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Tue, 20 Sep 2022 06:39:57 +0800 Subject: [PATCH] =?UTF-8?q?enhance(publicity):=E5=90=91=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=9A=84=E7=BB=88=E7=AB=AF=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A2=9E=E5=8A=A0=E5=85=AC=E5=85=B1=E8=AE=BE?= =?UTF-8?q?=E6=96=BD=E4=B8=8E=E6=91=8A=E8=96=84=E6=A0=87=E8=AE=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/publicity.go | 26 ++++++++++++++------------ service/report.go | 26 ++++++++++++++------------ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/model/publicity.go b/model/publicity.go index b02830f..7249fd3 100644 --- a/model/publicity.go +++ b/model/publicity.go @@ -85,18 +85,20 @@ type MaintenancePart struct { } type EndUserSummary struct { - CustomerName *string `json:"customerName"` - Address *string `json:"address"` - MeterId string `json:"meterId"` - Overall decimal.Decimal `json:"overall"` - OverallFee decimal.Decimal `json:"overallFee"` - Critical decimal.NullDecimal `json:"critical"` - CriticalFee decimal.NullDecimal `json:"criticalFee"` - Peak decimal.NullDecimal `json:"peak"` - PeakFee decimal.NullDecimal `json:"peakFee"` - Valley decimal.NullDecimal `json:"valley"` - ValleyFee decimal.NullDecimal `json:"valleyFee"` - Maintenance decimal.Decimal `json:"maintenance"` + CustomerName *string `json:"customerName"` + Address *string `json:"address"` + MeterId string `json:"meterId"` + IsPublicMeter bool `json:"isPublicMeter"` + Diluted bool `json:"willDilute"` + Overall decimal.Decimal `json:"overall"` + OverallFee decimal.Decimal `json:"overallFee"` + Critical decimal.NullDecimal `json:"critical"` + CriticalFee decimal.NullDecimal `json:"criticalFee"` + Peak decimal.NullDecimal `json:"peak"` + PeakFee decimal.NullDecimal `json:"peakFee"` + Valley decimal.NullDecimal `json:"valley"` + ValleyFee decimal.NullDecimal `json:"valleyFee"` + Maintenance decimal.Decimal `json:"maintenance"` } type Publicity struct { diff --git a/service/report.go b/service/report.go index 6725192..2ec9526 100644 --- a/service/report.go +++ b/service/report.go @@ -701,18 +701,20 @@ func (_ReportService) AssembleReportPublicity(reportId string) (*model.Publicity report.EndUsers, func(elem *model.EndUserDetail, index int) model.EndUserSummary { return model.EndUserSummary{ - CustomerName: elem.CustomerName, - Address: elem.Address, - MeterId: elem.MeterId, - Overall: elem.Overall.Decimal, - OverallFee: elem.OverallFee.Decimal, - Critical: elem.Critical, - CriticalFee: elem.CriticalFee, - Peak: elem.Peak, - PeakFee: elem.PeakFee, - Valley: elem.Valley, - ValleyFee: elem.ValleyFee, - Maintenance: elem.FinalDiluted.Decimal, + CustomerName: elem.CustomerName, + Address: elem.Address, + MeterId: elem.MeterId, + IsPublicMeter: elem.IsPublicMeter, + Diluted: elem.WillDilute, + Overall: elem.Overall.Decimal, + OverallFee: elem.OverallFee.Decimal, + Critical: elem.Critical, + CriticalFee: elem.CriticalFee, + Peak: elem.Peak, + PeakFee: elem.PeakFee, + Valley: elem.Valley, + ValleyFee: elem.ValleyFee, + Maintenance: elem.FinalDiluted.Decimal, } }, )