| | |
| | | [ApiGroup(ApiGroupNames.PerMission)] |
| | | public class MesRohInManager : IRomteService |
| | | { |
| | | |
| | | /// <summary> |
| | | /// HTTP上下文 |
| | | /// HTTP上下文 |
| | | /// </summary> |
| | | private readonly IHttpContextAccessor _http; |
| | | |
| | | /// <summary> |
| | | /// 用户code,用户guid,组织id列表 |
| | | /// 用户code,用户guid,组织id列表 |
| | | /// </summary> |
| | | |
| | | private readonly string _userCode, _userGuid, _orgFids; |
| | | |
| | | public MesRohInManager(IHttpContextAccessor httpContextAccessor) |
| | | { |
| | | //变量附值 |
| | | _http = httpContextAccessor; |
| | | (_userCode, _userGuid, _orgFids) = |
| | | UtilityHelper.GetUserGuidAndOrgGuid(_http); |
| | | (_userCode, _userGuid, _orgFids) =UtilityHelper.GetUserGuidAndOrgGuid(_http); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<PageList<dynamic>> GetListPage([FromBody] dynamic model) |
| | | { |
| | | int currentPage = model.currentPage; //当前页 |
| | | int everyPageSize = model.everyPageSize; //每页大小 |
| | | string sortName = model.sortName; //排序 |
| | | string keyWhere = model.keyWhere; //查询条件 |
| | | int currentPage = model.currentPage;//当前页 |
| | | int everyPageSize = model.everyPageSize;//每页大小 |
| | | string sortName = model.sortName;//排序 |
| | | string keyWhere = model.keyWhere;//查询条件 |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@inCurrentPage", currentPage), |
| | |
| | | dset.Tables[0].Rows.Count > 0) //有数据 |
| | | { |
| | | //总记录数 |
| | | var intTotal = |
| | | int.Parse(dset.Tables[1].Rows[0]["intTotal"].ToString()); |
| | | var intTotal =int.Parse(dset.Tables[1].Rows[0]["intTotal"].ToString()); |
| | | //计算共有几页 |
| | | var pages = intTotal % everyPageSize != 0 |
| | | ? intTotal / everyPageSize + 1 |
| | |
| | | { |
| | | LogHelper.Debug(ToString(), ex.Message); |
| | | } |
| | | |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, |
| | | ReturnCode.Success, "读取成功"); |
| | | } |
| | |
| | | "读取成功!"); |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Default, "读取失败!"); |
| | | } |
| | | |
| | | |
| | | } |