/// <summary>
 /// 根据当前所处环节获取稿件列表
 /// </summary>
 /// <param name="cirEntity"></param>
 /// <returns></returns>
 public List<FlowContribution> GetContributionMoreStatusList(FlowLogInfoQuery query)
 {
     return FlowCirculationDataAccess.Instance.GetContributionMoreStatusList(query);
 }
 /// <summary>
 /// 查看该稿件是否存在多个状态
 /// </summary>
 /// <param name="flowLogQuery">流程日志ID</param>
 /// <returns></returns>
 public long JudgeIsMoreStatus(FlowLogInfoQuery flowLogQuery)
 {
     return FlowCirculationDataAccess.Instance.JudgeIsMoreStatus(flowLogQuery);
 }
 /// <summary>
 /// 合并多状态
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public bool MergeMoreStatus(FlowLogInfoQuery query)
 {
     return FlowCirculationDataAccess.Instance.MergeMoreStatus(query);
 }
 /// <summary>
 /// 合并多状态
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public bool MergeMoreStatus(FlowLogInfoQuery query)
 {
     return FlowCirculationBusProvider.MergeMoreStatus(query);
 }
 /// <summary>
 /// 获取处理日志信息
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public FlowLogInfoEntity GetFlowLogEntity(FlowLogInfoQuery query)
 {
     return FlowCirculationDataAccess.Instance.GetFlowLogEntity(query);
 }
 /// <summary>
 /// 获取处理日志信息
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public FlowLogInfoEntity GetFlowLogEntity(FlowLogInfoQuery query)
 {
     return FlowCirculationBusProvider.GetFlowLogEntity(query);
 }
 /// <summary>
 /// 查看该稿件是否存在多个状态
 /// </summary>
 /// <param name="flowLogQuery">流程日志ID</param>
 /// <returns></returns>
 public long JudgeIsMoreStatus(FlowLogInfoQuery flowLogQuery)
 {
     return FlowCirculationBusProvider.JudgeIsMoreStatus(flowLogQuery);
 }
        public ActionResult MergeStatusAjax(FlowLogInfoQuery flowLogQuery)
        {
            ExecResult execResult = new ExecResult();

            try
            {
                flowLogQuery.JournalID = JournalID;
                IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
                execResult = service.MergeMoreStatus(flowLogQuery);
            }
            catch (Exception ex)
            {
                execResult.result = EnumJsonResult.error.ToString();
                execResult.msg = "稿件状态合并出现异常:" + ex.Message;
                WKT.Log.LogProvider.Instance.Error("稿件状态合并出现异常:" + ex.Message);
            }

            return Content(JsonConvert.SerializeObject(execResult));
        }
 /// <summary>
 /// 根据当前所处环节获取稿件列表
 /// </summary>
 /// <param name="cirEntity"></param>
 /// <returns></returns>
 public List<FlowContribution> GetContributionMoreStatusList(FlowLogInfoQuery query)
 {
     return FlowCirculationBusProvider.GetContributionMoreStatusList(query);
 }
 public ActionResult GetContributionFlowStatusListAjax(FlowLogInfoQuery query)
 {
     IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
     query.JournalID = JournalID;
     List<FlowContribution> listResult = service.GetContributionMoreStatusList(query);
     return Json(new { Rows = listResult });
 }
        public ActionResult JudgeIsMoreStatusAjax(FlowLogInfoQuery flowLogQuery)
        {
            ExecResult execResult = new ExecResult();

            try
            {
                flowLogQuery.JournalID = JournalID;
                IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
                long flag = service.JudgeIsMoreStatus(flowLogQuery);
                if (flag > 0)
                {
                    execResult.result = EnumJsonResult.success.ToString();
                }
                else
                {
                    execResult.result = EnumJsonResult.failure.ToString();
                    execResult.msg = "该稿件是单一状态,不用合并";
                }
            }
            catch (Exception ex)
            {
                execResult.result = EnumJsonResult.error.ToString();
                execResult.msg = "判断稿件多状态出现异常:" + ex.Message;
                WKT.Log.LogProvider.Instance.Error("判断稿件多状态出现异常:" + ex.Message);
            }

            return Content(JsonConvert.SerializeObject(execResult));
        }
 /// <summary>
 /// 根据当前所处环节获取稿件列表
 /// </summary>
 /// <param name="cirEntity"></param>
 /// <returns></returns>
 public List<FlowContribution> GetContributionMoreStatusList(FlowLogInfoQuery query)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     List<FlowContribution> execResult = clientHelper.PostAuth<List<FlowContribution>, FlowLogInfoQuery>(GetAPIUrl(APIConstant.FLOW_GETCONTRIBTIONMORESTATUSLIST), query);
     if (execResult != null)
     {
         foreach (FlowContribution item in execResult)
         {
             if (item.RecUserID > 0)
             {
                 item.RecUserName = GetMemberName(item.RecUserID);
             }
         }
     }
     return execResult;
 }
 public FlowLogInfoEntity GetFlowLogEntity(FlowLogInfoQuery query)
 {
     try
     {
         IFlowCirculationService flowCirculationService = ServiceContainer.Instance.Container.Resolve<IFlowCirculationService>();
         FlowLogInfoEntity flowlogEntity = flowCirculationService.GetFlowLogEntity(query);
         return flowlogEntity;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("获取指定的处理日志信息出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }
 public List<FlowContribution> GetContributionMoreStatusList(FlowLogInfoQuery query)
 {
     IFlowCirculationService service = ServiceContainer.Instance.Container.Resolve<IFlowCirculationService>();
     List<FlowContribution> list = service.GetContributionMoreStatusList(query);
     return list;
 }
 public ExecResult MergeMoreStatus(FlowLogInfoQuery query)
 {
     ExecResult result = new ExecResult();
     try
     {
         IFlowCirculationService flowCirService = ServiceContainer.Instance.Container.Resolve<IFlowCirculationService>();
         bool flag = flowCirService.MergeMoreStatus(query);
         if (flag)
         {
             result.result = EnumJsonResult.success.ToString();
             result.msg = "成功";
         }
         else
         {
             result.result = EnumJsonResult.failure.ToString();
             result.msg = "合并稿件多状态失败,请确认信息是否正确";
         }
     }
     catch (Exception ex)
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "合并稿件多状态出现异常:" + ex.Message;
     }
     return result;
 }
 public long JudgeIsMoreStatus(FlowLogInfoQuery flowLogQuery)
 {
     IFlowCirculationService service = ServiceContainer.Instance.Container.Resolve<IFlowCirculationService>();
     return service.JudgeIsMoreStatus(flowLogQuery);
 }