refactor(accounting): 修改做账合同生成接口参数结构
- 新增 ArgsAccountingGen 结构体定义 - 将 shipmentId 参数改为 args 参数传递 - 添加 AccountingGenType 类型定义 - 定义销售和订舱两种做账单生成类型常量
This commit is contained in:
@@ -101,14 +101,19 @@ func (a *accounting) Add(ctx context.Context, args ArgsAccountingAdd) (accountId
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ArgsAccountingGen struct {
|
||||||
|
ShipmentId int64 // 订舱单id
|
||||||
|
AccountingGenType AccountingGenType // 生成类型
|
||||||
|
}
|
||||||
|
|
||||||
// Gen @TITLE 生成做账合同
|
// 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)
|
xClient, err := client.GetClient(a)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
reply := 0
|
reply := 0
|
||||||
return xClient.Call(ctx, "Gen", shipmentId, &reply)
|
return xClient.Call(ctx, "Gen", args, &reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReplyAccountingInfo struct {
|
type ReplyAccountingInfo struct {
|
||||||
|
|||||||
@@ -149,3 +149,10 @@ const (
|
|||||||
OrderSortAsc OrderSort = "asc"
|
OrderSortAsc OrderSort = "asc"
|
||||||
OrderSortDesc OrderSort = "desc"
|
OrderSortDesc OrderSort = "desc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type AccountingGenType = int64
|
||||||
|
|
||||||
|
const (
|
||||||
|
AccountingGenTypeSaleStaff AccountingGenType = 1 // 按销售生成做账单
|
||||||
|
AccountingGenTypeShipmentStaff AccountingGenType = 2 // 按订舱生成做账单
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user