forked from free-lancers/electricity_bill_calc_service
带分页的待审核的核算撤回申请列表完成
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"electricity_bill_calc/types"
|
||||
"github.com/shopspring/decimal"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -17,10 +17,10 @@ type SimplifiedPark struct {
|
||||
Address *string `json:"address"` // 园区地址
|
||||
Area *string `json:"area"` // 园区面积
|
||||
Capacity *string `json:"capacity"` // 供电容量
|
||||
Category int16 `json:"category"` // 用电分类,0:两部制,1:单一峰谷,2:单一单一
|
||||
Category int16 `json:"category"` // 用电分类,0:两部制,1:单一峰谷,2:单一单一
|
||||
Contact *string `json:"contact"` // 园区联系人
|
||||
ID string `json:"id"` // 园区ID
|
||||
Meter04KvType int16 `json:"meter04kvType"` // 户表计量类型,0:非峰谷,1:峰谷
|
||||
Meter04KvType int16 `json:"meter04kvType"` // 户表计量类型,0:非峰谷,1:峰谷
|
||||
Name string `json:"name"` // 园区名称
|
||||
Phone *string `json:"phone"` // 园区联系人电话
|
||||
Region *string `json:"region"` // 园区所在行政区划
|
||||
@@ -30,17 +30,17 @@ type SimplifiedPark struct {
|
||||
|
||||
// 简易核算报表信息
|
||||
type SimplifiedReport struct {
|
||||
ID string `json:"id"` // 报表ID
|
||||
LastWithdrawAppliedAt *string `json:"lastWithdrawAppliedAt"` // 最后一次申请撤回的时间,格式为 yyyy-MM-dd HH:mm:ss
|
||||
LastWithdrawAuditAt *string `json:"lastWithdrawAuditAt"` // 最后一次申请审核的时间,格式为 yyyy-MM-dd HH:mm:ss
|
||||
Message *string `json:"message"` // 当前状态的错误提示
|
||||
ParkID string `json:"parkId"` // 所属园区ID
|
||||
PeriodBegin string `json:"periodBegin"` // 核算起始日期,格式为 yyyy-MM-dd
|
||||
PeriodEnd string `json:"periodEnd"` // 核算结束日期,格式为 yyyy-MM-dd
|
||||
Published bool `json:"published"` // 是否已发布
|
||||
PublishedAt *string `json:"publishedAt"` // 发布时间
|
||||
ID string `json:"id"` // 报表ID
|
||||
LastWithdrawAppliedAt *string `json:"lastWithdrawAppliedAt"` // 最后一次申请撤回的时间,格式为 yyyy-MM-dd HH:mm:ss
|
||||
LastWithdrawAuditAt *string `json:"lastWithdrawAuditAt"` // 最后一次申请审核的时间,格式为 yyyy-MM-dd HH:mm:ss
|
||||
Message *string `json:"message"` // 当前状态的错误提示
|
||||
ParkID string `json:"parkId"` // 所属园区ID
|
||||
PeriodBegin string `json:"periodBegin"` // 核算起始日期,格式为 yyyy-MM-dd
|
||||
PeriodEnd string `json:"periodEnd"` // 核算结束日期,格式为 yyyy-MM-dd
|
||||
Published bool `json:"published"` // 是否已发布
|
||||
PublishedAt *string `json:"publishedAt"` // 发布时间
|
||||
Status float64 `json:"status,omitempty"` // 当前状态,0:计算任务已队列,1:计算任务已完成,2:计算数据不足
|
||||
Withdraw int16 `json:"withdraw"` // 报表撤回状态,0:未撤回,1:申请撤回中,2:申请拒绝,3:申请批准
|
||||
Withdraw int16 `json:"withdraw"` // 报表撤回状态,0:未撤回,1:申请撤回中,2:申请拒绝,3:申请批准
|
||||
}
|
||||
|
||||
// 简易用户信息
|
||||
@@ -48,30 +48,37 @@ type UserInfos struct {
|
||||
Address *string `json:"address"` // 用户地址
|
||||
Contact *string `json:"contact"` // 用户联系人
|
||||
ID string `json:"id"` // 用户ID
|
||||
Name *string `json:"name"` // 用户名称
|
||||
Name *string `json:"name"` // 用户名称
|
||||
Phone *string `json:"phone"` // 用户联系人电话
|
||||
Region *string `json:"region"` // 用户所在行政区划
|
||||
}
|
||||
|
||||
//用于映射数据库的报表结构体
|
||||
type Report struct {
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
LastModifiedAt sql.NullTime `db:"last_modified_at"`
|
||||
ID string `db:"id"`
|
||||
ParkID string `db:"park_id"`
|
||||
Period types.DateRange `db:"period"`
|
||||
Published bool `db:"published"`
|
||||
PublishedAt sql.NullTime `db:"published_at"`
|
||||
Withdraw int16 `db:"withdraw"`
|
||||
LastWithdrawAppliedAt sql.NullTime `db:"last_withdraw_applied_at"`
|
||||
LastWithdrawAuditAt sql.NullTime `db:"last_withdraw_audit_at"`
|
||||
Category int16 `db:"category"`
|
||||
Meter04KVType int16 `db:"meter_04kv_type"`
|
||||
PricePolicy int16 `db:"price_policy"`
|
||||
BasisPooled int16 `db:"basis_pooled"`
|
||||
AdjustPooled int16 `db:"adjust_pooled"`
|
||||
LossPooled int16 `db:"loss_pooled"`
|
||||
PublicPooled int16 `db:"public_pooled"`
|
||||
AuthorizedLossRate float64 `db:"authorized_loss_rate"`
|
||||
AuthorizedLossRateIncr float64 `db:"authorized_loss_rate_increment"`
|
||||
type ReportRes struct {
|
||||
ReportId string `db:"report_id"`
|
||||
LastWithdrawAppliedAt *time.Time `db:"last_withdraw_applied_at"`
|
||||
LastWithdrawAuditAt *time.Time `db:"last_withdraw_audit_at"`
|
||||
ParkID string `db:"report_park_id"`
|
||||
Period types.DateRange `db:"period"`
|
||||
Published bool `db:"published"`
|
||||
PublishedAt *time.Time `db: "published_at"`
|
||||
Withdraw int16 `db:"withdraw"`
|
||||
ParkAddress *string `db:"park_address"`
|
||||
Area decimal.NullDecimal `db:"area"`
|
||||
Capacity decimal.NullDecimal `db:"capacity"`
|
||||
Category int16
|
||||
ParkContact *string `db:"park_contact"`
|
||||
ParkId string `db:"park_id"`
|
||||
Meter04KVType int16 `db:"meter_04kv_type"`
|
||||
ParkName string `db:"park_name"`
|
||||
ParkPhone *string `db:"park_phone"`
|
||||
ParkRegion string `db:"park_region"`
|
||||
TenementQuantity decimal.NullDecimal `db:"tenement_quantity"`
|
||||
UserID string `db:"user_id"`
|
||||
Address *string
|
||||
Contact string `db:"user_detail_contact"`
|
||||
ID string `db:"ud_id"`
|
||||
Name *string `db:"user_detail_name"`
|
||||
Phone string `db:"user_detail_phone"`
|
||||
Region *string `db:"user_detail_region"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user