From b94a86b0735263eb51647ba4a582f48c96db5555 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 12 Aug 2026 16:58:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(erp):=20=E4=BF=AE=E5=A4=8D=E8=B4=B9?= =?UTF-8?q?=E7=94=A8=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89=E5=92=8C=E5=87=BA?= =?UTF-8?q?=E5=B7=AE=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正 ExpenseType 常量定义中的类型错误,从 PaymentType 改为 ExpenseType - 在 ExpenseItem 结构体中添加 Type 字段用于费用类型标识 - 修正出差开始时间字段名从 TraveStartAt 改为 TravelStartAt,统一结构体和数据库字段命名 - 更新相关 JSON 标签以保持字段映射一致性 --- erp/constant.go | 4 ++-- erp/expense.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/erp/constant.go b/erp/constant.go index 581ca00..3588f79 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -167,6 +167,6 @@ const ( type ExpenseType = int64 const ( - ExpenseTypeNormal PaymentType = 1 // 普通费用 - ExpenseTypeTrave PaymentType = 2 // 差旅费 + ExpenseTypeNormal ExpenseType = 1 // 普通费用 + ExpenseTypeTrave ExpenseType = 2 // 差旅费 ) diff --git a/erp/expense.go b/erp/expense.go index 8bf137a..8653239 100644 --- a/erp/expense.go +++ b/erp/expense.go @@ -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"`