|
@@ -15,9 +15,9 @@ func EntPerson(entId int64, isAll bool) (map[string]string, map[string]string, m
|
|
|
nameData := map[string]string{}
|
|
|
positionData := map[int]string{}
|
|
|
//在职人员查询
|
|
|
- personList := IC.MainMysql.Find(util.ENTNICHE_USER, map[string]interface{}{
|
|
|
- "ent_Id": entId,
|
|
|
- }, "phone,name", "", -1, -1)
|
|
|
+ personList := IC.MainMysql.SelectBySql(fmt.Sprintf(`SELECT a.phone,IF(a.name = "我" AND b.role_id = 1 ,"%s",a.name) AS name,b.role_id FROM %s a
|
|
|
+ LEFT JOIN entniche_user_role b on a.id = b.user_id
|
|
|
+ WHERE a.ent_id = %d`, util.UserRoleOne, util.ENTNICHE_USER, entId))
|
|
|
if personList != nil && len(*personList) > 0 {
|
|
|
for _, v := range *personList {
|
|
|
phoneData[common.InterfaceToStr(v["phone"])] = common.InterfaceToStr(v["name"])
|