public JsonResult GetUserList([FromForm] WXQ.InOutPutEntites.Input.SystemManage.User.GetUserListInput model) { ResponseResult result = new ResponseResult(); GetUserListInputModelValidation validator = new GetUserListInputModelValidation(); ValidationResult vr = validator.Validate(model); if (!vr.IsValid) { result.Code = ResponseResultMessageDefine.ParaError; result.Errors = vr.Errors.Select(e => e.ErrorMessage).ToList(); } else { WXQ.BusinessCore.systemmanage.UserOp op = new WXQ.BusinessCore.systemmanage.UserOp(); SqlSugar.PageModel pagemodel = TypeAdapter.Adapt <WXQ.InOutPutEntites.Input.PageInput, SqlSugar.PageModel>(model.Page); ListResult <WXQ.Enties.Users> rv = op.GetUserList(model.UserName, pagemodel, model.RsState); if (rv == null) { result.Code = ResponseResultMessageDefine.OpLost; result.Errors.Add(ResponseResultMessageDefine.OpLostMessage); } else { result.Data = rv; } } return(Json(result)); }
public JsonResult GetOpLogList([FromForm] WXQ.InOutPutEntites.Input.LogManage.OpLog.GetOpLogListInput model) { ResponseResult result = new ResponseResult(); GetOpLogListInputModelValidation validator = new GetOpLogListInputModelValidation(); ValidationResult vr = validator.Validate(model); if (!vr.IsValid) { result.Code = ResponseResultMessageDefine.ParaError; result.Errors = vr.Errors.Select(e => e.ErrorMessage).ToList(); } else { WXQ.BusinessCore.opLogManager.OpLogOp op = new WXQ.BusinessCore.opLogManager.OpLogOp(); SqlSugar.PageModel pagemodel = TypeAdapter.Adapt <WXQ.InOutPutEntites.Input.PageInput, SqlSugar.PageModel>(model.Page); ListResult <WXQ.Enties.OpLog> rv = op.GetOpLogList(model.methodName, model.opUserId, model.bgDt, model.endDt, model.Ip, pagemodel); if (rv == null) { result.Code = ResponseResultMessageDefine.OpLost; result.Errors.Add(ResponseResultMessageDefine.OpLostMessage); } else { result.Data = rv; } } return(Json(result)); }
public JsonResult GetGroupList([FromForm] WXQ.InOutPutEntites.Input.configmanager.Dict.GetDictListInput model) { ResponseResult result = new ResponseResult(); GetDictListInputModelValidation validator = new GetDictListInputModelValidation(); ValidationResult vr = validator.Validate(model); if (!vr.IsValid) { result.Code = ResponseResultMessageDefine.ParaError; result.Errors = vr.Errors.Select(e => e.ErrorMessage).ToList(); } else { WXQ.BusinessCore.CommonManager.DictOp op = new WXQ.BusinessCore.CommonManager.DictOp(); SqlSugar.PageModel pagemodel = TypeAdapter.Adapt <WXQ.InOutPutEntites.Input.PageInput, SqlSugar.PageModel>(model.Page); ListResult <WXQ.Enties.Dict> rv = op.GetDictList("dictgroup", pagemodel); if (rv == null) { result.Code = ResponseResultMessageDefine.OpLost; result.Errors.Add(ResponseResultMessageDefine.OpLostMessage); } else { result.Data = rv; } } return(Json(result)); }
/// <summary> /// 查询网关配置列表 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <QueryApiGatewayConfigurationOutput> QueryApiGatewayConfiguration(QueryApiGatewayConfigurationInput input) { var pageModel = new SqlSugar.PageModel { PageIndex = input.PageIndex, PageSize = input.PageSize }; var list = await _configDbRepository.GetPageListAsync(it => true, pageModel); return(new QueryApiGatewayConfigurationOutput { CurrentPage = pageModel.PageIndex, Total = pageModel.PageCount, Data = list }); }
public IActionResult List(ListSupportInputModel model) { DataAccess.TASM_SUPPORT_Da manager = new DataAccess.TASM_SUPPORT_Da(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = model.pageindex; p.PageSize = model.pagesize; List <SupportModel> list = manager.ListByWhere(model.keywords, ref p, model.WatchType, model.WatchState, model.Uuid); return(SuccessResultList(list, p)); }
public IActionResult List(string keywords, int pageIndex, int pageSize, int watchType = 0, string orderby = "SID") { DataAccess.TASM_SUPPORT_Da manager = new DataAccess.TASM_SUPPORT_Da(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = pageIndex; p.PageSize = pageSize; List <SupportModel> list = manager.ListByWhere(keywords, ref p, (SupprotWatchType)watchType, SupprotWatchState.全部, this.UserInfo.USER_ID, orderby); return(SuccessResultList(list, p)); }
public IActionResult List(string keywords, int pageIndex, int pageSize) { DataAccess.TASM_CUSTOMERManager manager = new DataAccess.TASM_CUSTOMERManager(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = pageIndex; p.PageSize = pageSize; List <TASM_CUSTOMER> list = new List <TASM_CUSTOMER>(); manager.ListByWhere(keywords, ref p, ref list); return(SuccessResultList(list, p)); }
public IActionResult ListSupport(ApiListModelBase model) { TASM_SUPPORT_Da da = new TASM_SUPPORT_Da(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = model.pageindex; p.PageSize = model.pagesize; List <TASM_SUPPORT> list = da.ListByWhere(model.keywords, ref p); return(SuccessResultList(list, p)); }
public JsonResult SuccessResultList <T>(List <T> list, SqlSugar.PageModel page, string msg = "成功") { /** * PageIndex:当前页码 * PageSize:每页显示多少条 * PageCount:总共有多少条数据 * PageTotal:总共有多少页 * **/ var Total = page.PageCount % page.PageSize > 0 ? page.PageCount / page.PageSize + 1 : page.PageCount / page.PageSize; return(Json(new { Success = true, Code = 1, Message = msg, PageIndex = page.PageIndex, PageSize = page.PageSize, PageCount = page.PageCount, PageTotal = Total, Content = list })); }
public JsonResult ProjectList([FromQuery] ApiListModelBase model) { DataAccess.TASM_PROJECTManager manager = new DataAccess.TASM_PROJECTManager(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = model.pageindex; p.PageSize = model.pagesize; List <ProjectModel> list = new List <ProjectModel>(); manager.ListByWhere(model.keywords, ref p, ref list); return(SuccessResultList(list, p)); }
public JsonResult UserList([FromQuery] ListUserApiModel model) { DataAccess.TASM_USERManager manager = new DataAccess.TASM_USERManager(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = model.pageindex; p.PageSize = model.pagesize; List <TASM_USER> list = new List <TASM_USER>(); manager.ListByDept(model.keywords, ref p, ref list); return(SuccessResultList(list, p)); }
public JsonResult List([FromQuery] DirectionListModel model) { DataAccess.TASM_TRAVELManager manager = new DataAccess.TASM_TRAVELManager(); List <TASM_TRAVEL> list = new List <TASM_TRAVEL>(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = model.pageindex; p.PageSize = model.pagesize; manager.ListByUserId(model.userid, ref p, ref list); return(SuccessResultList(list, p)); }
public IActionResult ListPersonal(ListSupportInputModel model) { TASM_SUPPORT_PERSONAL_Da da = new TASM_SUPPORT_PERSONAL_Da(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = model.pageindex; p.PageSize = model.pagesize; SupprotWatchState state = model.WatchState; SupprotWatchType type = model.WatchType; List <PersonalSupportListModel> list = da.ListByWhere(string.Empty, ref p, type, state, model.Uuid); return(SuccessResultList(list, p)); }
public IActionResult ListByProjectId(ListMachineInputModel model) { DataAccess.TASM_MACHINEManager manager = new DataAccess.TASM_MACHINEManager(); SqlSugar.PageModel p = new SqlSugar.PageModel() { PageIndex = model.pageindex, PageSize = model.pagesize }; List <MachineModel> list = new List <MachineModel>(); manager.ListByProject(model.ProjectId, model.keywords, ref p, ref list); return(SuccessResultList(list, p)); }
public IActionResult List(string keywords, int pageIndex, int pageSize) { DataAccess.TASM_PROJECTManager manager = new DataAccess.TASM_PROJECTManager(); SqlSugar.PageModel p = new SqlSugar.PageModel() { PageIndex = pageIndex, PageSize = pageSize }; List <ProjectModel> list = new List <ProjectModel>(); manager.ListByWhere(keywords, ref p, ref list); return(SuccessResultList(list, p)); }
public IActionResult List(string date, string keyword, int pageIndex, int pageSize) { TASM_TRAVELManager manager = new TASM_TRAVELManager(); SqlSugar.PageModel p = new SqlSugar.PageModel(); p.PageIndex = pageIndex; p.PageSize = pageSize; DateTime time = DateTime.Now; if (!string.IsNullOrEmpty(date)) { time = DateTime.Parse(date); } List <DirectionModel> list = new List <DirectionModel>(); manager.ListBaseUser(time, keyword, ref p, ref list); return(SuccessResultList(list, p)); }