fix(erp): 修复费用类型定义和出差开始时间字段命名问题

- 修正 ExpenseType 常量定义中的类型错误,从 PaymentType 改为 ExpenseType
- 在 ExpenseItem 结构体中添加 Type 字段用于费用类型标识
- 修正出差开始时间字段名从 TraveStartAt 改为 TravelStartAt,统一结构体和数据库字段命名
- 更新相关 JSON 标签以保持字段映射一致性
This commit is contained in:
2026-08-12 16:58:04 +08:00
parent 4b24a9353a
commit b94a86b073
2 changed files with 5 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ type ExpenseCount struct {
}
type ExpenseItem struct {
Id int64 `json:"id"`
Type int64 `json:"type"`
ExpenseSerial string `json:"expenseSerial"`
Currency string `json:"currency"`
CurrencyName string `json:"currencyName"`
@@ -96,7 +97,7 @@ type ExpenseAdd struct {
BankAccount string // 银行账号
BankName string // 账号名称
TravelStaffIds []int64 // 出差员工
TraveStartAt *time.Time // 出差开始日期
TravelStartAt *time.Time // 出差开始日期
TravelEndAt *time.Time // 出差结束日期
TravelLocation string // 地点
TravelReason string // 出差事由
@@ -126,7 +127,7 @@ type ReplyExpenseInfo struct {
BankAccount string `json:"bankAccount"`
BankName string `json:"bankName"`
TravelStaffIds []int64 `json:"travelStaffIds"`
TraveStartAt *time.Time `json:"traveStartAt"`
TravelStartAt *time.Time `json:"travelStartAt"`
TravelEndAt *time.Time `json:"travelEndAt"`
TravelLocation string `json:"travelLocation"`
TravelReason string `json:"travelReason"`