修改结汇

This commit is contained in:
守护自己的云 2025-03-14 16:21:34 +08:00
parent d1957b9228
commit 12b18adb9a
3 changed files with 35 additions and 3 deletions

View File

@ -62,3 +62,9 @@ const (
BanFlagDisabled BanFlag = 1 // 禁用
BanFlagEnabled BanFlag = 2 // 可用
)
type ExchangeSettlementType = int64 // 结汇单据类型
const (
ExchangeSettlementTypeMaster ExchangeSettlementType = 1 // 总票
ExchangeSettlementTypeSub ExchangeSettlementType = 2 // 分票
)

View File

@ -77,4 +77,5 @@ type ReplyShipmentInfo struct {
SaleCurrencySymbol string `json:"saleCurrencySymbol"`
SaleCurrencyRate decimal.Decimal `json:"saleCurrencyRate"`
BanFlag int64 `json:"banFlag"`
IsExchangeSettlement int64 `json:"isExchangeSettlement"`
}

View File

@ -30,6 +30,7 @@ type ReplyExchangeSettlementList struct {
type ExchangeSettlementItem struct {
Id int64 `json:"id"`
ShipmentId int64 `json:"shipmentId"`
Type int64 `json:"type"`
InvoiceSerial string `json:"invoiceSerial"`
ExchangeSettlementNo string `json:"exchangeSettlementNo"`
ContractDate *time.Time `json:"contractDate"`
@ -83,6 +84,7 @@ type ReplyExchangeSettlementInfo struct {
VesselNameVoyage string `json:"vesselNameVoyage"`
BanFlag int64 `json:"banFlag"`
RecBankAddress string `json:"recBankAddress"`
Type int64 `json:"type"`
}
// Info @TITLE 详情
@ -95,10 +97,33 @@ func (e *exchangeSettlement) Info(ctx context.Context, exchangeSettlementId int6
return
}
// Products @TITLE 获取产品
func (e *exchangeSettlement) Products(ctx context.Context, exchangeSettlementId int64) (reply []SaleProductItem, err error) {
xClient, err := client.GetClient(e)
if err != nil {
return
}
err = xClient.Call(ctx, "Products", exchangeSettlementId, &reply)
return
}
// Gifts @TITLE 获取赠品
func (e *exchangeSettlement) Gifts(ctx context.Context, exchangeSettlementId int64) (reply []GiftItem, err error) {
xClient, err := client.GetClient(e)
if err != nil {
return
}
err = xClient.Call(ctx, "Gifts", exchangeSettlementId, &reply)
return
}
type ArgsExchangeSettlementGen struct {
ShipmentId int64 // 订舱id
ExchangeSettlementNo string // 结汇单号
StaffId int64 // 操作员工
ShipmentId int64 // 订舱id
ExchangeSettlementNo string // 结汇单号
StaffId int64 // 操作员工
Type int64 // 类型 1=总票 2=分票
ShipmentSaleProductIds []int64 // 订舱产品id
ShipmentGiftIds []int64 // 订舱赠品id
}
// Gen @TITLE 生成