2025-03-05 14:14:32 +08:00

57 lines
1.2 KiB
Go

package modify
import (
"context"
"git.kumo.work/shama/service/client"
)
type sale struct {
}
type SaleItem struct {
Id int64 `json:"id"`
SaleId int64 `json:"saleId"`
PiSerial string `json:"piSerial"`
PoSerial string `json:"poSerial"`
}
// All @TITLE 获取销售合同
func (s *sale) All(ctx context.Context, modifyId int64) (reply []SaleItem, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
err = xClient.Call(ctx, "All", modifyId, &reply)
return
}
type ArgsSaleAdd struct {
ModifyId int64 // 订舱修改单id
SaleIds []int64 // 销售合同
}
// Add @TITLE 添加销售合同
func (s *sale) Add(ctx context.Context, args ArgsSaleAdd) (err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Add", args, &reply)
}
type ArgsSaleDelete struct {
ModifyId int64 // 订舱修改单id
SaleIds []int64 // 销售合同
}
// Delete @TITLE 删除销售合同
func (s *sale) Delete(ctx context.Context, args ArgsSaleDelete) (err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Delete", args, &reply)
}