/// <summary>
        ///     查询所有字典信息
        /// </summary>
        /// <returns></returns>
        public async Task <IEnumerable <JsTreeEntity> > GetMongoDbDictionaryTreeByParentIds(IdInput input)
        {
            IList <JsTreeEntity> treeEntities = new List <JsTreeEntity>();
            var builder = Builders <SystemDictionary> .Filter;
            var filter  = builder.Where(w => w.ParentIds.Contains(input.Id.ToString()));
            var datas   = await _dictionaryMongoDbRepository.GetAllEnumerableAsync(filter);

            foreach (var data in datas)
            {
                treeEntities.Add(new JsTreeEntity
                {
                    id     = data.DictionaryId,
                    parent = data.DictionaryId == input.Id ? "#" : data.ParentId.ToString(),
                    text   = data.Name,
                    state  = new JsTreeStateEntity()
                });
            }
            return(treeEntities);
        }
        /// <summary>
        ///     根据流程类型获取所有流程
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <IEnumerable <WorkflowProcessGetOutput> > GetWorkflow(WorkflowProcessGetInput input)
        {
            var workflows = (await _processRepository.GetWorkflow(input)).ToList();
            var list      = new List <FilterDefinition <SystemDictionary> >
            {
                Builders <SystemDictionary> .Filter.Lt("CreateTime", DateTime.Now)
            };
            var filter = Builders <SystemDictionary> .Filter.And(list);

            var dic = (await _dictionaryMongoDbRepository.GetAllEnumerableAsync(filter)).ToList();

            foreach (var workflow in workflows)
            {
                var type = dic.FirstOrDefault(f => f.DictionaryId == workflow.Type);
                if (type != null)
                {
                    workflow.TypeName = type.Name;
                }
            }
            return(workflows);
        }