客户列表添加判断权限范围

dev
cjy 1 month ago
parent b719331333
commit 6871464baf

@ -478,7 +478,12 @@ public class ClientInfoService : ServiceBase, IClientInfoService
query = query.Where(list);
}
#region 判断权限范围
if (scope == "all")
{
query = query.ClearFilter<ISharedOrgId>();
}
#endregion
var result = await query.Select((c, c1, c2, ct) => new ClientInfoRes
{
CodeName = c.CodeName,

@ -1629,7 +1629,7 @@ public class CommonService : ICommonService
var ruleInfo = tenantDb.Queryable<CodeDataRuleTemplate>().First(x => x.Id == (long)rule.VisibleTemplateId);
if (ruleInfo.RuleScope == "all")
{
return (queryable.ClearFilter<IOrgId>(), ruleInfo.RuleScope, otherContidions); //查询全部
return (queryable.ClearFilter<IOrgId>().ClearFilter<ISharedOrgId>(), ruleInfo.RuleScope, otherContidions); //查询全部
}
else if (ruleInfo.RuleScope == "none")
{
@ -1707,14 +1707,14 @@ public class CommonService : ICommonService
// db.ConfigQuery.Context.Utilities.JsonToConditionalModels(
// JsonConvert.SerializeObject(conditions));
var additions = ConvertConditionalModel(ruleInfo.AdditionDataRules);
return (queryable.ClearFilter<IOrgId>().Where(conditionalModels), ruleInfo.RuleScope, additions); //查询指定机构
return (queryable.ClearFilter<IOrgId>().ClearFilter<ISharedOrgId>().Where(conditionalModels), ruleInfo.RuleScope, additions); //查询指定机构
}
else if (ruleInfo.RuleScope == "select_user")
{
//var conditionalModels = ConvertConditionalModel(ruleInfo.DataRules);
var conditionalModels = ConvertConditionalModel(ruleInfo.DataRules);
var additions = ConvertConditionalModel(ruleInfo.AdditionDataRules);
return (queryable.ClearFilter<IOrgId>().Where(conditionalModels), ruleInfo.RuleScope, additions);//查询指定人员
return (queryable.ClearFilter<IOrgId>().ClearFilter<ISharedOrgId>().Where(conditionalModels), ruleInfo.RuleScope, additions);//查询指定人员
}
else if (ruleInfo.RuleScope == "customize")

Loading…
Cancel
Save