From f2a5819819e603b23c0f4bf549cb9036fb10b12c Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 19 Nov 2025 13:35:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(service):=20=E6=B7=BB=E5=8A=A0=20Ik3cloud?= =?UTF-8?q?=20=E6=9C=8D=E5=8A=A1=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 rpc 结构体中新增 Ik3cloud 字段 - 更新 import 包列表,加入 git.kumo.work/shama/service/ik3cloud - 调整结构体字段对齐格式 --- oa/department.go | 18 +++++++++++++++++- oa/staff.go | 18 +++++++++++++++++- rpc.go | 6 ++++-- 3 files changed, 38 insertions(+), 4 deletions(-) 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 }