feat(service): 添加 Ik3cloud 服务集成

- 在 rpc 结构体中新增 Ik3cloud 字段
- 更新 import 包列表,加入 git.kumo.work/shama/service/ik3cloud
- 调整结构体字段对齐格式
This commit is contained in:
2025-11-19 13:35:31 +08:00
parent 390a971a4e
commit f2a5819819
3 changed files with 38 additions and 4 deletions

View File

@@ -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)
}

View File

@@ -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)
}

6
rpc.go
View File

@@ -2,12 +2,14 @@ package service
import (
"git.kumo.work/shama/service/erp"
"git.kumo.work/shama/service/ik3cloud"
"git.kumo.work/shama/service/oa"
)
var Rpc = &rpc{}
type rpc struct {
Oa oa.Oa
Erp erp.Erp
Oa oa.Oa
Erp erp.Erp
Ik3cloud ik3cloud.Ik3cloud
}