diff --git a/erp/accounting.go b/erp/accounting.go index 18f8e71..0157cfd 100644 --- a/erp/accounting.go +++ b/erp/accounting.go @@ -101,14 +101,19 @@ func (a *accounting) Add(ctx context.Context, args ArgsAccountingAdd) (accountId return } +type ArgsAccountingGen struct { + ShipmentId int64 // 订舱单id + AccountingGenType AccountingGenType // 生成类型 +} + // Gen @TITLE 生成做账合同 -func (a *accounting) Gen(ctx context.Context, shipmentId int64) (err error) { +func (a *accounting) Gen(ctx context.Context, args ArgsAccountingGen) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 - return xClient.Call(ctx, "Gen", shipmentId, &reply) + return xClient.Call(ctx, "Gen", args, &reply) } type ReplyAccountingInfo struct { diff --git a/erp/constant.go b/erp/constant.go index 4a52af6..dd9323e 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -149,3 +149,10 @@ const ( OrderSortAsc OrderSort = "asc" OrderSortDesc OrderSort = "desc" ) + +type AccountingGenType = int64 + +const ( + AccountingGenTypeSaleStaff AccountingGenType = 1 // 按销售生成做账单 + AccountingGenTypeShipmentStaff AccountingGenType = 2 // 按订舱生成做账单 +)