From c1e44e23002710c830773e676249b52dcc58b525 Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 15 Jul 2025 10:51:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(purchase):=20=E6=B7=BB=E5=8A=A0=E5=85=B3?= =?UTF-8?q?=E8=81=94=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 PurchaseAssociationItem 结构体用于关联采购合同的返回结果 - 实现 Association 方法以获取关联采购合同信息 - 通过 xClient.Call 调用远程服务完成关联操作 --- erp/purchase.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/erp/purchase.go b/erp/purchase.go index f5918b7..e1f282b 100644 --- a/erp/purchase.go +++ b/erp/purchase.go @@ -256,3 +256,21 @@ func (p *purchase) FactoryBatch(ctx context.Context, args ArgsPurchaseFactoryBat err = xClient.Call(ctx, "FactoryBatch", args, &reply) return } + +type PurchaseAssociationItem struct { + Id int64 `json:"id"` + FactoryId int64 `json:"factoryId"` + SaleId int64 `json:"saleId"` + PoSerial string `json:"poSerial"` + BatchNo int64 `json:"batchNo"` +} + +// Association @TITLE 关联采购合同 +func (p *purchase) Association(ctx context.Context, purchaseId int64) (reply []PurchaseAssociationItem, err error) { + xClient, err := client.GetClient(p) + if err != nil { + return + } + err = xClient.Call(ctx, "Association", purchaseId, &reply) + return +}