diff --git a/ik3cloud/factory.go b/ik3cloud/factory.go index 75150a6..7d3dfad 100644 --- a/ik3cloud/factory.go +++ b/ik3cloud/factory.go @@ -9,18 +9,20 @@ import ( 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 + 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 { diff --git a/oa/department.go b/oa/department.go index 36cea37..fb173f8 100644 --- a/oa/department.go +++ b/oa/department.go @@ -5,7 +5,6 @@ import ( "time" "git.kumo.work/shama/service/client" - "git.kumo.work/shama/service/ik3cloud" ) type department struct { @@ -97,13 +96,20 @@ func (d *department) SetStaff(ctx context.Context, args ArgsDepartmentSetStaff) return xClient.Call(ctx, "SetStaff", args, &reply) } +type ReplyDepartmentIk3cloudInfo struct { + Id int64 `json:"id"` // 金蝶员工id + Number string `json:"number"` // 金蝶员工编码 + PositionID int64 `json:"positionID"` // 金蝶部门职位id + PositionNumber string `json:"positionNumber"` // 金蝶部门职位编码 +} + // Ik3cloudInfo @TITLE 金蝶同步信息 -func (d *department) Ik3cloudInfo(ctx context.Context, departmentId int64) (entity ik3cloud.Entity, err error) { +func (d *department) Ik3cloudInfo(ctx context.Context, departmentId int64) (reply ReplyDepartmentIk3cloudInfo, err error) { xClient, err := client.GetClient(d) if err != nil { return } - err = xClient.Call(ctx, "Ik3cloudInfo", departmentId, &entity) + err = xClient.Call(ctx, "Ik3cloudInfo", departmentId, &reply) return } diff --git a/oa/staff.go b/oa/staff.go index 7807d52..8803898 100644 --- a/oa/staff.go +++ b/oa/staff.go @@ -5,7 +5,6 @@ import ( "time" "git.kumo.work/shama/service/client" - "git.kumo.work/shama/service/ik3cloud" "git.kumo.work/shama/service/lib/bean" ) @@ -267,13 +266,24 @@ func (s *staff) Enable(ctx context.Context, staffIds []int64) (err error) { return xClient.Call(ctx, "Enable", staffIds, &reply) } +type ReplyStaffIk3cloudInfo struct { + Id int64 `json:"id"` // 金蝶员工id + Number string `json:"number"` // 金蝶员工编码 + PositionId int64 `json:"positionId"` // 金蝶部门职位id + PositionNumber string `json:"positionNumber"` // 金蝶部门职位编码 + XsyId int64 `json:"xsyId"` // 金蝶员工销售员id + XsyNumber string `json:"xsyNumber"` // 金蝶员工销售员编码 + CgyId int64 `json:"cgyId"` // 金蝶员工采购员id + CgyNumber string `json:"cgyNumber"` // 金蝶员工采购员编码 +} + // Ik3cloudInfo @TITLE 金蝶同步信息 -func (s *staff) Ik3cloudInfo(ctx context.Context, staffId int64) (entity ik3cloud.Entity, err error) { +func (s *staff) Ik3cloudInfo(ctx context.Context, staffId int64) (reply ReplyStaffIk3cloudInfo, err error) { xClient, err := client.GetClient(s) if err != nil { return } - err = xClient.Call(ctx, "Ik3cloudInfo", staffId, &entity) + err = xClient.Call(ctx, "Ik3cloudInfo", staffId, &reply) return }