feat(ik3cloud): 实现部门与员工的增删改查功能
- 添加部门新增、编辑、删除接口及逻辑实现 - 添加员工新增、编辑、启用、禁用、删除接口及逻辑实现 - 更新配置文件支持组织ID配置 - 初始化金蝶客户端连接配置 - 优化部门与员工数据查询结构 - 增加提交、审核、反审等业务流程处理 - 完善错误处理与日志记录机制
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/deep-project/kingdee"
|
||||
"github.com/deep-project/kingdee/adapters"
|
||||
client2 "github.com/deep-project/kingdee/pkg/client"
|
||||
@@ -22,6 +24,7 @@ type Config struct {
|
||||
LanguageId string // 语言ID
|
||||
}
|
||||
|
||||
// InitClient @TITLE 初始化
|
||||
func InitClient(config *Config) (*client, error) {
|
||||
var err error
|
||||
Client.Client, err = kingdee.New(config.Host, &adapters.LoginBySign{
|
||||
@@ -37,3 +40,33 @@ func InitClient(config *Config) (*client, error) {
|
||||
Client.config = config
|
||||
return Client, nil
|
||||
}
|
||||
|
||||
// GetResult @TITLE 获取结果
|
||||
func (c *client) GetResult(raw []byte) (res result, err error) {
|
||||
err = json.Unmarshal(raw, &res)
|
||||
return
|
||||
}
|
||||
|
||||
type result struct {
|
||||
Result struct {
|
||||
ResponseStatus struct {
|
||||
ErrorCode int `json:"ErrorCode"`
|
||||
IsSuccess bool `json:"IsSuccess"`
|
||||
Errors []struct {
|
||||
FieldName string `json:"FieldName"`
|
||||
Message string `json:"Message"`
|
||||
DIndex int `json:"DIndex"`
|
||||
} `json:"Errors"`
|
||||
SuccessEntitys []struct {
|
||||
Id int `json:"Id"`
|
||||
Number string `json:"Number"`
|
||||
DIndex int `json:"DIndex"`
|
||||
} `json:"SuccessEntitys"`
|
||||
SuccessMessages []interface{} `json:"SuccessMessages"`
|
||||
MsgCode int `json:"MsgCode"`
|
||||
} `json:"ResponseStatus"`
|
||||
Id int64 `json:"Id"`
|
||||
Number string `json:"Number"`
|
||||
NeedReturnData []any `json:"NeedReturnData"`
|
||||
} `json:"Result"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user