Ejemplo n.º 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);
        }
Ejemplo n.º 2
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;
        }