feat(ik3cloud): 新增客户、付款单和物料模块
- 新增客户模块,支持客户信息保存功能 - 新增付款单模块,支持付款单据保存功能 - 新增物料模块,支持物料信息保存功能 - 修改部门和员工模块接口,统一使用Save方法替代原有的Add和Edit方法 - 调整金蝶集成接口参数,简化调用方式 - 更新常量定义,增加客户、付款单和物料相关枚举值
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
"git.kumo.work/shama/service/ik3cloud"
|
||||
)
|
||||
|
||||
type department struct {
|
||||
@@ -96,17 +97,22 @@ func (d *department) SetStaff(ctx context.Context, args ArgsDepartmentSetStaff)
|
||||
return xClient.Call(ctx, "SetStaff", args, &reply)
|
||||
}
|
||||
|
||||
type ArgsDepartmentIk3cloud struct {
|
||||
DepartmentId int64 // 部门id
|
||||
Number string // 金蝶部门编号
|
||||
// Ik3cloudInfo @TITLE 金蝶同步信息
|
||||
func (d *department) Ik3cloudInfo(ctx context.Context, departmentId int64) (entity ik3cloud.Entity, err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Ik3cloudInfo", departmentId, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶集成
|
||||
func (d *department) Ik3cloud(ctx context.Context, args ArgsDepartmentIk3cloud) (err error) {
|
||||
func (d *department) Ik3cloud(ctx context.Context, departmentId int64) (err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var reply int
|
||||
return xClient.Call(ctx, "Ik3cloud", args, &reply)
|
||||
return xClient.Call(ctx, "Ik3cloud", departmentId, &reply)
|
||||
}
|
||||
|
||||
16
oa/staff.go
16
oa/staff.go
@@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
"git.kumo.work/shama/service/ik3cloud"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
)
|
||||
|
||||
@@ -266,17 +267,22 @@ func (s *staff) Enable(ctx context.Context, staffIds []int64) (err error) {
|
||||
return xClient.Call(ctx, "Enable", staffIds, &reply)
|
||||
}
|
||||
|
||||
type ArgsStaffIk3cloud struct {
|
||||
StaffId int64 // 员工id
|
||||
Number string // 金蝶员工编号
|
||||
// Ik3cloudInfo @TITLE 金蝶同步信息
|
||||
func (s *staff) Ik3cloudInfo(ctx context.Context, staffId int64) (entity ik3cloud.Entity, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Ik3cloudInfo", staffId, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Ik3cloud @TITLE 金蝶集成
|
||||
func (s *staff) Ik3cloud(ctx context.Context, args ArgsStaffIk3cloud) (err error) {
|
||||
func (s *staff) Ik3cloud(ctx context.Context, staffId int64) (err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var reply int
|
||||
return xClient.Call(ctx, "Ik3cloud", args, &reply)
|
||||
return xClient.Call(ctx, "Ik3cloud", staffId, &reply)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user