chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,246 @@
|
||||
// Package genin
|
||||
// @Link https://github.com/xiujiecn/xiu-admin
|
||||
// @Copyright Copyright (c) 2026 LiXiujie
|
||||
// @Author Lxj <xxx@example.com>
|
||||
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
|
||||
// @AutoGenerate Version
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/xgorm/hook"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/entity"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TConsumeAccountMonthBillUpdateFields 修改消费账户月账单表字段过滤
|
||||
type TConsumeAccountMonthBillUpdateFields struct {
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
AccountPeriod string `json:"accountPeriod" dc:"账期YYYY-MM"`
|
||||
OpeningBalance float64 `json:"openingBalance" dc:"月初余额"`
|
||||
RechargeIncome float64 `json:"rechargeIncome" dc:"充值收入"`
|
||||
WithdrawableTransferInIncome float64 `json:"withdrawableTransferInIncome" dc:"可提现转入收入"`
|
||||
ManualAdjustIncome float64 `json:"manualAdjustIncome" dc:"人工调账收入"`
|
||||
RefundIncome float64 `json:"refundIncome" dc:"退款收入"`
|
||||
ConsumeExpense float64 `json:"consumeExpense" dc:"平台消费支出"`
|
||||
BalanceTransferOutExpense float64 `json:"balanceTransferOutExpense" dc:"转可提现支出"`
|
||||
ManualAdjustExpense float64 `json:"manualAdjustExpense" dc:"人工调账支出"`
|
||||
ConsumeCreditRepayExpense float64 `json:"consumeCreditRepayExpense" dc:"消费账户还款支出"`
|
||||
TotalIncome float64 `json:"totalIncome" dc:"本月收入总额"`
|
||||
TotalExpense float64 `json:"totalExpense" dc:"本月支出总额"`
|
||||
ClosingBalance float64 `json:"closingBalance" dc:"月末余额(月初余额+本月收入-本月支出)"`
|
||||
IncomeCount int `json:"incomeCount" dc:"收入笔数"`
|
||||
ExpenseCount int `json:"expenseCount" dc:"支出笔数"`
|
||||
CreditUsed float64 `json:"creditUsed" dc:"本月使用信用额度"`
|
||||
CreditRepaid float64 `json:"creditRepaid" dc:"本月还款信用额度"`
|
||||
BillStatus int `json:"billStatus" dc:"账单状态:1正常,2已调整,3已作废"`
|
||||
SettleTime *gtime.Time `json:"settleTime" dc:"结算时间"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
// TConsumeAccountMonthBillInsertFields 新增消费账户月账单表字段过滤
|
||||
type TConsumeAccountMonthBillInsertFields struct {
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
AccountPeriod string `json:"accountPeriod" dc:"账期YYYY-MM"`
|
||||
OpeningBalance float64 `json:"openingBalance" dc:"月初余额"`
|
||||
RechargeIncome float64 `json:"rechargeIncome" dc:"充值收入"`
|
||||
WithdrawableTransferInIncome float64 `json:"withdrawableTransferInIncome" dc:"可提现转入收入"`
|
||||
ManualAdjustIncome float64 `json:"manualAdjustIncome" dc:"人工调账收入"`
|
||||
RefundIncome float64 `json:"refundIncome" dc:"退款收入"`
|
||||
ConsumeExpense float64 `json:"consumeExpense" dc:"平台消费支出"`
|
||||
BalanceTransferOutExpense float64 `json:"balanceTransferOutExpense" dc:"转可提现支出"`
|
||||
ManualAdjustExpense float64 `json:"manualAdjustExpense" dc:"人工调账支出"`
|
||||
ConsumeCreditRepayExpense float64 `json:"consumeCreditRepayExpense" dc:"消费账户还款支出"`
|
||||
TotalIncome float64 `json:"totalIncome" dc:"本月收入总额"`
|
||||
TotalExpense float64 `json:"totalExpense" dc:"本月支出总额"`
|
||||
ClosingBalance float64 `json:"closingBalance" dc:"月末余额(月初余额+本月收入-本月支出)"`
|
||||
IncomeCount int `json:"incomeCount" dc:"收入笔数"`
|
||||
ExpenseCount int `json:"expenseCount" dc:"支出笔数"`
|
||||
CreditUsed float64 `json:"creditUsed" dc:"本月使用信用额度"`
|
||||
CreditRepaid float64 `json:"creditRepaid" dc:"本月还款信用额度"`
|
||||
BillStatus int `json:"billStatus" dc:"账单状态:1正常,2已调整,3已作废"`
|
||||
SettleTime *gtime.Time `json:"settleTime" dc:"结算时间"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
// TConsumeAccountMonthBillEditParam 修改/新增消费账户月账单表
|
||||
type TConsumeAccountMonthBillEditParam struct {
|
||||
//entity.TConsumeAccountMonthBill
|
||||
Id int64 `json:"id" dc:"账单ID"`
|
||||
DeptId *int64 `json:"deptId" dc:"机构ID"`
|
||||
AccountPeriod *string `json:"accountPeriod" dc:"账期YYYY-MM"`
|
||||
OpeningBalance *float64 `json:"openingBalance" dc:"月初余额"`
|
||||
RechargeIncome *float64 `json:"rechargeIncome" dc:"充值收入"`
|
||||
WithdrawableTransferInIncome *float64 `json:"withdrawableTransferInIncome" dc:"可提现转入收入"`
|
||||
ManualAdjustIncome *float64 `json:"manualAdjustIncome" dc:"人工调账收入"`
|
||||
RefundIncome *float64 `json:"refundIncome" dc:"退款收入"`
|
||||
ConsumeExpense *float64 `json:"consumeExpense" dc:"平台消费支出"`
|
||||
BalanceTransferOutExpense *float64 `json:"balanceTransferOutExpense" dc:"转可提现支出"`
|
||||
ManualAdjustExpense *float64 `json:"manualAdjustExpense" dc:"人工调账支出"`
|
||||
ConsumeCreditRepayExpense *float64 `json:"consumeCreditRepayExpense" dc:"消费账户还款支出"`
|
||||
TotalIncome *float64 `json:"totalIncome" dc:"本月收入总额"`
|
||||
TotalExpense *float64 `json:"totalExpense" dc:"本月支出总额"`
|
||||
ClosingBalance *float64 `json:"closingBalance" dc:"月末余额(月初余额+本月收入-本月支出)"`
|
||||
IncomeCount *int `json:"incomeCount" dc:"收入笔数"`
|
||||
ExpenseCount *int `json:"expenseCount" dc:"支出笔数"`
|
||||
CreditUsed *float64 `json:"creditUsed" dc:"本月使用信用额度"`
|
||||
CreditRepaid *float64 `json:"creditRepaid" dc:"本月还款信用额度"`
|
||||
BillStatus *int `json:"billStatus" dc:"账单状态:1正常,2已调整,3已作废"`
|
||||
SettleTime *gtime.Time `json:"settleTime" dc:"结算时间"`
|
||||
Remark *string `json:"remark" dc:"备注"`
|
||||
TenantId *string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept *int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy *int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy *int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
func (in *TConsumeAccountMonthBillEditParam) Filter(ctx context.Context) (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
type TConsumeAccountMonthBillEditModel struct{}
|
||||
|
||||
// TConsumeAccountMonthBillDeleteParam 删除消费账户月账单表
|
||||
type TConsumeAccountMonthBillDeleteParam struct {
|
||||
Id interface{} `json:"id" v:"required#账单ID不能为空" dc:"账单ID"`
|
||||
}
|
||||
|
||||
func (in *TConsumeAccountMonthBillDeleteParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type TConsumeAccountMonthBillDeleteModel struct{}
|
||||
|
||||
// TConsumeAccountMonthBillViewParam 获取指定消费账户月账单表信息
|
||||
type TConsumeAccountMonthBillViewParam struct {
|
||||
Id int64 `json:"id" v:"required#账单ID不能为空" dc:"账单ID"`
|
||||
}
|
||||
|
||||
func (in *TConsumeAccountMonthBillViewParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type TConsumeAccountMonthBillViewModel struct {
|
||||
entity.TConsumeAccountMonthBill
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
|
||||
}
|
||||
|
||||
// TConsumeAccountMonthBillListParam 获取消费账户月账单表列表
|
||||
type TConsumeAccountMonthBillListParam struct {
|
||||
request.PageInfo
|
||||
Id int64 `json:"id" dc:"账单ID"`
|
||||
BillStatus int `json:"billStatus" dc:"账单状态:1正常,2已调整,3已作废"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
func (in *TConsumeAccountMonthBillListParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// TConsumeAccountMonthBillSettleParam 按账期统计消费账户月账单参数
|
||||
type TConsumeAccountMonthBillSettleParam struct {
|
||||
AccountPeriod string `json:"accountPeriod" dc:"账期YYYY-MM,不传默认上个月"`
|
||||
}
|
||||
|
||||
func (in *TConsumeAccountMonthBillSettleParam) Filter(ctx context.Context) (err error) {
|
||||
if in.AccountPeriod == "" {
|
||||
in.AccountPeriod = time.Now().AddDate(0, -1, 0).Format("2006-01")
|
||||
}
|
||||
if _, err = time.Parse("2006-01", in.AccountPeriod); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// TConsumeAccountMonthBillSettleResult 消费账户月账单统计结果
|
||||
type TConsumeAccountMonthBillSettleResult struct {
|
||||
AccountPeriod string `json:"accountPeriod" dc:"账期YYYY-MM"`
|
||||
DeptCount int `json:"deptCount" dc:"处理机构数"`
|
||||
InsertCount int `json:"insertCount" dc:"新增账单数"`
|
||||
UpdateCount int `json:"updateCount" dc:"更新账单数"`
|
||||
DetailCount int `json:"detailCount" dc:"参与统计明细数"`
|
||||
TotalIncome float64 `json:"totalIncome" dc:"本月收入总额"`
|
||||
TotalExpense float64 `json:"totalExpense" dc:"本月支出总额"`
|
||||
}
|
||||
|
||||
type TConsumeAccountMonthBillListModel struct {
|
||||
Id int64 `json:"id" dc:"账单ID"`
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
AccountPeriod string `json:"accountPeriod" dc:"账期YYYY-MM"`
|
||||
OpeningBalance float64 `json:"openingBalance" dc:"月初余额"`
|
||||
RechargeIncome float64 `json:"rechargeIncome" dc:"充值收入"`
|
||||
WithdrawableTransferInIncome float64 `json:"withdrawableTransferInIncome" dc:"可提现转入收入"`
|
||||
ManualAdjustIncome float64 `json:"manualAdjustIncome" dc:"人工调账收入"`
|
||||
RefundIncome float64 `json:"refundIncome" dc:"退款收入"`
|
||||
ConsumeExpense float64 `json:"consumeExpense" dc:"平台消费支出"`
|
||||
BalanceTransferOutExpense float64 `json:"balanceTransferOutExpense" dc:"转可提现支出"`
|
||||
ManualAdjustExpense float64 `json:"manualAdjustExpense" dc:"人工调账支出"`
|
||||
ConsumeCreditRepayExpense float64 `json:"consumeCreditRepayExpense" dc:"消费账户还款支出"`
|
||||
TotalIncome float64 `json:"totalIncome" dc:"本月收入总额"`
|
||||
TotalExpense float64 `json:"totalExpense" dc:"本月支出总额"`
|
||||
ClosingBalance float64 `json:"closingBalance" dc:"月末余额(月初余额+本月收入-本月支出)"`
|
||||
IncomeCount int `json:"incomeCount" dc:"收入笔数"`
|
||||
ExpenseCount int `json:"expenseCount" dc:"支出笔数"`
|
||||
CreditUsed float64 `json:"creditUsed" dc:"本月使用信用额度"`
|
||||
CreditRepaid float64 `json:"creditRepaid" dc:"本月还款信用额度"`
|
||||
BillStatus int `json:"billStatus" dc:"账单状态:1正常,2已调整,3已作废"`
|
||||
SettleTime *gtime.Time `json:"settleTime" dc:"结算时间"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
// TConsumeAccountMonthBillExportModel 导出消费账户月账单表
|
||||
type TConsumeAccountMonthBillExportModel struct {
|
||||
Id int64 `json:"id" dc:"账单ID"`
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
AccountPeriod string `json:"accountPeriod" dc:"账期YYYY-MM"`
|
||||
OpeningBalance float64 `json:"openingBalance" dc:"月初余额"`
|
||||
RechargeIncome float64 `json:"rechargeIncome" dc:"充值收入"`
|
||||
WithdrawableTransferInIncome float64 `json:"withdrawableTransferInIncome" dc:"可提现转入收入"`
|
||||
ManualAdjustIncome float64 `json:"manualAdjustIncome" dc:"人工调账收入"`
|
||||
RefundIncome float64 `json:"refundIncome" dc:"退款收入"`
|
||||
ConsumeExpense float64 `json:"consumeExpense" dc:"平台消费支出"`
|
||||
BalanceTransferOutExpense float64 `json:"balanceTransferOutExpense" dc:"转可提现支出"`
|
||||
ManualAdjustExpense float64 `json:"manualAdjustExpense" dc:"人工调账支出"`
|
||||
ConsumeCreditRepayExpense float64 `json:"consumeCreditRepayExpense" dc:"消费账户还款支出"`
|
||||
TotalIncome float64 `json:"totalIncome" dc:"本月收入总额"`
|
||||
TotalExpense float64 `json:"totalExpense" dc:"本月支出总额"`
|
||||
ClosingBalance float64 `json:"closingBalance" dc:"月末余额(月初余额+本月收入-本月支出)"`
|
||||
IncomeCount int `json:"incomeCount" dc:"收入笔数"`
|
||||
ExpenseCount int `json:"expenseCount" dc:"支出笔数"`
|
||||
CreditUsed float64 `json:"creditUsed" dc:"本月使用信用额度"`
|
||||
CreditRepaid float64 `json:"creditRepaid" dc:"本月还款信用额度"`
|
||||
BillStatus int `json:"billStatus" dc:"账单状态:1正常,2已调整,3已作废"`
|
||||
SettleTime *gtime.Time `json:"settleTime" dc:"结算时间"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
type TConsumptionBillSummaryModel struct {
|
||||
TotalIncome float64 `json:"totalIncome" dc:"本月收入总额"`
|
||||
TotalExpense float64 `json:"totalExpense" dc:"本月支出总额"`
|
||||
}
|
||||
Reference in New Issue
Block a user