feat(erp): 添加报销和申请审核提交功能

- 新增 expense 包下的审核提交接口
- 新增 request 包下的审核提交接口
- 实现审核提交的统一调用逻辑
- 支持指定审核人员进行审核操作
- 添加审核提交相关的参数结构体定义
This commit is contained in:
2025-12-18 16:22:58 +08:00
parent 8d5d6a6fb6
commit f16cf90f12
2 changed files with 52 additions and 0 deletions

26
erp/expense/audit.go Normal file
View 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
View 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
}