- 修改部门服务中 Ik3cloudInfo 方法的返回结构体为 ReplyDepartmentIk3cloudInfo - 新增 ReplyDepartmentIk3cloudInfo 结构体定义,包含金蝶相关字段 - 修改员工服务中 Ik3cloudInfo 方法的返回结构体为 ReplyStaffIk3cloudInfo - 新增 ReplyStaffIk3cloudInfo 结构体定义,扩展更多金蝶相关信息字段 - 调整工厂保存参数结构体 ArgsFactorySave,增加部门编号和员工编号字段 - 移除部门和员工服务对 ik3cloud 包的直接依赖引用
49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
package ik3cloud
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.kumo.work/shama/service/client"
|
|
)
|
|
|
|
type factory struct {
|
|
}
|
|
type ArgsFactorySave struct {
|
|
FactoryId int64 // 工厂id
|
|
Number string // 工厂编码
|
|
Name string // 工厂名称
|
|
ShortName string // 简称
|
|
Address string // 地址
|
|
ZipCode string
|
|
LegalPerson string
|
|
TaxNumber string
|
|
RegAddress string
|
|
Bank string
|
|
BankAccount string
|
|
Contacts []FactoryContactItem
|
|
DepartmentNumber string // 部门编号
|
|
StaffNumber string // 员工编号
|
|
}
|
|
|
|
type FactoryContactItem struct {
|
|
ContactNumber string // 联系人编号
|
|
Name string // 部门名称
|
|
Sex string // 性别
|
|
Job string // 职位
|
|
Tel string // 电话
|
|
Phone string // 手机
|
|
Fax string // 传真
|
|
Email string // 邮箱
|
|
IsDefault bool // 是否默认/主联系人
|
|
}
|
|
|
|
// Save @TITLE 保存工厂
|
|
func (f *factory) Save(ctx context.Context, args ArgsFactorySave) (entity Entity, err error) {
|
|
xClient, err := client.GetClient(f)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = xClient.Call(ctx, "Save", args, &entity)
|
|
return
|
|
}
|