예제 #1
0
        public IActionResult UserSort()
        {
            string orgId = Request.Querys("orgparentid");

            Business.Organize organize = new Business.Organize();
            Business.User     user     = new Business.User();
            var users = organize.GetAllUsers(orgId.ToGuid());

            ViewData["queryString"] = Request.UrlQuery();
            ViewData["refreshId"]   = orgId;
            return(View(users));
        }
예제 #2
0
        public string SaveGoTo()
        {
            string taskid = Request.Querys("taskid");
            string steps  = Request.Forms("step");

            if (!taskid.IsGuid(out Guid taskId))
            {
                return("任务ID错误!");
            }
            Business.FlowTask flowTask = new Business.FlowTask();
            var taskModel = flowTask.Get(taskId);

            if (null == taskModel)
            {
                return("未找到当前任务!");
            }
            Dictionary <Guid, List <Model.User> > dicts = new Dictionary <Guid, List <Model.User> >();

            Business.Organize organize = new Business.Organize();
            foreach (string step in steps.Split(','))
            {
                if (!step.IsGuid(out Guid stepId))
                {
                    continue;
                }
                string member = Request.Forms("member_" + step);
                if (member.IsNullOrWhiteSpace())
                {
                    continue;
                }
                dicts.Add(stepId, organize.GetAllUsers(member));
            }
            string msg = new Business.FlowTask().GoTo(taskModel, dicts);

            Business.Log.Add("跳转了任务-" + taskModel.Title, taskModel.ToString() + "-" + msg, Business.Log.Type.流程运行, others: Newtonsoft.Json.JsonConvert.SerializeObject(dicts));
            return("1".Equals(msg) ? "跳转成功!" : msg);
        }