From eb4c3e3241d5389404bb20ca7d626c8876cc23ac Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 19 Dec 2025 16:31:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(ik3cloud):=20=E6=96=B0=E5=A2=9E=E6=94=B6?= =?UTF-8?q?=E6=AC=BE=E5=8D=95=E5=8A=9F=E8=83=BD=E5=B9=B6=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E4=BD=9C=E5=BA=9F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增收款单常量定义及映射配置 - 新增收款单类型枚举定义 - 新增收款单服务模块,支持保存和作废操作 - 在应付、应收、付款模块中补充作废接口实现 - 定义收款单保存参数结构体及费用明细结构体 --- ik3cloud/constant/constant.go | 10 +++++++ ik3cloud/ik3cloud.go | 1 + ik3cloud/payable.go | 10 +++++++ ik3cloud/payment.go | 10 +++++++ ik3cloud/receipt.go | 52 +++++++++++++++++++++++++++++++++++ ik3cloud/receivable.go | 10 +++++++ 6 files changed, 93 insertions(+) create mode 100644 ik3cloud/receipt.go diff --git a/ik3cloud/constant/constant.go b/ik3cloud/constant/constant.go index 2a83046..ad09c0e 100644 --- a/ik3cloud/constant/constant.go +++ b/ik3cloud/constant/constant.go @@ -20,6 +20,7 @@ const ( ActionExpense Action = "BD_Expense" // 费用项目 ActionPayment Action = "AP_PAYBILL" // 付款单 ActionInformation Action = "BOS_ASSISTANTDATA_DETAIL" // 辅助资料 + ActionReceiptAction Action = "AR_RECEIVEBILL" // 收款单 ) var ActionIdField = map[Action]string{ @@ -40,6 +41,7 @@ var ActionIdField = map[Action]string{ ActionExpense: "", ActionPayment: "FID", ActionInformation: "FEntryID", + ActionReceiptAction: "FID", } var ActionNumberField = map[Action]string{ ActionDepartment: "FNumber", @@ -59,6 +61,7 @@ var ActionNumberField = map[Action]string{ ActionExpense: "FNumber", ActionPayment: "FBillNo", ActionInformation: "FNumber", + ActionReceiptAction: "FBillNo", } type OperatorType = string @@ -76,6 +79,13 @@ const ( PaymentTypeRequest PaymentType = "FKDLX11_SYS" // 报销付款单 ) +type ReceiptType = string + +const ( + ReceiptTypeReceiptFx ReceiptType = "SKDLX08_SYS" // 收汇水单 + ReceiptTypeReceipt ReceiptType = "SKDLX09_SYS" // 收款单 +) + type InformationType = string const ( diff --git a/ik3cloud/ik3cloud.go b/ik3cloud/ik3cloud.go index fc86e84..f9bc470 100644 --- a/ik3cloud/ik3cloud.go +++ b/ik3cloud/ik3cloud.go @@ -19,6 +19,7 @@ type Ik3cloud struct { Dict dict // 字典 Payment payment // 付款单 Information information // 资料 + Receipt receipt // 收款单 } type Entity struct { diff --git a/ik3cloud/payable.go b/ik3cloud/payable.go index 370a78a..f1c9231 100644 --- a/ik3cloud/payable.go +++ b/ik3cloud/payable.go @@ -47,3 +47,13 @@ func (p *payable) Save(ctx context.Context, args ArgsPayableSave) (entity Entity err = xClient.Call(ctx, "Save", args, &entity) return } + +// Cancel @TITLE 作废 +func (p *payable) Cancel(ctx context.Context, args Unique) (err error) { + xClient, err := client.GetClient(p) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Cancel", args, &reply) +} diff --git a/ik3cloud/payment.go b/ik3cloud/payment.go index b40ad90..e69080e 100644 --- a/ik3cloud/payment.go +++ b/ik3cloud/payment.go @@ -45,3 +45,13 @@ func (p *payment) Save(ctx context.Context, args ArgsPaymentSave) (entity Entity err = xClient.Call(ctx, "Save", args, &entity) return } + +// Cancel @TITLE 作废 +func (p *payment) Cancel(ctx context.Context, args Unique) (err error) { + xClient, err := client.GetClient(p) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Cancel", args, &reply) +} diff --git a/ik3cloud/receipt.go b/ik3cloud/receipt.go new file mode 100644 index 0000000..4d7166b --- /dev/null +++ b/ik3cloud/receipt.go @@ -0,0 +1,52 @@ +package ik3cloud + +import ( + "context" + "time" + + "git.kumo.work/shama/service/client" + "git.kumo.work/shama/service/ik3cloud/constant" + "github.com/shopspring/decimal" +) + +type receipt struct { +} +type ArgsReceiptSave struct { + ReceiptId int64 // 收款单ID + Number string // 单据编号 + ReceiptType constant.ReceiptType // 收款单类型 + Date time.Time // 收款单日期 + DepartmentNumber string // 部门编号 + StaffXsyNumber string // 业务员编号 + CurrencyNumber string // 币种编号 + Rate decimal.Decimal // 汇率 + Remarks string // 备注 + Costs []ReceiptCost // 费用明细 +} + +type ReceiptCost struct { + InvoiceSerial string // 发票号 + DepartmentNumber string // 部门编号 + Amount decimal.Decimal // 金额 + Remarks string // 备注 +} + +// Save @TITLE 保存收款单 +func (r *receipt) Save(ctx context.Context, args ArgsReceiptSave) (entity Entity, err error) { + xClient, err := client.GetClient(r) + if err != nil { + return + } + err = xClient.Call(ctx, "Save", args, &entity) + return +} + +// Cancel @TITLE 作废 +func (r *receipt) Cancel(ctx context.Context, args Unique) (err error) { + xClient, err := client.GetClient(r) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Cancel", args, &reply) +} diff --git a/ik3cloud/receivable.go b/ik3cloud/receivable.go index 6758205..374541a 100644 --- a/ik3cloud/receivable.go +++ b/ik3cloud/receivable.go @@ -50,3 +50,13 @@ func (r *receivable) Save(ctx context.Context, args ArgsReceivableSave) (entity err = xClient.Call(ctx, "Save", args, &entity) return } + +// Cancel @TITLE 作废 +func (r *receivable) Cancel(ctx context.Context, args Unique) (err error) { + xClient, err := client.GetClient(r) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Cancel", args, &reply) +}