- 在 constant.go 中新增员工职位和业务员类型常量定义 - 在 ik3cloud.go 中新增 Position 字段以支持职位相关操作 - 在 staff.go 中实现员工职位和业务员类型的查询方法 - 新增 position.go 文件,实现职位的保存和删除功能
38 lines
795 B
Go
38 lines
795 B
Go
package ik3cloud
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.kumo.work/shama/service/client"
|
|
)
|
|
|
|
type position struct {
|
|
}
|
|
|
|
type ArgsPositionSave struct {
|
|
PositionId int64 // 职位id
|
|
Number string // 职位编码
|
|
Name string // 职位名称
|
|
DepartmentNumber string // 部门编码
|
|
}
|
|
|
|
// Save @TITLE 保存部门
|
|
func (p *position) Save(ctx context.Context, args ArgsPositionSave) (entity Entity, err error) {
|
|
xClient, err := client.GetClient(p)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = xClient.Call(ctx, "Save", args, &entity)
|
|
return
|
|
}
|
|
|
|
// Delete @TITLE 删除部门
|
|
func (p *position) Delete(ctx context.Context, numbers []string) (err error) {
|
|
xClient, err := client.GetClient(p)
|
|
if err != nil {
|
|
return
|
|
}
|
|
var reply int
|
|
return xClient.Call(ctx, "Delete", numbers, &reply)
|
|
}
|