diff --git a/oa/department.go b/oa/department.go index e712614..4890e43 100644 --- a/oa/department.go +++ b/oa/department.go @@ -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) +} diff --git a/oa/staff.go b/oa/staff.go index 1e0424d..1d8d260 100644 --- a/oa/staff.go +++ b/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) +} diff --git a/rpc.go b/rpc.go index f188c45..d71a703 100644 --- a/rpc.go +++ b/rpc.go @@ -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 }