From 1ec6a5ca321dfd1e0396a1210733c871b07c631a Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 29 Jul 2025 17:46:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(sale):=20=E6=96=B0=E5=A2=9E=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=90=88=E5=90=8C=E6=95=88=E7=9B=8A=E6=B5=8B=E7=AE=97?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 append.go 中添加 AuditBenefit 方法,用于审核效益测算 - 在 audit.go 中添加 Benefit 方法,用于效益测算审核 - 在 constant.go 中添加 BusinessTypeSaleBenefitAudit常量,用于标识销售合同效益测算审核业务类型 --- erp/constant.go | 1 + erp/sale/append.go | 10 ++++++++++ erp/sale/audit.go | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/erp/constant.go b/erp/constant.go index 508f490..d4ce85d 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -6,6 +6,7 @@ const ( BusinessTypeSaleAuditClose BusinessType = "saleAuditClose" // 销售合同关单审核 BusinessTypeSaleAppendAudit BusinessType = "saleAuditAppend" // 销售合同追加商品 BusinessTypeSaleChangeAudit BusinessType = "saleAuditChange" // 销售合同修改产品 + BusinessTypeSaleBenefitAudit BusinessType = "saleAuditBenefit" // 销售合同修改效益测算 BusinessTypePurchaseAudit BusinessType = "purchaseAudit" // 采购合同审核 BusinessTypeShipmentAudit BusinessType = "shipmentAudit" // 订舱单审核 BusinessTypeShipmentModifyAudit BusinessType = "shipmentModifyAudit" // 订舱单修改单审核 diff --git a/erp/sale/append.go b/erp/sale/append.go index b0e2a28..e632e18 100644 --- a/erp/sale/append.go +++ b/erp/sale/append.go @@ -107,3 +107,13 @@ func (a *append) Benefit(ctx context.Context, args ArgsAppendBenefit) (reply Rep err = xClient.Call(ctx, "Benefit", args, &reply) return } + +// AuditBenefit @TITLE 审核效益测算 +func (a *append) AuditBenefit(ctx context.Context, args ArgsAppendBenefit) (reply ReplyBenefitInfo, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "AuditBenefit", args, &reply) + return +} diff --git a/erp/sale/audit.go b/erp/sale/audit.go index 5fb5523..e59be1e 100644 --- a/erp/sale/audit.go +++ b/erp/sale/audit.go @@ -67,3 +67,21 @@ func (a *audit) Change(ctx context.Context, args ArgsAuditChange) (err error) { err = xClient.Call(ctx, "Change", args, &reply) return } + +type ArgsAuditBenefit struct { + StaffId int64 // 操作人 + SaleId int64 // 销售合同id + AuditStaffIds []int64 // 审核人 + ArgsBenefitEdit +} + +// Benefit @TITLE 效益测算审核 +func (a *audit) Benefit(ctx context.Context, args ArgsAuditBenefit) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Benefit", args, &reply) + return +}