/// <summary>
 /// 获取审稿单列表
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IList<ReviewBillContentEntity> GetReviewBillContentList(ReviewBillContentQuery query)
 {
     string strSql = @"SELECT a.*,b.Title,b.ItemType,b.PItemID,b.SortID FROM dbo.ReviewBillContent a with(nolock)
                       INNER JOIN dbo.ReviewBill b with(nolock) ON a.JournalID=b.JournalID and a.ItemID=b.ItemID"
         , where = GetReviewBillContentFilter(query);
     if (!string.IsNullOrWhiteSpace(where))
         strSql += " WHERE " + where;
     return db.GetList<ReviewBillContentEntity>(strSql, MakeReviewBillContentList);
 }
 /// <summary>
 /// 获取查询条件
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 private string GetReviewBillContentFilter(ReviewBillContentQuery query)
 {
     StringBuilder strFilter = new StringBuilder(" a.JournalID = " + query.JournalID);
     if (query.AddUser != null)
         strFilter.Append(" and a.AddUser="******" and a.CID=").Append(query.CID.Value);
     return strFilter.ToString();
 }
 /// <summary>
 /// 根据稿件编号获取审稿单信息
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IList<ReviewBillContentEntity> GetReviewBillContentListByCID(ReviewBillContentQuery query)
 {
     var list = GetReviewBillContentList(query);
     if (list == null || list.Count == 0)
     {
         ReviewBillService service = new ReviewBillService();
         var billList = service.GetReviewBillList(new ReviewBillQuery() { JournalID = query.JournalID });
         ReviewBillContentEntity model = null;
         foreach (var item in billList)
         {
             model = new ReviewBillContentEntity();
             model.ItemContentID = 0;
             model.JournalID = query.JournalID;
             model.CID = query.CID.Value;
             model.ItemID = item.ItemID;
             model.ContentValue = string.Empty;
             model.IsChecked = false;
             model.AddUser = query.AddUser.Value;
             model.AddDate = item.AddDate;
             model.Title = item.Title;
             model.ItemType = item.ItemType;
             model.PItemID = item.PItemID;
             model.SortID = item.SortID;
             list.Add(model);
         }
     }
     return list;
 }
예제 #4
0
        public ActionResult SaveReviewBillContent(ReviewBillContentQuery query)
        {
            IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
            query.JournalID = CurAuthor.JournalID;
            query.AddUser = query.AddUser== 0 ? CurAuthor.AuthorID : query.AddUser;

            if (query.IsEnExpert == true)
            {
                //获取专家的审稿流程日志
                CirculationEntity ce = new CirculationEntity
                {
                    CID = (long)query.CID,
                    JournalID = CurAuthor.JournalID,
                    GroupID = 4
                };
                IList<FlowLogInfoEntity> flowLogList = service.GetFlowLog(ce);
                if (flowLogList.Count > 1)
                {
                    for (int i = 0; i < flowLogList.Count; i++)
                    {
                        if (CurAuthor.AuthorID == flowLogList[i].SendUserID && flowLogList[i].SendRoleID == 4 && flowLogList[i].Status == 1 && flowLogList[i].ActionType != 4)
                        {
                            query.IsReReview = true;
                            break;
                        }
                    }
                }
            }
            else
            {
                //获取专家的审稿流程日志
                CirculationEntity ce = new CirculationEntity
                {
                    CID = (long)query.CID,
                    JournalID = CurAuthor.JournalID,
                    GroupID = 3
                };
                IList<FlowLogInfoEntity> flowLogList = service.GetFlowLog(ce);
                if (flowLogList.Count > 1)
                {
                    for (int i = 0; i < flowLogList.Count; i++)
                    {
                        if (CurAuthor.AuthorID == flowLogList[i].SendUserID && flowLogList[i].SendRoleID == 3 && flowLogList[i].Status == 1 && flowLogList[i].ActionType != 4)
                        {
                            query.IsReReview = true;
                            break;
                        }
                    }
                }
            }

            ExecResult result = service.SaveReviewBillContent(query);
            return Json(new { result = result.result, msg = result.msg });
        }
 /// <summary>
 /// 获取审稿单列表
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IList<ReviewBillContentEntity> GetReviewBillContentList(ReviewBillContentQuery query)
 {
     return ReviewBillContentBusProvider.GetReviewBillContentList(query);
 }
        /// <summary>
        /// 保存审稿单
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public ExecResult SaveReviewBillContent(ReviewBillContentQuery query)
        {
            ExecResult execResult = new ExecResult();
            List<ReviewBillContentEntity> list = new List<ReviewBillContentEntity>();
             bool result = true;
             if (query.list!=null && query.list.Count > 0)
             {
                 list = query.list.ToList();
                 if (list == null || list.Count == 0)
                 {
                     execResult.result = EnumJsonResult.failure.ToString();
                     execResult.msg = "没有需要保存的数据!";
                 }
                 foreach (var item in list)
                 {
                     item.JournalID = query.JournalID;
                     item.AddUser = query.AddUser.Value;
                 }

                 ReviewBillService service = new ReviewBillService();
                 var billList = service.GetReviewBillList(new ReviewBillQuery() { JournalID = query.JournalID, PItemID = 0 });
                 ReviewBillContentEntity model = null;
                 foreach (var item in billList)
                 {
                     if (list.Find(p => p.ItemID == item.ItemID) != null)
                         continue;
                     model = new ReviewBillContentEntity();
                     model.ItemContentID = 0;
                     model.JournalID = query.JournalID;
                     model.AddUser = query.AddUser.Value;
                     model.CID = list[0].CID;
                     model.ItemID = item.ItemID;
                     model.ContentValue = string.Empty;
                     model.IsChecked = false;
                     list.Add(model);
                 }
                 result = ReviewBillContentBusProvider.SaveReviewBillContent(list);
             }
            if (result)
            {
                FlowCirculationBusiness business = new FlowCirculationBusiness();
                CirculationEntity item = new CirculationEntity();
                item.CID = query.CID == null ? 0 : query.CID.Value;
                item.AuthorID = query.AddUser.Value;
                item.JournalID = query.JournalID;
                if (query.IsEnExpert == true)
                {
                    if (query.IsReReview == true)
                        item.EnumCStatus = EnumContributionStatus.ReAuditedEn;
                    else
                        item.EnumCStatus = EnumContributionStatus.AuditedEn;
                }
                else
                {
                    if (query.IsReReview == true)
                        item.EnumCStatus = EnumContributionStatus.ReAudited;
                    else
                        item.EnumCStatus = EnumContributionStatus.Audited;
                }

                item.DealAdvice = WKT.Common.Security.SecurityUtils.SafeSqlString(query.DealAdvice);
                item.CPath = query.PathUrl;
                item.CFileName = query.CFileName;
                item.OtherPath = query.OtherPath;
                item.FigurePath = query.figurePath;
                item.FFileName = query.FFileName;
                item.IsHaveBill = 1;

                //专家审回到固定编辑设置
                DictValueBusiness siteConfigBusiness = new DictValueBusiness();
                DictValueQuery DictQuery = new DictValueQuery();
                IDictionary<int, string> dict = siteConfigBusiness.GetDictValueDcit(query.JournalID, "ExpertToEditor");
                if (dict != null && dict.Count > 0)
                {
                    foreach (var dictItem in dict)
                    {
                        item.IsExpertToEditor = true;
                        item.RecUserID = Convert.ToInt64(dictItem.Value);
                    }

                }

                if (business.AuthorContribution(item))
                {
                    execResult.result = EnumJsonResult.success.ToString();
                    execResult.msg = "保存审稿单成功!";
                }
                else
                {
                    execResult.result = EnumJsonResult.success.ToString();
                    execResult.msg = "保存审核信息失败!";
                }
            }
            else
            {
                execResult.result = EnumJsonResult.failure.ToString();
                execResult.msg = "保存审稿单失败!";
            }
            return execResult;
        }
예제 #7
0
 public IList<ReviewBillContentEntity> GetReviewBillContentListByCID(ReviewBillContentQuery query)
 {
     IReviewBillContentService service = ServiceContainer.Instance.Container.Resolve<IReviewBillContentService>();
     IList<ReviewBillContentEntity> list = service.GetReviewBillContentListByCID(query);
     return list;
 }
예제 #8
0
 public ExecResult SaveReviewBillContent(ReviewBillContentQuery query)
 {
     IReviewBillContentService service = ServiceContainer.Instance.Container.Resolve<IReviewBillContentService>();
     return service.SaveReviewBillContent(query);
 }
 /// <summary>
 /// 获取审稿单列表
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IList<ReviewBillContentEntity> GetReviewBillContentList(ReviewBillContentQuery query)
 {
     return ReviewBillContentDataAccess.Instance.GetReviewBillContentList(query);
 }