- 添加部门新增、编辑、删除接口及逻辑实现 - 添加员工新增、编辑、启用、禁用、删除接口及逻辑实现 - 更新配置文件支持组织ID配置 - 初始化金蝶客户端连接配置 - 优化部门与员工数据查询结构 - 增加提交、审核、反审等业务流程处理 - 完善错误处理与日志记录机制
34 lines
908 B
Go
34 lines
908 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
"ik3cloud/app/logic"
|
|
|
|
"git.kumo.work/shama/service/ik3cloud"
|
|
)
|
|
|
|
type Department struct {
|
|
}
|
|
|
|
// All @TITLE 获取部门
|
|
func (d *Department) All(ctx context.Context, args int, reply *[]ik3cloud.DepartmentItem) (err error) {
|
|
*reply, err = logic.DepartmentLogic.All()
|
|
return err
|
|
}
|
|
|
|
// Add @TITLE 添加部门
|
|
func (d *Department) Add(ctx context.Context, args ik3cloud.ArgsDepartmentAdd, departmentId *int64) (err error) {
|
|
*departmentId, err = logic.DepartmentLogic.Add(args)
|
|
return err
|
|
}
|
|
|
|
// Edit @TITLE 编辑部门
|
|
func (d *Department) Edit(ctx context.Context, args ik3cloud.ArgsDepartmentEdit, reply *int) error {
|
|
return logic.DepartmentLogic.Edit(args.DepartmentId, args.ArgsDepartmentAdd)
|
|
}
|
|
|
|
// Delete @TITLE 删除部门
|
|
func (d *Department) Delete(ctx context.Context, numbers []string, reply *int) error {
|
|
return logic.DepartmentLogic.Delete(numbers)
|
|
}
|