package services /*func GetCompanyNameByAdmins(adminIds []int) (adminCompanyMap map[int]string, err error) { // 查询所有机构 ob := new(system.EtaBusiness) companyList, er := ob.GetItemsByCondition("", make([]interface{}, 0), []string{}, "") if er != nil { err = fmt.Errorf("获取机构信息失败 %s", err.Error()) return } companyMap := make(map[string]string) if len(companyList) > 0 { for _, v := range companyList { companyMap[v.BusinessCode] = v.BusinessName } } //查询机构下的用户 admin := new(system.Admin) cond := ` AND admin_id in (` + utils.GetOrmInReplace(len(adminIds)) + `)` pars := make([]interface{}, 0) pars = append(pars, adminIds) adminList, err := admin.GetItemsByCondition(cond, pars, []string{}, "") if err != nil { err = fmt.Errorf("获取机构用户失败 %s", err.Error()) return } adminCompanyMap = make(map[int]string) if len(adminList) > 0 { for _, v := range adminList { tmp, ok := companyMap[v.BusinessCode] if ok { adminCompanyMap[v.AdminId] = tmp } } } return }*/