Exemplo n.º 1
0
        /// <summary>
        /// 获取模版类型键值对
        /// </summary>
        /// <param name="JournalID"></param>
        /// <param name="TType"></param>
        /// <param name="isChecked">是否验证该模版已经存在</param>
        /// <returns></returns>
        public IDictionary <int, string> GetTCategoryDcit(Int64 JournalID, Byte TType, bool isChecked)
        {
            IDictionary <int, string> dict = new DictValueService().GetDictValueDcit(JournalID, EnumDictKey.TCategory.ToString());

            if (dict != null && dict.Count > 0)
            {
                if (isChecked)
                {
                    IList <Int32> list = GetUserdTCategory(JournalID, TType);
                    if (list != null && list.Count > 0)
                    {
                        dict = dict.Where(p => !list.Contains(p.Key)).ToDictionary(p => p.Key, q => q.Value);
                    }
                }
            }
            return(dict);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获取模版类型键值对
 /// </summary>
 /// <param name="JournalID"></param>
 /// <param name="TType"></param>
 /// <param name="isChecked">是否验证该模版已经存在</param>
 /// <returns></returns>
 public IDictionary<int, string> GetTCategoryDcit(Int64 JournalID, Byte TType,bool isChecked)
 {
     IDictionary<int, string> dict = new DictValueService().GetDictValueDcit(JournalID, EnumDictKey.TCategory.ToString());
     if (dict != null && dict.Count > 0)
     {
         if (isChecked)
         {
             IList<Int32> list = GetUserdTCategory(JournalID, TType);
             if (list != null && list.Count > 0)
                 dict = dict.Where(p => !list.Contains(p.Key)).ToDictionary(p => p.Key, q => q.Value);
         }
     }
     return dict;
 }
        /// <summary>
        /// 按基金级别统计收稿量
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public IList<ContributionAccountEntity> GetContributionAccountListByFund(ContributionAccountQuery query)
        {
            IList<ContributionAccountEntity> list = ContributionInfoBusProvider.GetContributionAccountListByFund(query);
            DictValueService service = new DictValueService();
            var dictLevel = service.DictValueBusProvider.GetDictValueDcit(query.JournalID, EnumDictKey.FundLevel.ToString());
            if (list == null)
                list = new List<ContributionAccountEntity>();
            foreach (var item in dictLevel)
            {
                if (list.Where(p => p.FundLevel == item.Key).Count()==0)
                {
                    list.Add(new ContributionAccountEntity() { FundLevel = item.Key, Account = 0 });
                }
            }
            foreach (var model in list)
            {
                model.FundName = dictLevel.GetValue(model.FundLevel, model.FundLevel.ToString());
            }

            return list;
        }