diff --git a/erp/constant.go b/erp/constant.go index 806dc7f..8359ac3 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -38,10 +38,12 @@ var BusinessAuditTypeName = map[BusinessAuditType]string{ type BusinessType = string // 业务类型 const ( BusinessTypeExpense BusinessType = "expense" // 报销 + BusinessTypeRequest BusinessType = "request" // 报销 ) var BusinessTypeName = map[BusinessType]string{ - BusinessTypeExpense: "报销", + BusinessTypeExpense: "报销单", + BusinessTypeRequest: "申请单", } type AuditStatus = int64 // 审核状态 diff --git a/erp/expense.go b/erp/expense.go index d27789e..d73f848 100644 --- a/erp/expense.go +++ b/erp/expense.go @@ -38,6 +38,7 @@ type ExpenseSearch struct { Ik3cloudStatuses []int64 // 金蝶推送状态 Ik3cloudAtStart *time.Time // 金蝶推送开始时间 Ik3cloudAtEnd *time.Time // 金蝶推送结束时间 + TransferStatuses []int64 // 打款状态 } type ReplyExpenseList struct { List []ExpenseItem `json:"list"` @@ -156,6 +157,10 @@ type ReplyExpenseInfo struct { Ik3cloudStatus int64 `json:"ik3CloudStatus"` Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` + TransferId int64 `json:"transferId"` + TransferStatus int64 `json:"transferStatus"` + TransferAt *time.Time `json:"transferAt"` + TransferErrMsg string `json:"transferErrMsg"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` } diff --git a/erp/request.go b/erp/request.go index d0107c0..5dbc6f6 100644 --- a/erp/request.go +++ b/erp/request.go @@ -50,6 +50,7 @@ type RequestSearch struct { Ik3cloudStatuses []int64 // 金蝶推送状态 Ik3cloudAtStart *time.Time // 金蝶推送开始时间 Ik3cloudAtEnd *time.Time // 金蝶推送结束时间 + TransferStatuses []int64 // 打款状态 } type ReplyRequestList struct { List []RequestItem `json:"list"` @@ -91,6 +92,10 @@ type RequestItem struct { Ik3cloudStatus int64 `json:"ik3CloudStatus"` Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` + TransferId int64 `json:"transferId"` + TransferStatus int64 `json:"transferStatus"` + TransferAt *time.Time `json:"transferAt"` + TransferErrMsg string `json:"transferErrMsg"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` } @@ -199,6 +204,10 @@ type ReplyRequestInfo struct { Ik3cloudStatus int64 `json:"ik3CloudStatus"` Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` + TransferId int64 `json:"transferId"` + TransferStatus int64 `json:"transferStatus"` + TransferAt *time.Time `json:"transferAt"` + TransferErrMsg string `json:"transferErrMsg"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` } diff --git a/erp/request/request.go b/erp/request/request.go index d3f3d5a..87b7f5f 100644 --- a/erp/request/request.go +++ b/erp/request/request.go @@ -1,7 +1,8 @@ package request type Request struct { - Cost cost - Audit audit - Prepaid prepaid + Cost cost + Audit audit + Prepaid prepaid + Transfer transfer } diff --git a/erp/request/transfer.go b/erp/request/transfer.go new file mode 100644 index 0000000..c47969b --- /dev/null +++ b/erp/request/transfer.go @@ -0,0 +1,26 @@ +package request + +import ( + "context" + + "git.kumo.work/shama/service/client" +) + +type transfer struct { +} +type ArgsTransferSubmit struct { + StaffId int64 // 操作人 + RequestId int64 // 申请单id + TransferType string // 打款类型 +} + +// Submit @TITLE 提交打款 +func (t *transfer) Submit(ctx context.Context, args ArgsTransferSubmit) (err error) { + xClient, err := client.GetClient(t) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Submit", args, &reply) + return +} diff --git a/erp/shipment.go b/erp/shipment.go index c3966a2..3c45b2d 100644 --- a/erp/shipment.go +++ b/erp/shipment.go @@ -90,6 +90,7 @@ type ShipmentAdd struct { PaymentCycle *int64 // 付款周期 PaymentTerms string // 条款 CommissionRate *decimal.Decimal // 佣金比例 + DueRecDate *time.Time // 预计收汇日期日期 TradeCountry string // 贸易国别 RecBank string // 收汇银行 RecBankEng string // 收汇银行英文