Beispiel #1
0
        /// <summary>
        /// 获取稿件数据
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public IList <ContributionInfoEntity> GetContributionInfoList(ContributionInfoQuery query)
        {
            IList <ContributionInfoEntity> listC = ContributionInfoBusProvider.GetContributionInfoList(query);

            if (query.IsAuxiliary)
            {
                JournalChannelQuery jChannelQuery = new JournalChannelQuery();
                jChannelQuery.JournalID = query.JournalID;
                IssueService service = new IssueService();
                IList <JournalChannelEntity> list = service.GetJournalChannelList(jChannelQuery);
                foreach (ContributionInfoEntity item in listC)
                {
                    JournalChannelEntity itemChannel = list.SingleOrDefault(p => p.JChannelID == item.JChannelID);
                    if (itemChannel != null)
                    {
                        item.JChannelName = itemChannel.ChannelName;
                    }
                    item.AuthorList = GetContributionAuthorList(new ContributionAuthorQuery()
                    {
                        JournalID = item.JournalID, CID = item.CID
                    });
                }
            }
            return(listC);
        }
        /// <summary>
        /// 获取稿件数据
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public IList<ContributionInfoEntity> GetContributionInfoList(ContributionInfoQuery query)
        {
            IList<ContributionInfoEntity> listC =  ContributionInfoBusProvider.GetContributionInfoList(query);

            if (query.IsAuxiliary)
            {
                JournalChannelQuery jChannelQuery = new JournalChannelQuery();
                jChannelQuery.JournalID = query.JournalID;
                IssueService service = new IssueService();
                IList<JournalChannelEntity> list = service.GetJournalChannelList(jChannelQuery);
                foreach (ContributionInfoEntity item in listC)
                {
                    JournalChannelEntity itemChannel = list.SingleOrDefault(p => p.JChannelID == item.JChannelID);
                    if (itemChannel != null)
                    {
                        item.JChannelName = itemChannel.ChannelName;
                    }
                    item.AuthorList = GetContributionAuthorList(new ContributionAuthorQuery() { JournalID = item.JournalID, CID = item.CID });
                }
            }
            return listC;
        }