master
huanghai 5 years ago
parent 9c7402cfee
commit b2bcdacc12

@ -1190,7 +1190,7 @@ func disableMainOrg(personIds []string) {
2020-08-12
*/
*/
func GetPersonOrgName(personId string) (string, error) {
sql := `select group_concat(org_name) as org_name from t_base_organization where org_id in (
select org_id from t_base_teacher_org where person_id=? and b_use=1 order by is_main desc);`
@ -1201,5 +1201,9 @@ func GetPersonOrgName(personId string) (string, error) {
if len(list) == 0 {
return "没有找到此人员", nil
}
return list[0]["org_name"].(string), nil
if list[0]["org_name"] == nil {
return "未找到部门信息", nil
} else {
return list[0]["org_name"].(string), nil
}
}

Loading…
Cancel
Save