示例#1
0
        /// <summary>
        /// 审核流程实例
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response Audit(dynamic _)
        {
            WfParameter wfParameter = this.GetReqData <WfParameter>();

            wfParameter.companyId    = this.userInfo.companyId;
            wfParameter.departmentId = this.userInfo.departmentId;
            wfParameter.userId       = this.userInfo.userId;
            wfParameter.userName     = this.userInfo.realName;

            WfResult res = wfEngineIBLL.Audit(wfParameter);

            return(this.Success <WfResult>(res));
        }
示例#2
0
        /// <summary>
        /// 获取流程审核节点的信息
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response Taskinfo(dynamic _)
        {
            WfParameter wfParameter = this.GetReqData <WfParameter>();

            wfParameter.companyId    = this.userInfo.companyId;
            wfParameter.departmentId = this.userInfo.departmentId;
            wfParameter.userId       = this.userInfo.userId;
            wfParameter.userName     = this.userInfo.realName;

            WfResult <WfContent> res = wfEngineIBLL.GetTaskInfo(wfParameter);

            return(this.Success <WfResult <WfContent> >(res));
        }
示例#3
0
        /// <summary>
        /// 获取下一个节点审核人员信息
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response GetAuditer(dynamic _)
        {
            WfParameter wfParameter = this.GetReqData <WfParameter>();

            wfParameter.companyId    = this.userInfo.companyId;
            wfParameter.departmentId = this.userInfo.departmentId;
            wfParameter.userId       = this.userInfo.userId;
            wfParameter.userName     = this.userInfo.realName;

            WfResult <List <object> > res = wfEngineIBLL.GetAuditer(wfParameter);

            return(this.Success(res));
        }
示例#4
0
        public ActionResult Processinfo(string processId, string taskId)
        {
            WfParameter wfParameter = new WfParameter();
            UserInfo    userInfo    = LoginUserInfo.Get();

            wfParameter.companyId    = userInfo.companyId;
            wfParameter.departmentId = userInfo.departmentId;
            wfParameter.userId       = userInfo.userId;
            wfParameter.userName     = userInfo.realName;
            wfParameter.processId    = processId;
            wfParameter.taskId       = taskId;

            WfResult <WfContent> res = wfEngineIBLL.GetProcessInfo(wfParameter);

            return(Success(res));
        }
示例#5
0
        public ActionResult Bootstraper(bool isNew, string processId, string schemeCode)
        {
            WfParameter wfParameter = new WfParameter();
            UserInfo    userInfo    = LoginUserInfo.Get();

            wfParameter.companyId    = userInfo.companyId;
            wfParameter.departmentId = userInfo.departmentId;
            wfParameter.userId       = userInfo.userId;
            wfParameter.userName     = userInfo.realName;
            wfParameter.isNew        = isNew;
            wfParameter.processId    = processId;
            wfParameter.schemeCode   = schemeCode;

            WfResult <WfContent> res = wfEngineIBLL.Bootstraper(wfParameter);

            return(Success(res));
        }
示例#6
0
        /// <summary>
        /// 审核流程实例
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response Audit(dynamic _)
        {
            WfParameter wfParameter = this.GetReqData <WfParameter>();

            wfParameter.companyId    = this.userInfo.companyId;
            wfParameter.departmentId = this.userInfo.departmentId;
            wfParameter.userId       = this.userInfo.userId;
            wfParameter.userName     = this.userInfo.realName;

            List <FormParam> req = wfParameter.formreq.ToObject <List <FormParam> >();// 获取模板请求数据

            foreach (var item in req)
            {
                formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData);
            }

            WfResult res = wfEngineIBLL.Audit(wfParameter);

            return(this.Success <WfResult>(res));
        }
示例#7
0
        public ActionResult Audit(string taskId, string verifyType, string description, string auditorId, string auditorName, string auditers, string formData)
        {
            WfParameter wfParameter = new WfParameter();
            UserInfo    userInfo    = LoginUserInfo.Get();

            wfParameter.companyId    = userInfo.companyId;
            wfParameter.departmentId = userInfo.departmentId;
            wfParameter.userId       = userInfo.userId;
            wfParameter.userName     = userInfo.realName;

            wfParameter.taskId      = taskId;
            wfParameter.verifyType  = verifyType;
            wfParameter.auditorId   = auditorId;
            wfParameter.auditorName = auditorName;
            wfParameter.description = description;
            wfParameter.auditers    = auditers;
            wfParameter.formData    = formData;

            WfResult res = wfEngineIBLL.Audit(wfParameter);

            return(Success(res));
        }
示例#8
0
        public ActionResult Create(bool isNew, string processId, string schemeCode, string processName, int processLevel, string description, string auditers, string formData)
        {
            WfParameter wfParameter = new WfParameter();
            UserInfo    userInfo    = LoginUserInfo.Get();

            wfParameter.companyId    = userInfo.companyId;
            wfParameter.departmentId = userInfo.departmentId;
            wfParameter.userId       = userInfo.userId;
            wfParameter.userName     = userInfo.realName;

            wfParameter.isNew        = isNew;
            wfParameter.processId    = processId;
            wfParameter.schemeCode   = schemeCode;
            wfParameter.processName  = processName;
            wfParameter.processLevel = processLevel;
            wfParameter.description  = description;
            wfParameter.auditers     = auditers;
            wfParameter.formData     = formData;

            WfResult res = wfEngineIBLL.Create(wfParameter);

            return(Success(res));
        }
示例#9
0
        public ActionResult Auditer(bool isNew, string processId, string schemeCode, string taskId, string formData)
        {
            WfParameter wfParameter = new WfParameter();
            UserInfo    userInfo    = LoginUserInfo.Get();

            wfParameter.companyId    = userInfo.companyId;
            wfParameter.departmentId = userInfo.departmentId;
            wfParameter.userId       = userInfo.userId;
            wfParameter.userName     = userInfo.realName;
            wfParameter.isNew        = isNew;
            wfParameter.processId    = processId;
            wfParameter.schemeCode   = schemeCode;
            wfParameter.taskId       = taskId;
            wfParameter.formData     = formData;

            WfResult <List <object> > res = wfEngineIBLL.GetAuditer(wfParameter);

            if (res.status == 1)
            {
                List <object> nodelist = new List <object>();
                var           list     = res.data;
                foreach (var item1 in list)
                {
                    var item = item1.ToJson().ToJObject();
                    if (item["auditors"].IsEmpty())
                    {
                        var point = new
                        {
                            all    = true,
                            name   = item["name"],
                            nodeId = item["nodeId"]
                        };
                        nodelist.Add(point);
                    }
                    else
                    {
                        List <object> userlist = new List <object>();
                        foreach (var auditor in item["auditors"])
                        {
                            switch (auditor["type"].ToString())  //获取人员信息1.岗位2.角色3.用户
                            {
                            case "1":
                            case "2":
                                var    userRelationList = userRelationIBLL.GetUserIdList(auditor["auditorId"].ToString());
                                string userIds          = "";
                                foreach (var userRelation in userRelationList)
                                {
                                    if (userIds != "")
                                    {
                                        userIds += ",";
                                    }
                                    userIds += userRelation.F_UserId;
                                }
                                var userList = userIBLL.GetListByUserIds(userIds);
                                if (userList != null)
                                {
                                    foreach (var user in userList)
                                    {
                                        if (user != null)
                                        {
                                            userlist.Add(new { id = user.F_UserId, name = user.F_RealName });
                                        }
                                    }
                                }
                                break;

                            case "3":
                                userlist.Add(new { id = auditor["auditorId"], name = auditor["auditorName"] });
                                break;
                            }
                        }
                        var point = new
                        {
                            name   = item["name"],
                            nodeId = item["nodeId"],
                            list   = userlist
                        };
                        nodelist.Add(point);
                    }
                }

                return(Success(nodelist));
            }
            else
            {
                return(Fail("获取数据失败!"));
            }
        }
示例#10
0
        /// <summary>
        /// 获取下一个节点审核人员
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response GetAuditer(dynamic _)
        {
            WfParameter wfParameter = this.GetReqData <WfParameter>();

            wfParameter.companyId    = this.userInfo.companyId;
            wfParameter.departmentId = this.userInfo.departmentId;
            wfParameter.userId       = this.userInfo.userId;
            wfParameter.userName     = this.userInfo.realName;


            WfResult <List <object> > res      = wfEngineIBLL.GetAuditer(wfParameter);
            List <object>             nodelist = new List <object>();

            if (res.status == 1)
            {
                var list = res.data;
                foreach (var item1 in list)
                {
                    var item = item1.ToJson().ToJObject();
                    if (item["auditors"].IsEmpty())
                    {
                        var point = new
                        {
                            all    = true,
                            name   = item["name"],
                            nodeId = item["nodeId"]
                        };
                        nodelist.Add(point);
                    }
                    else
                    {
                        List <object> userlist = new List <object>();
                        foreach (var auditor in item["auditors"])
                        {
                            switch (auditor["type"].ToString())
                            {//获取人员信息1.岗位2.角色3.用户
                            case "1":
                            case "2":
                                var    userRelationList = userRelationIBLL.GetUserIdList(auditor["auditorId"].ToString());
                                string userIds          = "";
                                foreach (var userRelation in userRelationList)
                                {
                                    if (userIds != "")
                                    {
                                        userIds += ",";
                                    }
                                    userIds += userRelation.F_UserId;
                                }
                                var userList = userIBLL.GetListByUserIds(userIds);
                                if (userList != null)
                                {
                                    foreach (var user in userList)
                                    {
                                        if (user != null)
                                        {
                                            userlist.Add(new { id = user.F_UserId, name = user.F_RealName });
                                        }
                                    }
                                }
                                break;

                            case "3":
                                userlist.Add(new { id = auditor["auditorId"], name = auditor["auditorName"] });
                                break;
                            }
                        }
                        var point = new
                        {
                            name   = item["name"],
                            nodeId = item["nodeId"],
                            list   = userlist
                        };
                        nodelist.Add(point);
                    }
                }

                return(Success(nodelist));
            }
            else
            {
                return(Success(nodelist));
            }
        }