部署
This commit is contained in:
160
erp/shipment/exchangeSettlement.go
Normal file
160
erp/shipment/exchangeSettlement.go
Normal file
@@ -0,0 +1,160 @@
|
||||
package shipment
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.kumo.work/shama/service/client"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"time"
|
||||
)
|
||||
|
||||
type exchangeSettlement struct {
|
||||
}
|
||||
|
||||
type ArgsExchangeSettlementList struct {
|
||||
Page bean.Page
|
||||
Search ExchangeSettlementSearch
|
||||
}
|
||||
type ExchangeSettlementSearch struct {
|
||||
ExchangeSettlementNo string // 结汇单号
|
||||
InvoiceSerial string // 出运发票号
|
||||
CustomIds []int64 // 客户筛选
|
||||
StaffIds []int64 // 业务员筛选
|
||||
IsCancel int64 // 是否有效
|
||||
}
|
||||
type ReplyExchangeSettlementList struct {
|
||||
List []ExchangeSettlementItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type ExchangeSettlementItem struct {
|
||||
Id int64 `json:"id"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
ExchangeSettlementNo string `json:"exchangeSettlementNo"`
|
||||
ContractDate *time.Time `json:"contractDate"`
|
||||
InvoiceDate time.Time `json:"invoiceDate"`
|
||||
CustomName string `json:"customName"`
|
||||
CustomShortName string `json:"customShortName"`
|
||||
EstSailingDate *time.Time `json:"estSailingDate"`
|
||||
ShipPort string `json:"shipPort"`
|
||||
DischargePort string `json:"dischargePort"`
|
||||
IsCancel int64 `json:"isCancel"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
func (e *exchangeSettlement) List(ctx context.Context, args ArgsExchangeSettlementList) (reply ReplyExchangeSettlementList, err error) {
|
||||
xClient, err := client.GetClient(e)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ReplyExchangeSettlementInfo struct {
|
||||
ReplyShipmentInfo
|
||||
ExchangeSettlementNo string `json:"exchangeSettlementNo"`
|
||||
ShipmentId int64 `json:"shipmentId"`
|
||||
EstSailingDate *time.Time `json:"estSailingDate"`
|
||||
InvoiceDate time.Time `json:"invoiceDate"`
|
||||
ReadyDate *time.Time `json:"readyDate"`
|
||||
ShipPort string `json:"shipPort"`
|
||||
DischargePort string `json:"dischargePort"`
|
||||
DischargePortEng string `json:"dischargePortEng"`
|
||||
Destination string `json:"destination"`
|
||||
CreditSerial string `json:"creditSerial"`
|
||||
RecBank string `json:"recBank"`
|
||||
RecBankEng string `json:"recBankEng"`
|
||||
RecBankName string `json:"recBankName"`
|
||||
RecBankNameEng string `json:"recBankNameEng"`
|
||||
RecBankCardNo string `json:"recBankCardNo"`
|
||||
RecBankCardName string `json:"recBankCardName"`
|
||||
ShipmentNo string `json:"shipmentNo"`
|
||||
CnoSno string `json:"cnoSno"`
|
||||
Declare1 string `json:"declare1"`
|
||||
Declare2 string `json:"declare2"`
|
||||
Info string `json:"info"`
|
||||
CustomsInvoiceDate *time.Time `json:"customsInvoiceDate"`
|
||||
VesselNameVoyage string `json:"vesselNameVoyage"`
|
||||
IsCancel int64 `json:"isCancel"`
|
||||
}
|
||||
|
||||
// Info @TITLE 详情
|
||||
func (e *exchangeSettlement) Info(ctx context.Context, exchangeSettlementId int64) (reply ReplyExchangeSettlementInfo, err error) {
|
||||
xClient, err := client.GetClient(e)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Info", exchangeSettlementId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsExchangeSettlementGen struct {
|
||||
ShipmentId int64 // 订舱id
|
||||
ExchangeSettlementNo string // 结汇单号
|
||||
StaffId int64 // 操作员工
|
||||
}
|
||||
|
||||
// Gen @TITLE 生成
|
||||
func (e *exchangeSettlement) Gen(ctx context.Context, args ArgsExchangeSettlementGen) (err error) {
|
||||
xClient, err := client.GetClient(e)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Gen", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (e *exchangeSettlement) Cancel(ctx context.Context, exchangeSettlementId int64) (err error) {
|
||||
xClient, err := client.GetClient(e)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Cancel", exchangeSettlementId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsExchangeSettlementEdit struct {
|
||||
ExchangeSettlementId int64 // 结汇单id
|
||||
ArgsExchangeSettlementData
|
||||
}
|
||||
|
||||
type ArgsExchangeSettlementData struct {
|
||||
EstSailingDate *time.Time // 预计发运日期
|
||||
InvoiceDate *time.Time // 发票日期
|
||||
ReadyDate *time.Time // 预计发运日期
|
||||
ShipPort string // 港口
|
||||
DischargePort string // 卸货港口
|
||||
DischargePortEng string // 卸货港口英文
|
||||
Destination string // 目的地
|
||||
CreditSerial string // 信用证号
|
||||
RecBank string // 收款银行
|
||||
RecBankEng string // 收款银行英文
|
||||
RecBankName string // 收款银行名称
|
||||
RecBankNameEng string // 收款银行名称英文
|
||||
RecBankCardNo string // 收款银行卡号
|
||||
RecBankCardName string // 收款银行卡名
|
||||
ShipmentNo string // shipmentNO
|
||||
CnoSno string // CONTAINER NO./SEAL NO.
|
||||
Declare1 string // 声明1
|
||||
Declare2 string // 声明2
|
||||
Info string // 备注
|
||||
CustomsInvoiceDate *time.Time // 清关发票日期
|
||||
VesselNameVoyage string // 船名航次
|
||||
}
|
||||
|
||||
// Edit @TITLE 编辑
|
||||
func (e *exchangeSettlement) Edit(ctx context.Context, args ArgsExchangeSettlementEdit) (err error) {
|
||||
xClient, err := client.GetClient(e)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Edit", args, &reply)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user