/// <summary>
 /// 编辑稿件表信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateContributionInfo(ContributionInfoEntity model)
 {
     return ContributionInfoDataAccess.Instance.UpdateContributionInfo(model);
 }
        /// <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;
        }
 /// <summary>
 /// 保存稿件格式修改
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool SaveFormat(ContributionInfoEntity model)
 {
     return ContributionInfoDataAccess.Instance.SaveFormat(model);
 }
 /// <summary>
 /// 保存稿件格式修改
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ExecResult SaveFormat(ContributionInfoEntity model)
 {
     ExecResult result = new ExecResult();
     bool flag = ContributionInfoBusProvider.SaveFormat(model);
     if (flag)
     {
         result.result = EnumJsonResult.success.ToString();
         result.msg = "修改稿件格式成功!";
     }
     else
     {
         result.result = EnumJsonResult.failure.ToString();
         result.msg = "修改稿件格式失败!";
     }
     return result;
 }
Example #5
0
        /// <summary>
        /// 获取审稿单内容
        /// </summary>
        /// <param name="CID"></param>
        /// <param name="ExpertID"></param>
        /// <returns></returns>
        private string GetReviewBillContent(Int64 CID, Int64 EditorID, Int64 ExpertID, Int64 FlowLogID)
        {
            StringBuilder strHtml = new StringBuilder();
            strHtml.AppendFormat(" <div style=\"text-align: center; font-family: 黑体; font-size: 16px; padding-bottom: 15px;\">《{0}》 审稿单</div>",
                SiteConfig.SiteName);

            #region 获取稿件信息
            ContributionInfoQuery query = new ContributionInfoQuery();
            query.JournalID = CurAuthor.JournalID;
            query.IsAuxiliary = false;
            query.CID = CID;
            IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
            var CModel = service.GetContributionInfoModel(query);
            if (CModel == null)
                CModel = new ContributionInfoEntity();
            #endregion

            #region 获取作者信息
            AuthorDetailQuery query1 = new AuthorDetailQuery();
            query1.JournalID = CurAuthor.JournalID;
            query1.AuthorIDs = new Int64[] { CModel.AuthorID, ExpertID };
            var listAuthor = service.GetAuthorDetailList(query1).ToList();
            var AModel = listAuthor.Find(p => p.AuthorID == CModel.AuthorID);
            var EModel = listAuthor.Find(p => p.AuthorID == ExpertID);
            if (AModel == null)
                AModel = new AuthorDetailEntity();
            if (EModel == null)
                EModel = new AuthorDetailEntity();

            ISiteConfigFacadeService service1 = ServiceContainer.Instance.Container.Resolve<ISiteConfigFacadeService>();
            DictValueQuery query2 = new DictValueQuery();
            query2.JournalID = SiteConfig.SiteID;
            query2.DictKey = EnumDictKey.JobTitle.ToString();
            IDictionary<int, string> dict = service1.GetDictValueDcit(query2);
            string jobTitle = dict.ContainsKey(EModel.JobTitle) ? dict[EModel.JobTitle] : string.Empty;
            #endregion

            #region 获取审稿日志
            IFlowFacadeService flowService = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
            CirculationEntity cirEntity = new CirculationEntity();
            cirEntity.CID = CID;
            cirEntity.JournalID = JournalID;
            cirEntity.GroupID = 1;
            IList<FlowLogInfoEntity> flowLogList = flowService.GetFlowLog(cirEntity);

            FlowLogInfoEntity LogSendModel = flowLogList.ToList().Find(p => p.FlowLogID == FlowLogID);

            //var LogModel = flowLogList.ToList().Where(p => p.SendUserID == ExpertID).FirstOrDefault(q => q.TargetStatusID == LogSendModel.TargetStatusID);
            var LogModel = flowLogList.ToList().Find(p => p.SendUserID == EditorID);
            if (LogModel == null)
                LogModel = new FlowLogInfoEntity();
            if (LogSendModel == null)
                LogSendModel = new FlowLogInfoEntity();
            #endregion

            strHtml.Append(flowService.GetReviewBillContentHead(CurAuthor.JournalID, ExpertID, CID));
            strHtml.AppendFormat("<div style=\"padding: 0px 0px 5px 0px; font-size: 11pt; font-family: Times New Roman;\">稿件编号:{0}</div>"
                , CModel.CNumber);
            strHtml.Append("<table border=\"0\" class=\"mainTable\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">");
            strHtml.AppendFormat("<tr><td class=\"left\">稿件标题:</td><td class=\"right\" style=\"font-weight: bolder;\" colspan=\"3\">{0}</td></tr>"
                , CModel.Title);

            strHtml.AppendFormat("<tr><td class=\"left\">送审日期:</td><td class=\"right\">{0}</td><td class=\"left_m\">审毕日期:</td><td class=\"right\">{1}</td></tr>"
                , LogModel.AddDate, LogModel.DealDate);
            strHtml.AppendFormat("<tr><td class=\"left\">作者姓名:</td><td class=\"right\">{0}</td><td class=\"left_m\">单位:</td><td class=\"right\">{1}</td></tr>"
                , AModel.AuthorName, AModel.WorkUnit);
            strHtml.AppendFormat("<tr><td class=\"left\" style=\"width: 80px;\">对本稿的总评价:</td><td class=\"right\" style=\"padding: 5px 0px 10px 5px;\" colspan=\"3\">");
            IFlowFacadeService service2 = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
            strHtml.Append(service2.GetReviewBillContentStr(CurAuthor.JournalID, ExpertID, CID));
            strHtml.Append("</td></tr>");
            strHtml.Append("<tr><td class=\"left\" style=\"width: 80px;\">审稿意见:</td><td class=\"right\" style=\"padding: 5px 0px 10px 5px;\" colspan=\"3\">");
            strHtml.Append(LogSendModel.DealAdvice);
            strHtml.Append("</td></tr>");

            strHtml.AppendFormat("<tr><td class=\"left\">审稿人姓名:</td><td class=\"right\">{0}</td><td class=\"left_m\">身份证号:</td><td class=\"right\">{1}</td></tr>"
              , EModel.AuthorName, EModel.IDCard);
            strHtml.AppendFormat("<tr><td class=\"left\">联系电话:</td><td class=\"right\">{0}</td><td class=\"left_m\">Email:</td><td class=\"right\">{1}</td></tr>"
                , EModel.Mobile, EModel.AuthorModel.LoginName);
            strHtml.AppendFormat("<tr><td class=\"left\">通讯地址:</td><td class=\"right\">{0}</td><td class=\"left_m\">邮政编码:</td><td class=\"right\">{1}</td></tr>"
               , EModel.Address, EModel.ZipCode);
            strHtml.AppendFormat("<tr><td class=\"left\">研究方向:</td><td class=\"right\">{0}</td><td class=\"left_m\">职称:</td><td class=\"right\">{1}</td></tr>"
            , EModel.ResearchTopics, jobTitle);
            strHtml.Append("</table>");
            return strHtml.ToString();
        }
        /// <summary>
        /// 投稿
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Int64 AuthorPlatform(ContributionInfoEntity model)
        {
            using (DbConnection conn = db.CreateConnection())
            {
                if (conn.State != ConnectionState.Open)
                    conn.Open();
                DbTransaction trans = conn.BeginTransaction();
                try
                {
                    if (model.CID == 0)//投稿
                    {
                        //稿件信息
                        Int64 CID = AddContributionInfo(model, trans);

                        if (CID == 0)
                            throw new Exception();

                        model.CID = CID;

                        //稿件作者
                        if (model.AuthorList != null && model.AuthorList.Count > 0)
                        {
                            foreach (var item in model.AuthorList)
                            {
                                item.JouranalID = model.JournalID;
                                item.CID = CID;
                                item.AuthorID = model.AuthorID;
                                AddContributionAuthor(item, trans);
                            }
                        }

                        //参考文献
                        if (model.ReferenceList != null && model.ReferenceList.Count > 0)
                        {
                            foreach (var item in model.ReferenceList)
                            {
                                item.JournalID = model.JournalID;
                                item.CID = CID;
                                AddContributionReference(item, trans);
                            }
                        }

                        //基金信息
                        if (model.FundList != null && model.FundList.Count > 0)
                        {
                            foreach (var item in model.FundList)
                            {
                                item.JournalID = model.JournalID;
                                item.CID = CID;
                                AddContributionFund(item, trans);
                            }
                        }

                        //大字段信息
                        if (model.AttModel == null)
                            model.AttModel = new ContributionInfoAttEntity();
                        var attModel = model.AttModel;
                        attModel.JournalID = model.JournalID;
                        attModel.CID = CID;
                        AddContributionInfoAtt(attModel, trans);
                    }
                    else  //编辑
                    {
                        UpdateContributionInfo(model, trans);

                        Int64[] CID = new Int64[] { model.CID };

                        //稿件作者
                        Int64[] CAuthorIDs = null;
                        if (model.AuthorList != null && model.AuthorList.Count > 0)
                        {
                            CAuthorIDs = model.AuthorList.Where(p => p.CAuthorID > 0).Select(p => p.CAuthorID).ToArray();
                        }
                        DelContributionAuthorByCID(CID, trans, CAuthorIDs);
                        if (model.AuthorList != null && model.AuthorList.Count > 0)
                        {
                            foreach (var item in model.AuthorList)
                            {
                                if (item.CAuthorID > 0)
                                {
                                    UpdateContributionAuthor(item, trans);
                                }
                                else
                                {
                                    item.JouranalID = model.JournalID;
                                    item.CID = model.CID;
                                    item.AuthorID = model.AuthorID;
                                    AddContributionAuthor(item, trans);
                                }
                            }
                        }

                        //参考文献
                        Int64[] ReferenceIDs = null;
                        if (model.ReferenceList != null && model.ReferenceList.Count > 0)
                        {
                            ReferenceIDs = model.ReferenceList.Where(p => p.ReferenceID > 0).Select(p => p.ReferenceID).ToArray();
                        }
                        DelContributionReferenceByCID(CID, trans, ReferenceIDs);
                        if (model.ReferenceList != null && model.ReferenceList.Count > 0)
                        {
                            foreach (var item in model.ReferenceList)
                            {
                                if (item.ReferenceID > 0)
                                {
                                    UpdateContributionReference(item, trans);
                                }
                                else
                                {
                                    item.JournalID = model.JournalID;
                                    item.CID = model.CID;
                                    AddContributionReference(item, trans);
                                }
                            }
                        }

                        //基金信息
                        Int64[] FundIDs = null;
                        if (model.FundList != null && model.FundList.Count > 0)
                        {
                            FundIDs = model.FundList.Where(p => p.FundID > 0).Select(p => p.FundID).ToArray();
                        }
                        DelContributionFundByCID(CID, trans, FundIDs);
                        if (model.FundList != null && model.FundList.Count > 0)
                        {
                            foreach (var item in model.FundList)
                            {
                                if (item.FundID > 0)
                                {
                                    UpdateContributionFund(item, trans);
                                }
                                else
                                {
                                    item.JournalID = model.JournalID;
                                    item.CID = model.CID;
                                    AddContributionFund(item, trans);
                                }
                            }
                        }

                        //大字段信息
                        if (model.AttModel == null)
                            model.AttModel = new ContributionInfoAttEntity();
                        var attModel = model.AttModel;
                        attModel.JournalID = model.JournalID;
                        attModel.CID = model.CID;
                        UpdateContributionInfoAtt(attModel, trans);
                    }

                    trans.Commit();
                    conn.Close();
                    return model.CID;
                }
                catch (Exception ex)
                {
                    trans.Rollback();
                    throw ex;
                }
            }
        }
 /// <summary>
 /// 发送消息
 /// </summary>
 /// <returns></returns>
 public ActionResult SendSms(Int32 Status, Int64 CID)
 {
     ViewBag.Status = Status;
     ContributionInfoEntity model = GetModel(CID);
     if (model == null)
     {
         model = new ContributionInfoEntity();
     }
     return View(model);
 }
 public bool Update(ContributionInfoEntity model)
 {
     IContributionInfoService service = ServiceContainer.Instance.Container.Resolve<IContributionInfoService>();
     bool result = service.UpdateContributionInfo(model);
     return result;
 }
        /// <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;
        }
 public ExecResult SaveFormat(ContributionInfoEntity model)
 {
     IContributionInfoService service = ServiceContainer.Instance.Container.Resolve<IContributionInfoService>();
     ExecResult result = service.SaveFormat(model);
     return result;
 }
 public ExecResult Submission(ContributionInfoEntity model)
 {
     IContributionInfoService service = ServiceContainer.Instance.Container.Resolve<IContributionInfoService>();
     ExecResult result = service.AuthorPlatform(model);
     return result;
 }
 /// <summary>
 /// 新增稿件表信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool AddContributionInfo(ContributionInfoEntity model)
 {
     return ContributionInfoBusProvider.AddContributionInfo(model);
 }
 /// <summary>
 /// 审稿相关数据处理
 /// </summary>
 /// <param name="model"></param>
 private void GetFlow(ContributionInfoEntity model,EnumContributionStatus enumStatus)
 {
     FlowCirculationBusiness business = new FlowCirculationBusiness();
     CirculationEntity item = new CirculationEntity();
     item.CID = model.CID;
     item.AuthorID = model.AuthorID;
     item.CNumber = model.CNumber;
     item.JournalID = model.JournalID;
     item.SubjectCategoryID = model.SubjectCat;
     item.EnumCStatus = enumStatus;
     item.CPath = model.ContributePath;
     item.FigurePath = model.FigurePath;
     item.OtherPath = model.IntroLetterPath;
     business.AuthorContribution(item);
 }
 /// <summary>
 /// 编辑稿件表信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateContributionInfo(ContributionInfoEntity model)
 {
     return ContributionInfoBusProvider.UpdateContributionInfo(model);
 }
 /// <summary>
 /// 投稿
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public Int64 AuthorPlatform(ContributionInfoEntity model)
 {
     return ContributionInfoDataAccess.Instance.AuthorPlatform(model);
 }
 public ActionResult SaveFormat(ContributionInfoEntity model)
 {
     IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
     model.JournalID = CurAuthor.JournalID;
     model.AuthorID = CurAuthor.GroupID == 1 ? model.AuthorID : CurAuthor.AuthorID;
     ExecResult result = service.SaveContributionInfoFormat(model);
     return Json(new { result = result.result, msg = result.msg});
 }
 /// <summary>
 /// 新增稿件表信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool AddContributionInfo(ContributionInfoEntity model)
 {
     return AddContributionInfo(model, null) > 0;
 }
        /// <summary>
        /// 投稿
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ExecResult SaveContributionInfo(ContributionInfoEntity model)
        {
            HttpClientHelper clientHelper = new HttpClientHelper();
            ExecResult result = clientHelper.Post<ExecResult, ContributionInfoEntity>(GetAPIUrl(APIConstant.CONTRIBUTIONINFO_SAVE), model);
            if (result.result.Equals(EnumJsonResult.success.ToString()) && model.CID == 0 && model.Status != -1)//新投稿,不是草稿
            {
                #region 投稿回执
                Action action = () =>
                    {
                        try
                        {
                            SiteConfigFacadeAPIService service = new SiteConfigFacadeAPIService();

                            MessageTemplateQuery queryTemp = new MessageTemplateQuery();
                            queryTemp.JournalID = model.JournalID;
                            queryTemp.TCategory = -5;//回执
                            var tempList = service.GetMessageTempList(queryTemp).ToList();
                            if (tempList == null)
                                return;
                            var EmailModel = tempList.Find(p => p.TType == 1);
                            var SmsModel = tempList.Find(p => p.TType == 2);
                            if (EmailModel == null && SmsModel == null)
                                return;

                            MessageRecodeEntity LogModel = new MessageRecodeEntity();
                            LogModel.JournalID = model.JournalID;
                            LogModel.SendType = -5;
                            LogModel.SendUser = model.AuthorID;

                            IDictionary<string, string> dict = service.GetEmailVariable();
                            var user = new AuthorFacadeAPIService().GetAuthorInfo(new AuthorInfoQuery() { JournalID = model.JournalID, AuthorID = model.AuthorID });
                            dict["${接收人}$"] = user.RealName;
                            dict["${邮箱}$"] = user.LoginName;
                            dict["${手机}$"] = user.Mobile;
                            dict["${稿件编号}$"] = result.resultStr;
                            dict["${稿件标题}$"] = model.Title;
                            dict["$稿件主键$"] = result.resultID.ToString();

                            ExecResult execResult = new ExecResult();
                            if (EmailModel != null)
                            {
                                LogModel.MsgType = 1;
                                execResult = service.SendEmailOrSms(new Dictionary<Int64, IDictionary<string, string>>() { { model.AuthorID, dict } }, LogModel);
                            }
                            if (SmsModel != null)
                            {
                                LogModel.MsgType = 2;
                                execResult = service.SendEmailOrSms(new Dictionary<Int64, IDictionary<string, string>>() { { model.AuthorID, dict } }, LogModel);
                            }

                            if (!execResult.result.Equals(EnumJsonResult.success.ToString()))
                                throw new Exception(execResult.msg);
                        }
                        catch (Exception ex)
                        {
                            LogProvider.Instance.Error("发送投稿回执失败,稿件编码【" + result.resultStr + "】:" + ex.ToString());
                        }
                    };
                action.BeginInvoke(null, null);
                #endregion
            }
            return result;
        }
 public ActionResult Save(ContributionInfoEntity model)
 {
     IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
     model.JournalID = CurAuthor.JournalID;
     model.AuthorID =CurAuthor.GroupID==1?model.AuthorID:CurAuthor.AuthorID;
     model.AddDate = string.IsNullOrEmpty(model.CNumber) ? System.DateTime.Now : model.AddDate;
     ExecResult result = service.SaveContributionInfo(model);
     return Json(new { result = result.result, msg = result.msg, CID = result.resultID });
 }
 /// <summary>
 /// 保存稿件格式修改
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ExecResult SaveContributionInfoFormat(ContributionInfoEntity model)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     ExecResult result = clientHelper.Post<ExecResult, ContributionInfoEntity>(GetAPIUrl(APIConstant.CONTRIBUTIONINFO_SAVEFORMAT), model);
     return result;
 }
 private ContributionInfoEntity GetModel2(Int64 CID)
 {
     ContributionInfoEntity model = null;
     if (CID > 0)
     {
         ContributionInfoQuery query = new ContributionInfoQuery();
         query.JournalID = CurAuthor.JournalID;
         query.IsAuxiliary = true;
         query.CID = CID;
         query.isModify = true;
         IAuthorPlatformFacadeService service = ServiceContainer.Instance.Container.Resolve<IAuthorPlatformFacadeService>();
         model = service.GetContributionInfoModel(query);
     }
     if (model == null)
         model = new ContributionInfoEntity();
     IContributionFacadeService serviceSet = ServiceContainer.Instance.Container.Resolve<IContributionFacadeService>();
     model.FieldList = serviceSet.GetFieldsSet().ToList();
     model.ContributeAuthorFieldList = serviceSet.GetContributionAuthorFieldsSet().ToList();
     if (model.FieldList == null)
         model.FieldList = new List<FieldsSet>();
     return model;
 }
 /// <summary>
 /// 投稿
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ExecResult AuthorPlatform(ContributionInfoEntity model)
 {
     ExecResult execResult = new ExecResult();
     if (ContributionTitleIsExists(model.JournalID, model.CID, model.Title))
     {
         execResult.result = EnumJsonResult.error.ToString();
         execResult.msg = "该稿件名称已经存在,请重新填写!";
         execResult.resultID = model.CID;
         return execResult;
     }
     string msg = string.Empty;
     bool isAdd = false;
     if (model.CID == 0)
     {
         if (model.Status == -2)
             msg = "保存稿件信息到格式修改";
         else if (model.Status == -1)
             msg = "保存稿件为草稿";
         else
             msg = "投稿";
         // 只有新投稿时才产生稿件编号
         if (model.Status == 0 && string.IsNullOrEmpty(model.CNumber))
         {
             ContributeSetService service = new ContributeSetService();
             QueryBase query = new QueryBase();
             query.JournalID = model.JournalID;
             model.CNumber = service.GetContributeNumber(query);
         }
         isAdd = true;
     }
     else
     {
         if (model.OldStatus == -3 || model.OldStatus == 100)
             model.Status = 10;
         msg = "编辑稿件信息";
         if (string.IsNullOrEmpty(model.CNumber))
         {
             ContributeSetService service = new ContributeSetService();
             QueryBase query = new QueryBase();
             query.JournalID = model.JournalID;
             model.CNumber = service.GetContributeNumber(query);
         }
     }
     model.CID = ContributionInfoBusProvider.AuthorPlatform(model);
     if (model.CID > 0)
     {
         if (isAdd)
             GetFlow(model, EnumContributionStatus.New);
         else
         {
             if (model.OldStatus == -3)
                 GetFlow(model, EnumContributionStatus.Retreat);
             else if(model.OldStatus==100)
                 GetFlow(model, EnumContributionStatus.Proof);
         }
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = msg + "成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = msg + "失败!";
     }
     execResult.resultID = model.CID;
     execResult.resultStr = model.CNumber;
     return execResult;
 }