feat(service): 添加 Ik3cloud 服务集成
- 在 rpc 结构体中新增 Ik3cloud 字段 - 更新 import 包列表,加入 git.kumo.work/shama/service/ik3cloud - 调整结构体字段对齐格式
This commit is contained in:
@@ -2,8 +2,9 @@ package oa
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.kumo.work/shama/service/client"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.kumo.work/shama/service/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type department struct {
|
type department struct {
|
||||||
@@ -92,3 +93,18 @@ func (d *department) SetStaff(ctx context.Context, args ArgsDepartmentSetStaff)
|
|||||||
var reply int
|
var reply int
|
||||||
return xClient.Call(ctx, "SetStaff", args, &reply)
|
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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
"git.kumo.work/shama/service/client"
|
"git.kumo.work/shama/service/client"
|
||||||
"git.kumo.work/shama/service/lib/bean"
|
"git.kumo.work/shama/service/lib/bean"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type staff struct {
|
type staff struct {
|
||||||
@@ -264,3 +265,18 @@ func (s *staff) Enable(ctx context.Context, staffIds []int64) (err error) {
|
|||||||
var reply int
|
var reply int
|
||||||
return xClient.Call(ctx, "Enable", staffIds, &reply)
|
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)
|
||||||
|
}
|
||||||
|
|||||||
6
rpc.go
6
rpc.go
@@ -2,12 +2,14 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kumo.work/shama/service/erp"
|
"git.kumo.work/shama/service/erp"
|
||||||
|
"git.kumo.work/shama/service/ik3cloud"
|
||||||
"git.kumo.work/shama/service/oa"
|
"git.kumo.work/shama/service/oa"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Rpc = &rpc{}
|
var Rpc = &rpc{}
|
||||||
|
|
||||||
type rpc struct {
|
type rpc struct {
|
||||||
Oa oa.Oa
|
Oa oa.Oa
|
||||||
Erp erp.Erp
|
Erp erp.Erp
|
||||||
|
Ik3cloud ik3cloud.Ik3cloud
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user