Пример #1
0
 public ActionResult AddFlowStatusAjax(FlowStep flowStepEntity)
 {
     ExecResult exeResult = new ExecResult();
     try
     {
         IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
         FlowStatusEntity statusEntity = null;
         if (flowStepEntity.FlowStatus.CStatus != 0)
         {
             // 判断该状态对应的稿件状态是否存在
             FlowStatusQuery statusQuery = new FlowStatusQuery();
             statusQuery.JournalID = JournalID;
             statusQuery.CStatus = flowStepEntity.FlowStatus.CStatus;
             statusEntity = service.CheckCStatusIsExists(statusQuery);
             if (statusEntity != null)
             {
                 exeResult.result = EnumJsonResult.failure.ToString();
                 exeResult.msg = string.Format("当前选择的稿件状态已经有审稿状态[{0}]匹配,请检查!", statusEntity.StatusName);
                 return Content(JsonConvert.SerializeObject(exeResult));
             }
         }
         flowStepEntity.FlowStatus.JournalID = JournalID;
         flowStepEntity.FlowConfig.JournalID = JournalID;
         exeResult = service.AddFlowStatus(flowStepEntity);
     }
     catch (Exception ex)
     {
         exeResult.result = EnumJsonResult.error.ToString();
         exeResult.msg = "新增审稿状态出现异常:" + ex.Message;
         LogProvider.Instance.Error("新增审稿状态出现异常:" + ex.Message);
     }
     return Content(JsonConvert.SerializeObject(exeResult));
 }
Пример #2
0
 /// <summary>
 /// 根据指定的审稿状态ID,得到审稿状态的基本信息
 /// </summary>
 /// <param name="JournalID"></param>
 /// <param name="StatusID"></param>
 /// <returns></returns>
 public FlowStatusEntity GetFlowStatusInfoByID(FlowStatusQuery query)
 {
     return FlowStatusDataAccess.Instance.GetFlowStatusInfoByID(query);
 }
Пример #3
0
 /// <summary>
 /// 判断审稿状态对应的稿件状态是否存在
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public FlowStatusEntity CheckCStatusIsExists(FlowStatusQuery query)
 {
     return FlowSetBusProvider.CheckCStatusIsExists(query);
 }
Пример #4
0
 /// <summary>
 /// 获取审稿流程状态基本信息及配置信息
 /// </summary>
 /// <param name="flowStatusQuery"></param>
 /// <returns>获取一个实体,如果数据不存在返回Null</returns>
 public FlowStep GetFlowStep(FlowStatusQuery flowStatusQuery)
 {
     return FlowSetBusProvider.GetFlowStep(flowStatusQuery);
 }
Пример #5
0
 /// <summary>
 /// 获取所有符合查询条件的数据
 /// </summary>
 /// <param name="flowStatusQuery">FlowStatusQuery查询实体对象</param>
 /// <returns>List<FlowStatusEntity></returns>
 public List<FlowStatusEntity> GetFlowStatusList(FlowStatusQuery flowStatusQuery)
 {
     return FlowSetBusProvider.GetFlowStatusList(flowStatusQuery);
 }
Пример #6
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;
        }
Пример #7
0
 public ActionResult GetFlowStatusNum()
 {
     JsonExecResult<int> execResult = new JsonExecResult<int>();
     try
     {
         IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
         FlowStatusQuery query = new FlowStatusQuery();
         query.JournalID = JournalID;
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "";
         execResult.ReturnObject = service.GetFlowStatusSortID(query);
     }
     catch (Exception ex)
     {
         execResult.result = EnumJsonResult.error.ToString();
         execResult.msg = "获取审稿状态序号出现异常:" + ex.Message;
         execResult.ReturnObject = 0;
         LogProvider.Instance.Error("获取审稿状态序号出现异常:" + ex.Message);
     }
     return Content(JsonConvert.SerializeObject(execResult));
 }
Пример #8
0
 public ActionResult GetFlowStatusListDataAjax(FlowStatusQuery query)
 {
     JsonExecResult<List<FlowStatusEntity>> execResult = new JsonExecResult<List<FlowStatusEntity>>();
     try
     {
         IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
         query.JournalID = JournalID;
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "";
         execResult.ReturnObject = service.GetFlowStatusList(query);
     }
     catch (Exception ex)
     {
         execResult.result = EnumJsonResult.error.ToString();
         execResult.msg = "获取审稿状态(数据)出现异常:" + ex.Message;
         execResult.ReturnObject = new List<FlowStatusEntity>(0);
         LogProvider.Instance.Error("获取审稿状态(数据)出现异常:" + ex.Message);
     }
     return Content(JsonConvert.SerializeObject(execResult));
 }
Пример #9
0
 public FlowStep GetFlowStepInfo(FlowStatusQuery queryFlowStatus)
 {
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         FlowStep stepEntity = flowStatusService.GetFlowStep(queryFlowStatus);
         return stepEntity;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("获取审稿流程状态信息及配置信息出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
Пример #10
0
 public int GetFlowStatusSortID(FlowStatusQuery queryFlowStatus)
 {
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         int SortID = flowStatusService.GetFlowStatusSortID(queryFlowStatus);
         return SortID;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("获取审稿流程状态序号出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
Пример #11
0
 public List<FlowStatusEntity> GetFlowStatusList(FlowStatusQuery queryFlowStatus)
 {
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         List<FlowStatusEntity> listFlowStatus = flowStatusService.GetFlowStatusList(queryFlowStatus);
         return listFlowStatus;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("获取审稿流程状态列表出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
Пример #12
0
 public FlowStatusEntity GetFlowStatusInfoByID(FlowStatusQuery query)
 {
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         FlowStatusEntity statusEntity = flowStatusService.GetFlowStatusInfoByID(query);
         return statusEntity;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("根据指定的审稿状态ID,得到审稿状态的基本信息出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
Пример #13
0
 public IDictionary<long, string> GetFlowStatusDictStatusName(FlowStatusQuery query)
 {
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         IDictionary<long, string> dictStatusName = flowStatusService.GetFlowStatusDictStatusName(query);
         return dictStatusName;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("获取审稿状态键值对[状态名称]出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
Пример #14
0
 /// <summary>
 /// 获取审稿状态序号
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public int GetFlowStatusSortID(FlowStatusQuery query)
 {
     return FlowStatusDataAccess.Instance.GetFlowStatusSortID(query);
 }
Пример #15
0
 /// <summary>
 /// 获取所有符合查询条件的数据
 /// </summary>
 /// <param name="flowSetQuery">FlowStatusQuery查询实体对象</param>
 /// <returns>List<FlowStatusEntity></returns>
 public List<FlowStatusEntity> GetFlowStatusList(FlowStatusQuery flowStatusQuery)
 {
     return FlowStatusDataAccess.Instance.GetFlowStatusList(flowStatusQuery);
 }
Пример #16
0
        /// <summary>
        /// 修改流程状态
        /// </summary>
        /// <returns></returns>
        public ActionResult EditFlowStatus(long StatusID)
        {
            FlowStep stepEntity = new FlowStep();
            try
            {
                FlowStatusQuery query = new FlowStatusQuery();
                query.JournalID = JournalID;
                query.StatusID = StatusID;
                IFlowFacadeService flowService = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
                stepEntity = flowService.GetFlowStepInfo(query);
            }
            catch (Exception ex)
            {
                LogProvider.Instance.Error("获取指定的审稿状态及配置信息时出现异常:" + ex.Message);
            }

            return View(stepEntity);
        }
Пример #17
0
 public IList<FlowStatusEntity> GetHaveRightFlowStatusForStat(FlowStatusQuery query)
 {
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         IList<FlowStatusEntity> listStatus = flowStatusService.GetHaveRightFlowStatusForStat(query);
         return listStatus;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("获取拥有权限的审稿状态出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
Пример #18
0
 public FlowStatusEntity CheckCStatusIsExists(FlowStatusQuery query)
 {
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         FlowStatusEntity statusEntity = flowStatusService.CheckCStatusIsExists(query);
         return statusEntity;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("判断审稿状态对应的稿件状态是否存在出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
Пример #19
0
 public ActionResult GetFlowStatusListGridAjax(FlowStatusQuery query)
 {
     IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
     query.JournalID = CurAuthor.JournalID;
     List<FlowStatusEntity> listResult = service.GetFlowStatusList(query);
     return Json(new { Rows = listResult });
 }
Пример #20
0
 /// <summary>
 /// 获取指定审稿状态下的审稿操作列表
 /// </summary>
 /// <param name="queryFlowSet"></param>
 /// <returns></returns>
 public List<FlowActionEntity> GetFlowActionList(FlowActionQuery queryFlowAction)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     List<FlowActionEntity> flowActionList = clientHelper.PostAuth<List<FlowActionEntity>, FlowActionQuery>(GetAPIUrl(APIConstant.FLOW_GETFLOWACTIONLIST), queryFlowAction);
     FlowStatusQuery statusQuery = new FlowStatusQuery();
     statusQuery.JournalID = queryFlowAction.JournalID;
     IDictionary<long, string> dictGetFlowStatus = GetFlowStatusDictStatusName(statusQuery);
     string value = "";
     foreach (FlowActionEntity item in flowActionList)
     {
         dictGetFlowStatus.TryGetValue(item.TOStatusID, out value);
         item.StatusName = value;
         value = "";
     }
     return flowActionList;
 }
 /// <summary>
 /// 获取过程稿
 /// </summary>
 private IList<FlowStatusEntity> GetContributionProcessList()
 {
     IList<FlowStatusEntity> list = new List<FlowStatusEntity>();
     IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
     FlowStatusQuery query = new FlowStatusQuery();
     query.JournalID = JournalID;
     query.IsHandled = 2;
     query.CurAuthorID = 0;
     query.RoleID = 0;
     try
     {
         list = service.GetHaveRightFlowStatus(query);
     }
     catch (Exception ex)
     {
         WKT.Log.LogProvider.Instance.Error("获取过程稿导出数据出现异常:" + ex.Message);
     }
     return list;
 }
Пример #22
0
 /// <summary>
 /// 判断审稿状态对应的稿件状态是否存在
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public FlowStatusEntity CheckCStatusIsExists(FlowStatusQuery query)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     FlowStatusEntity statusEntity = clientHelper.PostAuth<FlowStatusEntity, FlowStatusQuery>(GetAPIUrl(APIConstant.FLOW_CHECKCSTATUSISEXISTS), query);
     return statusEntity;
 }
Пример #23
0
 /// <summary>
 /// 根据指定的审稿状态ID,得到审稿状态的基本信息
 /// </summary>
 /// <param name="JournalID"></param>
 /// <param name="StatusID"></param>
 /// <returns></returns>
 public FlowStatusEntity GetFlowStatusInfoByID(FlowStatusQuery query)
 {
     return FlowSetBusProvider.GetFlowStatusInfoByID(query);
 }
Пример #24
0
        public ActionResult GetContributionListAjax(CirculationEntity cirEntity)
        {
            ISiteConfigFacadeService facadeService = ServiceContainer.Instance.Container.Resolve<ISiteConfigFacadeService>();
            DictEntity dicteEntity = facadeService.GetDictModelByKey(new DictQuery() { JournalID = CurAuthor.JournalID, DictKey = "TemplateID" });
            if (dicteEntity != null)
            {
                ISiteConfigFacadeService currentService = ServiceContainer.Instance.Container.Resolve<ISiteConfigFacadeService>();
                IList<DictValueEntity> list = currentService.GetDictValueList(new DictValueQuery() { JournalID = CurAuthor.JournalID, DictKey = dicteEntity.DictKey });
                if (list != null && list.Count > 0)
                {
                    DictValueEntity entity = list.Single<DictValueEntity>();
                    if (entity != null)
                    {
                        cirEntity.TemplateID = entity.ValueID;
                    }
                }
            }

            IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
            cirEntity.JournalID = JournalID;
            cirEntity.CurAuthorID = CurAuthor.AuthorID;
            int pageIndex = TypeParse.ToInt(Request.Params["page"], 1);
            cirEntity.CurrentPage = pageIndex;
            cirEntity.PageSize = TypeParse.ToInt(Request.Params["pagesize"], 10);
            if (Request.Params["sortname"] != null)
            {
                cirEntity.SortName = Request.Params["sortname"].ToString();
                cirEntity.SortOrder = Request.Params["sortorder"].ToString();
            }

            FlowStatusQuery query = new FlowStatusQuery();
            query.JournalID = JournalID;
            query.StatusID = cirEntity.StatusID;
            IFlowFacadeService flowService = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
            FlowStep stepEntity = flowService.GetFlowStepInfo(query);
            if (stepEntity != null)
            {
                FlowStatusEntity statusEntity = stepEntity.FlowStatus;
                if (statusEntity != null && statusEntity.CStatus==888)
                {
                    cirEntity.IsExpertAudited = true;
                }
            }
            Pager<FlowContribution> pager = service.GetFlowContributionList(cirEntity);
            return Json(new { Rows = pager.ItemList, Total = pager.TotalRecords });
        }
Пример #25
0
 /// <summary>
 /// 获取审稿状态序号
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public int GetFlowStatusSortID(FlowStatusQuery query)
 {
     return FlowSetBusProvider.GetFlowStatusSortID(query);
 }
Пример #26
0
 public ActionResult GetFlowStatusStat()
 {
     JsonExecResult<FlowStatusEntity> jsonResult = new JsonExecResult<FlowStatusEntity>();
     IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
     FlowStatusQuery query = new FlowStatusQuery();
     query.JournalID = JournalID;
     query.IsHandled = 2;
     query.CurAuthorID = 0;
     query.RoleID = 0;
     try
     {
         jsonResult.ItemList = service.GetHaveRightFlowStatus(query);
         jsonResult.result = EnumJsonResult.success.ToString();
     }
     catch (Exception ex)
     {
         jsonResult.result = EnumJsonResult.error.ToString();
         jsonResult.msg = "获取稿件状态统计出现异常:" + ex.Message;
     }
     return Json(new { Rows = jsonResult.ItemList, Total = 200 });
 }
Пример #27
0
 /// <summary>
 /// 获取拥有权限的审稿状态(用于统计同一稿件一个状态下送多人时按一个计算)
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IList<FlowStatusEntity> GetHaveRightFlowStatusForStat(FlowStatusQuery query)
 {
     return FlowSetBusProvider.GetHaveRightFlowStatusForStat(query);
 }
Пример #28
0
 public ActionResult GetHaveRightFlowStatus(byte? WorkStatus)
 {
     JsonExecResult<FlowStatusEntity> jsonResult = new JsonExecResult<FlowStatusEntity>();
     IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
     FlowStatusQuery query = new FlowStatusQuery();
     query.JournalID = JournalID;
     query.CurAuthorID = CurAuthor.AuthorID;
     query.RoleID = CurAuthor.RoleID == null ? 0 : CurAuthor.RoleID.Value;
     query.IsHandled = WorkStatus == null ? (byte)2 : WorkStatus.Value;
     try
     {
         jsonResult.ItemList = service.GetHaveRightFlowStatus(query);
         if (jsonResult.ItemList != null)
         {
             jsonResult.ItemList = jsonResult.ItemList.Where(p => p.ContributionCount > 0).ToList<FlowStatusEntity>();
         }
         jsonResult.result = EnumJsonResult.success.ToString();
     }
     catch (Exception ex)
     {
         jsonResult.result = EnumJsonResult.error.ToString();
         jsonResult.msg = "获取当前人可以处理的稿件状态出现异常:" + ex.Message;
     }
     return Json(jsonResult);
 }
Пример #29
0
 /// <summary>
 /// 获取审稿状态键值对,审稿状态显示名称
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IDictionary<long, string> GetFlowStatusDictDisplayName(FlowStatusQuery query)
 {
     return FlowSetBusProvider.GetFlowStatusDictDisplayName(query);
 }
Пример #30
0
 /// <summary>
 /// 获取审稿状态键值对,审稿状态名称
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public IDictionary<long, string> GetFlowStatusDictStatusName(FlowStatusQuery query)
 {
     return FlowStatusDataAccess.Instance.GetFlowStatusDictStatusName(query);
 }