コード例 #1
0
        /// <summary>
        /// 提交审稿单
        /// </summary>
        /// <param name="auditBillEntity"></param>
        /// <returns></returns>
        public bool SubmitAuditBill(AuditBillEntity auditBillEntity)
        {
            bool flag = false;

            // 得到审稿操作信息
            FlowActionQuery actionQuery = new FlowActionQuery();

            actionQuery.ActionID  = auditBillEntity.ActionID;
            actionQuery.JournalID = auditBillEntity.JournalID;
            FlowActionEntity actionEntity = new FlowActionService().GetFlowActionEntity(actionQuery);

            // 得到审稿状态及配置信息
            FlowStatusQuery flowStatusQuery = new FlowStatusQuery();

            flowStatusQuery.JournalID = auditBillEntity.JournalID;
            flowStatusQuery.StatusID  = actionEntity == null ? 0 : actionEntity.StatusID;
            FlowStep flowStep = new FlowStatusService().GetFlowStep(flowStatusQuery);

            //得到稿件信息
            ContributionInfoEntity contributionInfoEntity = new ContributionInfoEntity();
            ContributionInfoQuery  query = new ContributionInfoQuery();

            query.JournalID = auditBillEntity.JournalID;
            query.CID       = auditBillEntity.CID;
            ContributionInfoService service = new ContributionInfoService();

            contributionInfoEntity = service.GetContributionInfo(query);

            if (contributionInfoEntity.AuthorID == Convert.ToInt64(auditBillEntity.ReveiverList.Split(',')[0]))
            {
                auditBillEntity.ReveiverList = contributionInfoEntity.AuthorID.ToString();
                flag = FlowCirculationBusProvider.ProcessFlowCirulation(auditBillEntity);
            }
            else
            {
                flag = FlowCirculationBusProvider.ProcessFlowCirulation(auditBillEntity);
            }


            if (flag)
            {
                if (flowStep.FlowConfig != null)
                {
                    if (flowStep.FlowConfig.IsEmailRemind)
                    {
                        /// TODO:记录定期发送邮件的任务
                    }

                    if (flowStep.FlowConfig.IsSMSRemind)
                    {
                        /// TODO:记录定期发送短信的任务
                    }
                }
            }
            return(flag);
        }
コード例 #2
0
        /// <summary>
        /// 组装数据
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        private List <MessageRecodeEntity> GetMsgList(List <MessageRecodeEntity> list, MessageRecodeQuery mQuery)
        {
            if (list == null || list.Count == 0)
            {
                return(list);
            }
            AuthorInfoService service = new AuthorInfoService();
            AuthorInfoEntity  entity  = new AuthorInfoEntity();
            AuthorInfoQuery   query   = new AuthorInfoQuery();

            query.JournalID = mQuery.JournalID;
            var dict = service.AuthorInfoBusProvider.GetAuthorDict(query);


            //获取稿件作者数据字典
            ContributionInfoService cservice = new ContributionInfoService();
            ContributionInfoEntity  centity  = new ContributionInfoEntity();
            ContributionInfoQuery   cquery   = new ContributionInfoQuery();

            cquery.JournalID = mQuery.JournalID;
            cquery.CID       = (long)mQuery.CID;
            var cdict = cservice.GetContributionAuthorDict(cquery);

            centity = cservice.GetContributionInfo(cquery);

            foreach (var mode in list)
            {
                mode.SendUserName = dict.GetValue(mode.SendUser, mode.SendUser.ToString());
                entity            = service.GetAuthorInfo(mode.ReciveUser);
                if (entity != null)
                {
                    mode.ReciveUserName = dict.GetValue(mode.ReciveUser, mode.ReciveUser.ToString());
                }
                else
                {
                    mode.ReciveUserName = cdict.GetValue(mode.ReciveUser, mode.ReciveUser.ToString());
                }
            }
            return(list);
        }
コード例 #3
0
        /// <summary>
        /// 获取财务入款通知分页列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Pager <FinanceAccountEntity> GetFinanceAccountPageList(ContributionInfoQuery query)
        {
            Pager <FinanceAccountEntity> pager = FinanceContributeBusProvider.GetFinanceAccountPageList(query);

            if (pager == null)
            {
                return(pager);
            }
            IList <FinanceAccountEntity> list = pager.ItemList;

            if (list == null || list.Count == 0)
            {
                return(pager);
            }

            //AuthorInfoService service = new AuthorInfoService();
            //AuthorInfoQuery aQuery = new AuthorInfoQuery();
            //aQuery.JournalID = query.JournalID;
            //var dict = service.AuthorInfoBusProvider.GetAuthorDict(aQuery);
            //foreach (var mode in list)
            //{
            //    mode.EditAuthorName = dict.GetValue(mode.EditAuthorID, mode.EditAuthorID.ToString());
            //    mode.FirstAuthor = dict.GetValue(mode.FirstAuthorID, mode.FirstAuthorID.ToString());
            //}
            ContributionInfoService service = new ContributionInfoService();
            ContributionInfoQuery   cQuery  = new ContributionInfoQuery();

            cQuery.JournalID = query.JournalID;
            var dict = service.ContributionInfoBusProvider.GetContributionAuthorDict(cQuery);

            //foreach (var mode in list)
            //{
            //    //mode.EditAuthorName = dict.GetValue(mode.EditAuthorID, mode.EditAuthorID.ToString());
            //    mode.FirstAuthor = dict.GetValue(mode.FirstAuthorID, mode.FirstAuthorID.ToString());

            //}

            pager.ItemList = list;
            return(pager);
        }
コード例 #4
0
        /// <summary>
        /// 获取稿费统计一览表分页数据
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Pager <FinanceAccountEntity> GetFinanceGaoFeePageList(ContributionInfoQuery query)
        {
            Pager <FinanceAccountEntity> pager = FinanceContributeBusProvider.GetFinanceGaoFeePageList(query);

            if (pager == null)
            {
                return(pager);
            }
            IList <FinanceAccountEntity> list = pager.ItemList;

            if (list == null || list.Count == 0)
            {
                return(pager);
            }
            ContributionInfoService service = new ContributionInfoService();
            ContributionInfoQuery   cQuery  = new ContributionInfoQuery();

            cQuery.JournalID = query.JournalID;
            var dict = service.ContributionInfoBusProvider.GetContributionAuthorDict(cQuery);

            pager.ItemList = list;
            return(pager);
        }
コード例 #5
0
        /// <summary>
        /// 提交审稿单
        /// </summary>
        /// <param name="auditBillEntity"></param>
        /// <returns></returns>
        public bool SubmitAuditBill(AuditBillEntity auditBillEntity)
        {
            bool flag = false;

            // 得到审稿操作信息
            FlowActionQuery actionQuery = new FlowActionQuery();
            actionQuery.ActionID = auditBillEntity.ActionID;
            actionQuery.JournalID = auditBillEntity.JournalID;
            FlowActionEntity actionEntity = new FlowActionService().GetFlowActionEntity(actionQuery);

            // 得到审稿状态及配置信息
            FlowStatusQuery flowStatusQuery = new FlowStatusQuery();
            flowStatusQuery.JournalID = auditBillEntity.JournalID;
            flowStatusQuery.StatusID = actionEntity == null ? 0 : actionEntity.StatusID;
            FlowStep flowStep = new FlowStatusService().GetFlowStep(flowStatusQuery);

            //得到稿件信息
            ContributionInfoEntity contributionInfoEntity = new ContributionInfoEntity();
            ContributionInfoQuery query = new ContributionInfoQuery();
            query.JournalID = auditBillEntity.JournalID;
            query.CID = auditBillEntity.CID;
            ContributionInfoService service = new ContributionInfoService();
            contributionInfoEntity=service.GetContributionInfo(query);

            if (contributionInfoEntity.AuthorID == Convert.ToInt64(auditBillEntity.ReveiverList.Split(',')[0]))
            {
                auditBillEntity.ReveiverList = contributionInfoEntity.AuthorID.ToString();
                flag = FlowCirculationBusProvider.ProcessFlowCirulation(auditBillEntity);
            }
            else
                flag = FlowCirculationBusProvider.ProcessFlowCirulation(auditBillEntity);

            if (flag)
            {
                if (flowStep.FlowConfig != null)
                {
                    if (flowStep.FlowConfig.IsEmailRemind)
                    {
                        /// TODO:记录定期发送邮件的任务
                    }

                    if (flowStep.FlowConfig.IsSMSRemind)
                    {
                        /// TODO:记录定期发送短信的任务
                    }
                }
            }
            return flag;
        }
コード例 #6
0
 /// <summary>
 /// 获取稿费统计一览表分页数据
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public Pager<FinanceAccountEntity> GetFinanceGaoFeePageList(ContributionInfoQuery query)
 {
     Pager<FinanceAccountEntity> pager = FinanceContributeBusProvider.GetFinanceGaoFeePageList(query);
     if (pager == null) return pager;
     IList<FinanceAccountEntity> list = pager.ItemList;
     if (list == null || list.Count == 0)
         return pager;
     ContributionInfoService service = new ContributionInfoService();
     ContributionInfoQuery cQuery = new ContributionInfoQuery();
     cQuery.JournalID = query.JournalID;
     var dict = service.ContributionInfoBusProvider.GetContributionAuthorDict(cQuery);
     pager.ItemList = list;
     return pager;
 }
コード例 #7
0
        /// <summary>
        /// 获取财务入款通知分页列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Pager<FinanceAccountEntity> GetFinanceAccountPageList(ContributionInfoQuery query)
        {
            Pager<FinanceAccountEntity> pager = FinanceContributeBusProvider.GetFinanceAccountPageList(query);
            if (pager == null) return pager;
            IList<FinanceAccountEntity> list = pager.ItemList;
            if (list == null || list.Count == 0)
                return pager;

            //AuthorInfoService service = new AuthorInfoService();
            //AuthorInfoQuery aQuery = new AuthorInfoQuery();
            //aQuery.JournalID = query.JournalID;
            //var dict = service.AuthorInfoBusProvider.GetAuthorDict(aQuery);
            //foreach (var mode in list)
            //{
            //    mode.EditAuthorName = dict.GetValue(mode.EditAuthorID, mode.EditAuthorID.ToString());
            //    mode.FirstAuthor = dict.GetValue(mode.FirstAuthorID, mode.FirstAuthorID.ToString());
            //}
            ContributionInfoService service = new ContributionInfoService();
            ContributionInfoQuery cQuery = new ContributionInfoQuery();
            cQuery.JournalID = query.JournalID;
            var dict = service.ContributionInfoBusProvider.GetContributionAuthorDict(cQuery);
            //foreach (var mode in list)
            //{
            //    //mode.EditAuthorName = dict.GetValue(mode.EditAuthorID, mode.EditAuthorID.ToString());
            //    mode.FirstAuthor = dict.GetValue(mode.FirstAuthorID, mode.FirstAuthorID.ToString());

            //}

            pager.ItemList = list;
            return pager;
        }
コード例 #8
0
        /// <summary>
        /// 组装数据
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        private List<MessageRecodeEntity> GetMsgList(List<MessageRecodeEntity> list, MessageRecodeQuery mQuery)
        {
            if (list == null || list.Count == 0)
                return list;
            AuthorInfoService service = new AuthorInfoService();
            AuthorInfoEntity entity = new AuthorInfoEntity();
            AuthorInfoQuery query = new AuthorInfoQuery();
            query.JournalID = mQuery.JournalID;
            var dict = service.AuthorInfoBusProvider.GetAuthorDict(query);

            //获取稿件作者数据字典
            ContributionInfoService cservice = new ContributionInfoService();
            ContributionInfoEntity centity = new ContributionInfoEntity();
            ContributionInfoQuery cquery = new ContributionInfoQuery();
            cquery.JournalID = mQuery.JournalID;
            cquery.CID = (long)mQuery.CID;
            var cdict = cservice.GetContributionAuthorDict(cquery);
            centity = cservice.GetContributionInfo(cquery);

            foreach (var mode in list)
            {
                mode.SendUserName = dict.GetValue(mode.SendUser, mode.SendUser.ToString());
                entity = service.GetAuthorInfo(mode.ReciveUser);
                if(entity!=null)
                    mode.ReciveUserName = dict.GetValue(mode.ReciveUser, mode.ReciveUser.ToString());
                else
                    mode.ReciveUserName = cdict.GetValue(mode.ReciveUser, mode.ReciveUser.ToString());

            }
            return list;
        }