获取报表的基础资料数据范围权限

 //销售员权限
            var list = filter.BaseDataTempTable.Where(p => p.BaseDataFormId == "BD_Saler").ToArray();
            if (list.Length > 0)
            {
                string tempTableName = list[0].TempTable;
                string sql = string.Format("select count(1) from " + tempTableName);
                DynamicObjectCollection rows = DBUtils.ExecuteDynamicObject(this.Context, sql);
                if (rows.Count > 0)
                {
                    long count = Convert.ToInt64(rows[0][0]);
                    if (count > 0)
                    {
                        filterString.AppendLine(" and BusinesserID in (select fid from " + tempTableName + ")");
                    }
                }
            }

 

posted @ 2025-05-27 12:37  木古白水  阅读(6)  评论(0)    收藏  举报