|
|
|
@ -6,6 +6,7 @@ import (
|
|
|
|
|
"dsBaseRpc/Const/ErrorConst"
|
|
|
|
|
"dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao"
|
|
|
|
|
"dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto"
|
|
|
|
|
"dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao"
|
|
|
|
|
"dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonDao"
|
|
|
|
|
"dsBaseRpc/Utils/CommonUtil"
|
|
|
|
|
"dsBaseRpc/Utils/LogUtil"
|
|
|
|
@ -308,7 +309,7 @@ func (s *Rpc) CheckDataPrivilege(ctx context.Context, in *BaseRolePersonProto.Ch
|
|
|
|
|
if list[i]["rule_id"].(string)[len(list[i]["rule_id"].(string))-2:] == "00" && list[i]["rule_id"].(string)[0:4] == areaCodes[j][0:4] {
|
|
|
|
|
found = true
|
|
|
|
|
break
|
|
|
|
|
} else if list[i]["rule_id"].(string) == areaCodes[j] {//如果是本级
|
|
|
|
|
} else if list[i]["rule_id"].(string) == areaCodes[j] { //如果是本级
|
|
|
|
|
found = true
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
@ -389,11 +390,18 @@ func (s *Rpc) CheckDataPrivilege(ctx context.Context, in *BaseRolePersonProto.Ch
|
|
|
|
|
return &reply, err
|
|
|
|
|
}
|
|
|
|
|
found = true
|
|
|
|
|
//l3:因人员与单位部门关系扩展为一对多的关系,所以,这里需要检查人员所在哪些单位,一旦有一个单位符合条件,即标识可以进行操作。
|
|
|
|
|
l3, _, err := BaseTeacherDao.GetPersonAllBureauXZQH(in.PersonId[0])
|
|
|
|
|
if err != nil {
|
|
|
|
|
reply.Success = false
|
|
|
|
|
reply.Message = "查询人员所在的单位信息(行政区划)失败!"
|
|
|
|
|
return &reply, err
|
|
|
|
|
}
|
|
|
|
|
for i := range list {
|
|
|
|
|
for j := range l2 {
|
|
|
|
|
if l2[j]["city_code"].(string) != list[i]["rule_id"].(string) &&
|
|
|
|
|
l2[j]["district_code"].(string) != list[i]["rule_id"].(string) &&
|
|
|
|
|
l2[j]["bureau_id"].(string) != list[i]["rule_id"].(string) {
|
|
|
|
|
for j := range l3 {
|
|
|
|
|
if l3[j]["city_code"].(string) != list[i]["rule_id"].(string) &&
|
|
|
|
|
l3[j]["district_code"].(string) != list[i]["rule_id"].(string) &&
|
|
|
|
|
l3[j]["bureau_id"].(string) != list[i]["rule_id"].(string) {
|
|
|
|
|
found = false
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|