public ActionResult GetTrace() { PageParameter pageParameter = new PageParameter { Page = RequestInt32("page") ?? 1, Pagesize = RequestInt32("pagesize") ?? 20, SortName = RequestString("sortname") ?? "Timespan", SortOrder = RequestString("sortorder") ?? "desc", Where = Filter() }; pageParameter.SortName?.Replace(Table, "."); pageParameter.SortOrder?.Replace(Table, "."); var totalNumber = 0; if (string.IsNullOrWhiteSpace(pageParameter.SortName)) { pageParameter.SortName = "Timespan"; } if (string.IsNullOrWhiteSpace(pageParameter.SortOrder)) { pageParameter.SortOrder = "desc"; } var dt = _db.Queryable <sys_trace>().Where(t => t.PreTraceId == null || t.PreTraceId == "") .Where(pageParameter.Where) .OrderBy($"{pageParameter.SortName} {pageParameter.SortOrder}") .ToPageList(pageParameter.Page, pageParameter.Pagesize, ref totalNumber); var output = new Dictionary <string, object> { { "#Total", totalNumber }, { "#Rows", dt } }; return(new ActionResult(true, dt, output)); }
/// <summary> /// 获取推送用户信息列表(获取推送接收者信息列表)短信 /// </summary> /// <param name="id"></param> /// <returns></returns> public List <Business_Personnel_Information> GetPushUserSms(Business_WeChatPush_Information pushModel) { using (SqlSugar.SqlSugarClient _dbMsSql = SugarDao.SugarDao_MsSql.GetInstance()) { var queryable = _dbMsSql.Queryable <Business_Personnel_Information>() .JoinTable <Business_Personnel_Information, Business_WeChatPushDetail_Information>((c1, c2) => c1.UserID == c2.PushObject && c2.Business_WeChatPushVguid == pushModel.VGUID, JoinType.INNER); return(queryable.ToList()); } }
/// <summary> /// 绑定用户角色 /// </summary> /// <returns></returns> public List <Sys_Role> GetSysRoleList() { using (SqlSugar.SqlSugarClient _dbMsSql = SugarDao.SugarDao_MsSql.GetInstance()) { Guid vguid = Guid.Parse(Common.Tools.MasterVGUID.SysAdminRole); List <Sys_Role> sysRoleList = _dbMsSql.Queryable <Sys_Role>().Where(i => i.Vguid != vguid).ToList(); return(sysRoleList); } }
/// <summary> /// 绑定部门信息 /// </summary> /// <returns></returns> public List <Master_Organization> GetDepartmentList(string vguid) { using (SqlSugar.SqlSugarClient _dbMsSql = SugarDao.SugarDao_MsSql.GetInstance()) { Guid VGUID = Guid.Parse(vguid); List <Master_Organization> departmentList = _dbMsSql.Queryable <Master_Organization>().Where(i => i.ParentVguid == VGUID).ToList(); return(departmentList); } }
/// <summary> /// 绑定公司信息 /// </summary> /// <returns></returns> public List <Master_Organization> GetCompanyList() { using (SqlSugar.SqlSugarClient _dbMsSql = SugarDao.SugarDao_MsSql.GetInstance()) { Guid vguid = Guid.Parse(Common.Tools.MasterVGUID.ParentCompany); List <Master_Organization> companyList = _dbMsSql.Queryable <Master_Organization>().Where(i => i.ParentVguid == vguid).ToList(); return(companyList); } }
public ActionResult GetAllUser(PageParameter pageParameter) { var totalNumber = 0; if (string.IsNullOrWhiteSpace(pageParameter.SortName)) { pageParameter.SortName = "rdt"; } if (string.IsNullOrWhiteSpace(pageParameter.SortOrder)) { pageParameter.SortOrder = "desc"; } var dt = _db.Queryable <sys_member, bif_company>((m, c) => new object[] { SqlSugar.JoinType.Left, m.coid == c.ID }) .Where(pageParameter.Where) .Select((m, c) => new { m.account, m.name, m.coid, m.ID, m.position, m.rdt, m.state, m.timespan, co_n = c.name, co = c.code }) .MergeTable() .OrderBy($"{pageParameter.SortName} {pageParameter.SortOrder}") .ToPageList(pageParameter.Page, pageParameter.Pagesize, ref totalNumber); var output = new Dictionary <string, object> { { "#Total", totalNumber }, { "#Rows", dt } }; return(new ActionResult(true, null, output)); }
internal List <NoteTitle> GetNotesTitle() { var NotesTitle = db.Queryable <NoteTitle>().ToList(); return(NotesTitle); }