From f367821268523c63aaa69733d605e563c2e1c76d Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 23 Jul 2026 16:21:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp):=20=E6=B7=BB=E5=8A=A0=E5=BA=94?= =?UTF-8?q?=E4=BB=98=E8=B4=A6=E6=AC=BE=E5=92=8C=E5=BA=94=E6=94=B6=E8=B4=A6?= =?UTF-8?q?=E6=AC=BE=E4=B8=9A=E5=8A=A1=E6=97=A5=E6=9C=9F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在Accounting结构体中新增GenPayableFlag字段用于标识是否生成应付账款 - 在常量定义中新增InvoiceSerial排序字段支持发票序列号排序 - 在Payable结构体中新增BusinessDate字段记录业务日期 - 在ReceivableItem结构体中新增BusinessDate字段记录业务日期 - 完善了财务模块的数据结构以支持更精确的业务日期管理 --- erp/accounting.go | 1 + erp/constant.go | 2 ++ erp/payable.go | 1 + erp/receivable.go | 1 + 4 files changed, 5 insertions(+) diff --git a/erp/accounting.go b/erp/accounting.go index e0a8034..0985dd9 100644 --- a/erp/accounting.go +++ b/erp/accounting.go @@ -48,6 +48,7 @@ type AccountingItem struct { WorkflowStatus int64 `json:"workflowStatus"` WorkflowReason string `json:"workflowReason"` BanFlag int64 `json:"banFlag"` + GenPayableFlag bool `json:"genPayableFlag"` TotalBoxCount int64 `json:"totalBoxCount"` TotalAmount decimal.Decimal `json:"totalAmount"` TotalVolume decimal.Decimal `json:"totalVolume"` diff --git a/erp/constant.go b/erp/constant.go index 13db1bd..74afabd 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -145,6 +145,8 @@ const ( OrderFieldExpenseCreatedAt OrderField = "createdAt" OrderFieldExpenseAmount OrderField = "amount" + + OrderFieldInvoiceSerial OrderField = "invoiceSerial" ) type OrderSort = string diff --git a/erp/payable.go b/erp/payable.go index f7c635b..0319068 100644 --- a/erp/payable.go +++ b/erp/payable.go @@ -39,6 +39,7 @@ type PayableItem struct { PayableSerial string `json:"payableSerial"` InvoiceSerial string `json:"invoiceSerial"` AccountingSerial string `json:"accountingSerial"` + BusinessDate *time.Time `json:"businessDate"` Amount decimal.Decimal `json:"amount"` Currency string `json:"currency"` CurrencyName string `json:"currencyName"` diff --git a/erp/receivable.go b/erp/receivable.go index 75f137a..65874e1 100644 --- a/erp/receivable.go +++ b/erp/receivable.go @@ -39,6 +39,7 @@ type ReceivableCount struct { type ReceivableItem struct { Id int64 `json:"id"` ReceivableSerial string `json:"receivableSerial"` + BusinessDate *time.Time `json:"businessDate"` CustomName string `json:"customName"` InvoiceSerial string `json:"invoiceSerial"` ReceivableAmount decimal.Decimal `json:"receivableAmount"`