forked from free-lancers/electricity_bill_calc_service
fix(#23): 修复获取园区公共电费概况有问题
This commit is contained in:
55
vo/meter.go
55
vo/meter.go
@@ -1,7 +1,9 @@
|
||||
package vo
|
||||
|
||||
import (
|
||||
"electricity_bill_calc/model"
|
||||
"electricity_bill_calc/types"
|
||||
"time"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
@@ -59,7 +61,7 @@ type SimplifiedMeterDetailResponse struct {
|
||||
Area decimal.Decimal `json:"area"`
|
||||
Enabled bool `json:"enabled"`
|
||||
MeterType int16 `json:"type"`
|
||||
AttachedAt types.DateTime `json:"attachedAt"`
|
||||
AttachedAt *types.DateTime `json:"attachedAt"`
|
||||
DetachedAt *types.DateTime `json:"detachedAt"`
|
||||
}
|
||||
type ReadableMeterQueryResponse struct {
|
||||
@@ -67,3 +69,54 @@ type ReadableMeterQueryResponse struct {
|
||||
Address *string `json:"address"`
|
||||
Park string `json:"park"`
|
||||
}
|
||||
|
||||
type ReportPublishResponse struct {
|
||||
//ID string
|
||||
ReportID string `json:"report_id" db:"report_id"` // 报告ID
|
||||
ParkMeterID string `json:"park_meter_id" db:"park_meter_id"` // 停车计费ID
|
||||
Overall model.ConsumptionUnit `json:"overall" db:"overall"` // 总体信息
|
||||
Critical model.ConsumptionUnit `json:"critical" db:"critical"` // 关键信息
|
||||
Peak model.ConsumptionUnit `json:"peak" db:"peak"` // 高峰信息
|
||||
Flat model.ConsumptionUnit `json:"flat" db:"flat"` // 平峰信息
|
||||
Valley model.ConsumptionUnit `json:"valley" db:"valley"` // 谷峰信息
|
||||
LossAdjust model.ConsumptionUnit `json:"loss_adjust" db:"loss_adjust"` // 损耗调整信息
|
||||
ConsumptionTotal float64 `json:"consumption_total" db:"consumption_total"` // 总消费量
|
||||
LossAdjustTotal float64 `json:"loss_adjust_total" db:"loss_adjust_total"` // 总损耗调整
|
||||
FinalTotal float64 `json:"final_total" db:"final_total"` // 最终总量
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"` // 创建时间
|
||||
LastModifiedAt time.Time `json:"last_modified_at" db:"last_modified_at"` // 最后修改时间
|
||||
Code string `json:"code" db:"code"` // 代码
|
||||
ParkID string `json:"park_id" db:"park_id"` // 停车场ID
|
||||
Address *string `json:"address" db:"address"` // 地址
|
||||
Ratio decimal.Decimal `json:"ratio" db:"ratio"` // 比率
|
||||
Seq int64 `json:"seq" db:"seq"` // 序列号
|
||||
Enabled bool `json:"enabled" db:"enabled"` // 是否启用
|
||||
MeterType int16 `json:"meter_type" db:"meter_type"` // 计量类型
|
||||
Building *string `json:"building" db:"building"` // 建筑物
|
||||
OnFloor *string `json:"on_floor" db:"on_floor"` // 楼层
|
||||
Area decimal.NullDecimal `json:"area" db:"area"` // 面积
|
||||
AttachedAt *types.DateTime `json:"attached_at" db:"attached_at"` // 附加时间
|
||||
DetachedAt *types.DateTime `json:"detached_at" db:"detached_at"` // 分离时间
|
||||
DisplayRatio float64 `json:"display_ratio" db:"display_ratio"` // 显示比例
|
||||
BuildingName *string `json:"building_name" db:"building_name"` // 建筑物名称
|
||||
PublicPooled int16 `json:"public_pooled" db:"public_pooled"` // 公共汇总
|
||||
}
|
||||
|
||||
type Public struct {
|
||||
Address *string `json:"address"` // 户址
|
||||
AdjustLoss model.ConsumptionUnit `json:"adjustLoss"` // 调整线损数据,仅运维可见,仅使用其中`amount`内容
|
||||
Area string `json:"area"` // 所辖面积
|
||||
AttachedAt *types.DateTime `json:"attachedAt"` // 接入系统时间,挂表
|
||||
Building *string `json:"building"` // 所在建筑ID
|
||||
BuildingName *string `json:"buildingName"` // 所在建筑名称
|
||||
Code string `json:"code"` // 表计表号
|
||||
DetachedAt *types.DateTime `json:"detachedAt"` // 从系统移除时间,拆表
|
||||
DisplayRatio string `json:"displayRatio"` // 表计表显倍率,仅用于展示。
|
||||
Enabled bool `json:"enabled"` // 是否可用
|
||||
OnFloor *string `json:"onFloor"` // 所在楼层
|
||||
Overall model.ConsumptionUnit `json:"overall"` // 总电量部分
|
||||
ParkID string `json:"parkId"` // 所属园区ID
|
||||
Ratio string `json:"ratio"` // 表计计算倍率,参与表计读数计算。
|
||||
Seq int64 `json:"seq"` // 抄表序号
|
||||
Type float64 `json:"type"` // 表计类型,0:商户电表,1:园区电表,2:公摊电表
|
||||
}
|
||||
|
Reference in New Issue
Block a user