public JsonResult QuanShiExecuteTask(ReceiveModel mode)
        {
            OANewsChangeRequestModel startu = new OANewsChangeRequestModel();
            try
            {
                startu.status = 1;
                string data = JsonConvert.SerializeObject(mode);
                logger.Info("QuanShiExecuteTask请求,请求信息:" + data);
                if (mode.SharedUser == "null")
                {
                    mode.SharedUser = "";
                }
                client.ExecuteAction(System.Web.HttpUtility.UrlDecode(mode.Destination), mode.SN, System.Web.HttpUtility.UrlDecode(mode.ActionName), false, mode.SharedUser);
                TaskPush.QuanShiPushChange(mode.ProcInstID, startu.status, logger);
                logger.Info("QuanShiExecuteTask请求成功,审批成功,请求信息:" + data);
                return Json(startu, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("24411"))
                {
                    if (ex.Message.Contains("is not allowed to open the worklist item"))
                    {
                        startu.status = 9;
                        TaskPush.QuanShiPushChange(mode.ProcInstID, startu.status, logger);
                        logger.Error("ExecuteTask请求失败,任务已经被处理!");

                        return Json(startu, JsonRequestBehavior.AllowGet);
                    }
                }
                logger.Error("ExecuteTask请求失败,在执行过程中出现异常", ex);
                startu.status = 12;
                TaskPush.QuanShiPushChange(mode.ProcInstID, startu.status, logger);
                return Json(startu, JsonRequestBehavior.AllowGet);
            }
        }
 public JsonResult GetTaskInfo(ReceiveModel mode)
 {
     DataModel dataModel = new DataModel();
     try
     {
         //System.Threading.Thread.Sleep(2000);
         logger.Info("GetTaskInfo请求,请求信息:" + JsonConvert.SerializeObject(mode));
         dataModel.status = RequestStatus.Success;
         dataModel.message = "";
         //int totalCount = 0;
         dataModel.data = client.OpenWorklistItem(mode.Destination, mode.SN, mode.SharedUser);//_tasks.Where(t => t.Folio == id).FirstOrDefault();
         logger.Info("GetTaskInfo请求成功,返回信息:" + JsonConvert.SerializeObject(dataModel));
         return Json(dataModel, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         dataModel.status = RequestStatus.Error;
         dataModel.message = "在获取任务信息时程序出现异常,错误的信息:" + ex.Message +
           System.Environment.NewLine + "错误详细信息:" + ex.StackTrace;
         dataModel.data = new List<string>();
         logger.Error("GetTaskInfo请求失败,在执行过程中出现异常", ex);
         return Json(dataModel, JsonRequestBehavior.AllowGet);
     }
 }
 public JsonResult ExecuteTask(ReceiveModel mode)
 {
     DataModel dataModel = new DataModel();
     try
     {
         //System.Threading.Thread.Sleep(2000);
         string data = JsonConvert.SerializeObject(mode);
         logger.Info("ExecuteTask请求,请求信息:" + data);
         client.ExecuteAction(mode.Destination, mode.SN, mode.ActionName, false, mode.SharedUser);
         dataModel.status = RequestStatus.Success;
         dataModel.message = "";
         dataModel.data = new List<string>();//_tasks.Where(t => t.Folio == id).FirstOrDefault();
         logger.Info("ExecuteTask请求成功,审批成功,请求信息:" + data);
         return Json(dataModel, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         dataModel.status = RequestStatus.Error;
         dataModel.message = "在审批任务时程序出现异常,错误的信息:" + ex.Message +
           System.Environment.NewLine + "错误详细信息:" + ex.StackTrace;
         dataModel.data = new List<string>();
         logger.Error("ExecuteTask请求失败,在执行过程中出现异常", ex);
         return Json(dataModel, JsonRequestBehavior.AllowGet);
     }
 }