企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` default: string sqlwhere = "(depid in (" + SysVisitor.Instance.Departments + "))"; if (SysVisitor.Instance.IsAdmin) { //判断是否是超管如果是超管理,所有显示 sqlwhere = " 1=1 ";//如果是超管则不显示 } if (!string.IsNullOrEmpty(rpm.Filter))//如果筛选不为空 { string str = " and " + FilterTranslator.ToSql(rpm.Filter); sqlwhere = sqlwhere + str; } string sort = rpm.Sort; if (sort==null) { sort = "keyid desc"; } //TableConvention.Resolve(typeof(MJUserModel)) 转换成表名 var pcp = new ProcCustomPage(TableConvention.Resolve(typeof(MJOrderModel))) { PageIndex = rpm.Pageindex, PageSize = rpm.Pagesize, OrderFields = sort, WhereString = sqlwhere }; int recordCount; DataTable dt = DbUtils.GetPageWithSp(pcp, out recordCount); context.Response.Write(JSONhelper.FormatJSONForEasyuiDataGrid(recordCount, dt)); ```