...
|
...
|
@@ -409,8 +409,10 @@ func (usersService *UsersService) SelectorCompanyOrg(selectorQuery *query.Compan |
|
|
)
|
|
|
for _, v := range result.Orgs {
|
|
|
item = dto.UserOrg{
|
|
|
OrgID: strconv.Itoa(v.OrgID),
|
|
|
OrgName: v.OrgName,
|
|
|
OrgID: strconv.Itoa(v.OrgID),
|
|
|
OrgName: v.OrgName,
|
|
|
ParentId: strconv.Itoa(v.ParentID),
|
|
|
IsOrg: v.IsOrg,
|
|
|
}
|
|
|
dataList = append(dataList, item)
|
|
|
}
|
...
|
...
|
@@ -446,3 +448,37 @@ func (usersService *UsersService) SelectorCompanyRole(selectorQuery *query.Compa |
|
|
}
|
|
|
return int64(result.Count), dataList, nil
|
|
|
}
|
|
|
|
|
|
//CompanyOrgSelector 获取公司全组织部门的下拉列表
|
|
|
func (usersService *UsersService) SelectorCompanyOrgAll(selectorQuery *query.CompanyOrgSelectorQuery) (int64, interface{}, error) {
|
|
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
|
|
selectorQuery.Operator.CompanyId,
|
|
|
selectorQuery.Operator.OrgId,
|
|
|
selectorQuery.Operator.UserId)
|
|
|
result, err := creationUserGateway.OrgSearch(allied_creation_user.ReqOrgSearch{
|
|
|
CompanyId: int(selectorQuery.Operator.CompanyId),
|
|
|
DepName: "",
|
|
|
IsOrg: 0,
|
|
|
Limit: 0,
|
|
|
Offset: 0,
|
|
|
OrgCode: "",
|
|
|
ParentId: 0,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
var (
|
|
|
dataList []dto.UserOrg
|
|
|
item dto.UserOrg
|
|
|
)
|
|
|
for _, v := range result.Orgs {
|
|
|
item = dto.UserOrg{
|
|
|
OrgID: strconv.Itoa(v.OrgID),
|
|
|
OrgName: v.OrgName,
|
|
|
ParentId: strconv.Itoa(v.ParentID),
|
|
|
IsOrg: v.IsOrg,
|
|
|
}
|
|
|
dataList = append(dataList, item)
|
|
|
}
|
|
|
return int64(result.Count), dataList, nil
|
|
|
} |
...
|
...
|
|