/// <summary> /// 读取分页记录 /// </summary> /// <param name="historyService">历史记录仓储服务</param> /// <param name="pageableRepositoryService">分页仓储服务</param> /// <param name="qo">查询对象</param> /// <returns></returns> public IPage <HistoricInstance> LoadPage(IHistoryService historyService, PageableProcessHistoryRepositoryService pageableRepositoryService, HistoricInstanceQuery qo) { HistoricProcessInstanceQueryImpl query = historyService.CreateHistoricProcessInstanceQuery() as HistoricProcessInstanceQueryImpl; FastCopy.Copy <HistoricInstanceQuery, HistoricProcessInstanceQueryImpl>(qo, query); if (qo.IsTerminated.HasValue) { if (qo.IsTerminated.Value) { query.SetDeleted(); } else { query.SetNotDeleted(); } } pageableRepositoryService.SortApplier.ApplySort(query, qo.Pageable); IPage <HistoricInstance> defs = pageableRepositoryService.PageRetriever.LoadPage(historyService as ServiceImpl, query, qo.Pageable, pageableRepositoryService.ProcessDefinitionConverter, (q, firstResult, pageSize) => { return(new Engine.Impl.Cmd.GetHistoricProcessInstancesCmd(q, firstResult, pageSize)); }); return(defs); }
/// <inheritdoc /> public ProcessInstanceHistoriceControllerImpl(ProcessEngineWrapper processEngine, PageableProcessHistoryRepositoryService pageableProcessHistoryService, IProcessEngine engine, SecurityPoliciesApplicationService securityPoliciesApplicationService) { this.processEngine = processEngine; this.repositoryService = engine.RepositoryService; this.runtimeService = engine.RuntimeService; this.historyService = engine.HistoryService; this.securityService = securityPoliciesApplicationService; this.pageableProcessHistoryService = pageableProcessHistoryService; }