|
@@ -1,8 +1,11 @@
|
|
|
package casbin
|
|
package casbin
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
|
+ "dashoo.cn/backend/api/business/register"
|
|
|
"dashoo.cn/business2/parameter"
|
|
"dashoo.cn/business2/parameter"
|
|
|
"encoding/json"
|
|
"encoding/json"
|
|
|
|
|
+ "strconv"
|
|
|
|
|
+
|
|
|
//"fmt"
|
|
//"fmt"
|
|
|
|
|
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/technologyservice"
|
|
"dashoo.cn/backend/api/business/oilsupplier/technologyservice"
|
|
@@ -448,8 +451,16 @@ func (this *OrganizesController) OrgAllListFen() {
|
|
|
svc := organize.GetOrganizeService(utils.DBE)
|
|
svc := organize.GetOrganizeService(utils.DBE)
|
|
|
var user userRole.Base_User
|
|
var user userRole.Base_User
|
|
|
svc.GetEntityById(this.User.Id, &user)
|
|
svc.GetEntityById(this.User.Id, &user)
|
|
|
- ids := svc.GetAllChildById("0")
|
|
|
|
|
- where := " Id in ( " + ids + " )"
|
|
|
|
|
|
|
+ var model register.OilCorporateInfo
|
|
|
|
|
+ where := "UserId=" + this.User.Id
|
|
|
|
|
+ has := svc.GetEntity(&model, where)
|
|
|
|
|
+ ids := ""
|
|
|
|
|
+ if has {
|
|
|
|
|
+ ids = svc.GetAllChildById(strconv.Itoa(model.CheckUnitId))
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ids = svc.GetAllChildById("0")
|
|
|
|
|
+ }
|
|
|
|
|
+ where = " Id in ( " + ids + " )"
|
|
|
|
|
|
|
|
list := make([]organize.Base_Organize, 0)
|
|
list := make([]organize.Base_Organize, 0)
|
|
|
svc.GetEntities(&list, where)
|
|
svc.GetEntities(&list, where)
|