diff --git a/src/YhCore.Service/Impl/WYSHRoleService.cs b/src/YhCore.Service/Impl/WYSHRoleService.cs index 893974c..bd38a78 100644 --- a/src/YhCore.Service/Impl/WYSHRoleService.cs +++ b/src/YhCore.Service/Impl/WYSHRoleService.cs @@ -400,7 +400,7 @@ namespace YhCore.Service.Impl #region 审核角色流程 - public async Task> ListFlowAsync(string name, int pageSize, int pageIndex, string schSerId, int flowType, bool edit) + public async Task> ListFlowAsync(string name, int pageSize, int pageIndex, string schSerId, int flowType, bool edit) { var resultList = (await _flowinfo.FindAsync(m => m.flowType == flowType && m.schSerID == schSerId)).ToList(); @@ -422,8 +422,8 @@ namespace YhCore.Service.Impl if (!string.IsNullOrEmpty(name)) resultList = resultList.Where(m => m.flowname != null && m.flowname.IndexOf(name) >= 0).ToList(); - // 旧 ListFlow 的 Data 是纯数组(字段 SerID/flowname/deptid/typeid/enable/enablename/miaoshu/deitdate/ChaoSend/StepSend/WYPageGG 原样大小写),无总数包装 - return resultList.OrderBy(m => m.SerID).Skip(pageSize * pageIndex).Take(pageSize) + var ordered = resultList.OrderBy(m => m.SerID).ToList(); + var items = ordered.Skip(pageSize * pageIndex).Take(pageSize) .Select(item => new SHRoleFlowListItem { SerID = item.SerID.ToString(), @@ -439,6 +439,8 @@ namespace YhCore.Service.Impl WYPageGG = item.WYPageGG, }) .ToList(); + + return PageVO.Of(items, ordered.Count, pageIndex, pageSize); } public async Task EditFlowAsync(Common_flowinfo model) diff --git a/src/YhCore.Service/Interfaces/IWYSHRoleService.cs b/src/YhCore.Service/Interfaces/IWYSHRoleService.cs index e5a5f94..a5815df 100644 --- a/src/YhCore.Service/Interfaces/IWYSHRoleService.cs +++ b/src/YhCore.Service/Interfaces/IWYSHRoleService.cs @@ -31,8 +31,7 @@ namespace YhCore.Service.Interfaces Task DelSHRoleAsync(string schSerId, List listSHRoleId); // ---- 审核角色流程 ---- - /// 旧 ListFlow 的 Data 为纯数组(非分页对象),此处保持裸 List 对齐旧 data 内容。 - Task> ListFlowAsync(string name, int pageSize, int pageIndex, string schSerId, int flowType, bool edit); + Task> ListFlowAsync(string name, int pageSize, int pageIndex, string schSerId, int flowType, bool edit); Task EditFlowAsync(Common_flowinfo model); Task StepCreateOfSHRoleAsync(Common_flowstep model); Task GetStepInfoAsync(string schSerId, decimal flowid); diff --git a/src/YhCore.WebApi/Controllers/Api/DocPrint/WYSHRoleController.cs b/src/YhCore.WebApi/Controllers/Api/DocPrint/WYSHRoleController.cs index 2c16d22..3558ada 100644 --- a/src/YhCore.WebApi/Controllers/Api/DocPrint/WYSHRoleController.cs +++ b/src/YhCore.WebApi/Controllers/Api/DocPrint/WYSHRoleController.cs @@ -118,9 +118,9 @@ namespace YhCore.WebApi.Controllers.Api.DocPrint #region 审核角色流程 - /// 审核流程列表(旧 ListFlow;data 与旧 Data 一致为纯数组,字段大小写原样)。 + /// 审核流程列表(旧 ListFlow;分页返回 PageVO,Content 内对象字段与旧 Data 对齐)。 [HttpGet("ListFlow")] - public async Task> ListFlow( + public async Task> ListFlow( [FromQuery] string name = null, [FromQuery] int pageSize = 10, [FromQuery] int pageIndex = 0,