feat(erp): 添加报销和申请审核提交功能
- 新增 expense 包下的审核提交接口 - 新增 request 包下的审核提交接口 - 实现审核提交的统一调用逻辑 - 支持指定审核人员进行审核操作 - 添加审核提交相关的参数结构体定义
This commit is contained in:
26
erp/expense/audit.go
Normal file
26
erp/expense/audit.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package expense
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type audit struct {
|
||||
}
|
||||
type ArgsAuditSubmit struct {
|
||||
StaffId int64 // 操作人
|
||||
ExpenseId int64 // 报销单id
|
||||
AuditStaffIds []int64 // 审核人
|
||||
}
|
||||
|
||||
// Submit @TITLE 提交审核
|
||||
func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||
return
|
||||
}
|
||||
26
erp/request/audit.go
Normal file
26
erp/request/audit.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type audit struct {
|
||||
}
|
||||
type ArgsAuditSubmit struct {
|
||||
StaffId int64 // 操作人
|
||||
RequestId int64 // 申请单id
|
||||
AuditStaffIds []int64 // 审核人
|
||||
}
|
||||
|
||||
// Submit @TITLE 提交审核
|
||||
func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user