2
3
Преглед на файлове

增项企业选择审批人

lining преди 6 години
родител
ревизия
75d8552fc5
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 7 2
      src/dashoo.cn/backend/api/controllers/casbin/organize.go

+ 7 - 2
src/dashoo.cn/backend/api/controllers/casbin/organize.go

@@ -431,8 +431,13 @@ func (this *OrganizesController) OrgAllList() {
 
 	var user userRole.Base_User
 	svc.GetEntityById(this.User.Id, &user)
-	unitId := svc.GetMyUnitDepartmentId(this.User.DepartmentId)
-	ids := svc.GetAllChildById(unitId)
+	ids := ""
+	if this.User.DepartmentId == "" {
+		ids = svc.GetAllChildById("100000000")
+	} else {
+		unitId := svc.GetMyUnitDepartmentId(this.User.DepartmentId)
+		ids = svc.GetAllChildById(unitId)
+	}
 	where := " Id in ( " + ids + " )"
 
 	list := make([]organize.Base_Organize, 0)