feat(service): 添加 Ik3cloud 服务集成
- 在 rpc 结构体中新增 Ik3cloud 字段 - 更新 import 包列表,加入 git.kumo.work/shama/service/ik3cloud - 调整结构体字段对齐格式
This commit is contained in:
@@ -2,8 +2,9 @@ package oa
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.kumo.work/shama/service/client"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type department struct {
|
||||
@@ -92,3 +93,18 @@ func (d *department) SetStaff(ctx context.Context, args ArgsDepartmentSetStaff)
|
||||
var reply int
|
||||
return xClient.Call(ctx, "SetStaff", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsDepartmentIk3cloud struct {
|
||||
DepartmentId int64 // 部门id
|
||||
Number string // 金蝶部门编号
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶集成
|
||||
func (d *department) Ik3cloud(ctx context.Context, args ArgsDepartmentIk3cloud) (err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var reply int
|
||||
return xClient.Call(ctx, "Ik3cloud", args, &reply)
|
||||
}
|
||||
|
||||
18
oa/staff.go
18
oa/staff.go
@@ -2,9 +2,10 @@ package oa
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"time"
|
||||
)
|
||||
|
||||
type staff struct {
|
||||
@@ -264,3 +265,18 @@ func (s *staff) Enable(ctx context.Context, staffIds []int64) (err error) {
|
||||
var reply int
|
||||
return xClient.Call(ctx, "Enable", staffIds, &reply)
|
||||
}
|
||||
|
||||
type ArgsStaffIk3cloud struct {
|
||||
StaffId int64 // 员工id
|
||||
Number string // 金蝶员工编号
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶集成
|
||||
func (s *staff) Ik3cloud(ctx context.Context, args ArgsStaffIk3cloud) (err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var reply int
|
||||
return xClient.Call(ctx, "Ik3cloud", args, &reply)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user