feat(erp): 添加转账功能模块
- 在ERP服务中新增Transfer模块 - 为报销模块添加转账相关字段和结构 - 实现转账类型查询接口 - 添加报销单提交打款功能 - 定义转账相关的数据结构和参数 - 集成客户端调用支持转账业务逻辑
This commit is contained in:
@@ -20,4 +20,5 @@ type Erp struct {
|
|||||||
Request request
|
Request request
|
||||||
Dict dict
|
Dict dict
|
||||||
Ik3cloud ik3cloud
|
Ik3cloud ik3cloud
|
||||||
|
Transfer transfer
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package expense
|
package expense
|
||||||
|
|
||||||
type Expense struct {
|
type Expense struct {
|
||||||
Cost cost
|
Cost cost
|
||||||
Audit audit
|
Audit audit
|
||||||
|
Transfer transfer
|
||||||
}
|
}
|
||||||
|
|||||||
25
erp/expense/transfer.go
Normal file
25
erp/expense/transfer.go
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package expense
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"git.kumo.work/shama/service/client"
|
||||||
|
)
|
||||||
|
|
||||||
|
type transfer struct {
|
||||||
|
}
|
||||||
|
type ArgsTransferSubmit struct {
|
||||||
|
StaffId int64 // 操作人
|
||||||
|
ExpenseId int64 // 报销单id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
||||||
@@ -1 +1,25 @@
|
|||||||
package erp
|
package erp
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"git.kumo.work/shama/service/client"
|
||||||
|
)
|
||||||
|
|
||||||
|
type transfer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
type TransferItem struct {
|
||||||
|
Key string `json:"key"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Types @TITLE 打款类型
|
||||||
|
func (t *template) Types(ctx context.Context) (reply []TransferItem, err error) {
|
||||||
|
xClient, err := client.GetClient(t)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "ExportData", 0, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user