Exemple #1
0
        /// <summary>
        /// 获取用户
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="pagenum">页面数</param>
        /// <param name="itemcount">一页行数</param>
        /// <param name="where">查询条件</param>
        /// <returns></returns>
        public static string GetAllUsers(Builder builder, string pagenum, string itemcount, string where)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            SecurityEntity ent = new SecurityEntity();

            ent.AppKey        = builder.SecurityEntity.AppKey;
            ent.Format        = "xml";
            ent.Method        = "ng.usermanage.getlistbypage";
            ent.Secret        = builder.SecurityEntity.Secret;
            ent.TimeStamp     = builder.SecurityEntity.TimeStamp;
            ent.TokenIdentity = builder.SecurityEntity.TokenIdentity;
            ent.Version       = "1.0";

            // 添加协议级请求参数
            Dictionary <string, string> reqParams = new Dictionary <string, string>();

            reqParams.Add("tokenidentity", ent.TokenIdentity);
            reqParams.Add("method", ent.Method);
            reqParams.Add("v", ent.Version);
            reqParams.Add("format", ent.Format);
            reqParams.Add("timestamp", ent.TimeStamp);
            reqParams.Add("appkey", ent.AppKey);
            reqParams.Add("sign", HttpClientHelp.SignNGRequest(ent));
            reqParams.Add("pagenum", pagenum);
            reqParams.Add("itemcount", itemcount);
            reqParams.Add("where", where);

            string rst = HttpClientHelp.DoPost(new APIConfig().SSOServer, reqParams);

            return(rst);
        }
Exemple #2
0
        /// <summary>
        /// 获取流程实例详情,流程变量,任务信息等
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="processInstanceId">流程定义Id</param>
        /// <returns></returns>
        public static string GetProcessInstance(Builder builder, string processInstanceId, string userid)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoGet(builder, new APIConfig().WorkFlowServer + "process-instance/" + processInstanceId + "?userId=" + userid));
        }
Exemple #3
0
/// <summary>
        /// 流程定义控制(挂起与激活)
        /// </summary>变量{"key":"$"}</param>
        /// <returns></return
        /// <param name="builder">系统参数</param>
        /// <param name="processDefinitionId">流程实例ID</param>
        /// <param name="operation">delete suspend active三选一</param>
        /// <param name="values">业务参数:流程s>
        public static string FlowDefinitionControl(Builder builder, string processDefinitionId, string operation, string userid, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoPut(builder, new APIConfig().WorkFlowServer + "senior/" + processDefinitionId + "/processDefinition/" + operation + "?userId=" + userid, values));
        }
Exemple #4
0
        /// <summary>
        /// 获取数据库连接信息
        /// </summary>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static string GetDBString(Builder builder)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoGet(builder, new APIConfig().I6PServer + "DBString.ashx"));
        }
Exemple #5
0
        /// <summary>
        /// UC平台Rest服务调用
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="values">见文档参数说明</param>
        /// <returns></returns>
        public static string Send(Builder builder, string values)
        {
            builder.SecurityEntity.Join      = true;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoPost(builder, new APIConfig().I6PServer + "SendMsg", values));
        }
Exemple #6
0
        /// <summary>
        /// 对某个任务实现自由流跳转(包括后退)
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="taskid">任务id</param>
        /// <param name="operation">"before" 或 "after"</param>
        /// <param name="values">业务参数:流程变量{"key":"$"}</param>
        /// <returns></returns>
        public static string TaskTransfer(Builder builder, string userid, string taskid, string destTaskId, string operation, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoPut(builder, new APIConfig().WorkFlowServer + "senior/" + taskid + "/" + destTaskId + "/" + operation + "?userId=" + userid, values));
        }
Exemple #7
0
        /// <summary>
        /// 根据操作员ID获取该操作员对应的所有账套
        /// </summary>
        /// <param name="appKey">应用标识(AppKey)</param>
        /// <param name="values">约定的JSon字符串</param>
        /// <returns></returns>
        public static string AllUnits(Builder builder, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoPost(builder, new APIConfig().W3APIServer + "integrationapi/AllUnits", values));
        }
Exemple #8
0
        /// <summary>
        /// 更新数据库链接
        /// </summary>
        /// <param name="builder">应用标识(AppKey)</param>
        /// <param name="values">约定的JSon字符串</param>
        /// <returns></returns>
        public static string BIPMainEntry(Builder builder, string url, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoPost(builder, url, values));
        }
Exemple #9
0
        /// <summary>
        /// 获取某执行人,候选人或候选组的任务列表
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="values">业务参数:[assignee={$}|candidate={$}|candidate-group={$}]&start={$}&size={$}&sort={$}&order={$}&order={$}&userId={$}</param>
        /// <returns></returns>
        public static string Tasks(Builder builder, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            return(HttpClientHelp.DoGet(builder, new APIConfig().WorkFlowServer + "tasks?" + values));
        }
Exemple #10
0
        /// <summary>
        /// 任务动态选人
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="definitionId">流程定义Id</param>
        /// <param name="任务Id">任务Id</param>
        /// <param name="userId">userId</param>
        /// <param name="activityId">活动Id</param>
        /// <param name="values">业务参数:流程变量{"key":"$"}</param>
        /// <returns></returns>
        public static string TaskEmpDynamicChoose(Builder builder, string definitionId, string taskId, string activityId, string userId, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string url = string.Format("dynamic/select/{0}/{1}/{2}?userId={3}", taskId, definitionId, activityId, userId);

            return(HttpClientHelp.DoPut(builder, new APIConfig().WorkFlowServer + url, values));
        }
Exemple #11
0
        /// <summary>
        /// 判断页面是否有入口权限
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="ocode">组织</param>
        /// <param name="loginid">操作员</param>
        /// <param name="pagename">页面</param>
        /// <param name="funcname">功能</param>
        /// <returns></returns>
        public static string IsHaveRight(Builder builder, string ucode, string ocode, string loginid, string rightname, string funcname)
        {
            builder.SecurityEntity.Join      = true;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";
            string str = string.Format("ucode={0}&ocode={1}&loginid={2}&pagename={3}&funcname={4}", ucode, ocode, loginid, rightname, funcname);

            return(HttpClientHelp.DoGet(builder, new APIConfig().I6PServer + "PageRights.ashx?" + str));
            //return HttpClientHelp.DoGet(builder, "http://localhost/wkf/PageButtonsRights.ashx?" + str);
        }
Exemple #12
0
        /// <summary>
        /// 获取指定账套下的所有用户
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="values">账套号{"unitID":"$"}</param>
        /// <returns></returns>
        public static string UsersByUnit(Builder builder, string values)
        {
            builder.SecurityEntity.Join      = true;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string rst = HttpClientHelp.DoPost(builder, new APIConfig().W3APIServer + "integrationapi/UsersByUnit", values);

            return(rst);
        }
Exemple #13
0
        /// <summary>
        /// 获取流程变量
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="processInstanceId">流程定义Id</param>
        /// <returns></returns>
        public static string GetVariableValue(Builder builder, string processInstanceId, string taskId, string varNames, string userId)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string url = string.Format("senior/getVariableValue?processInstanceId={0}&taskId={1}&varNames={2}&userId={3}", processInstanceId, taskId, varNames, userId);

            return(HttpClientHelp.DoGet(builder, new APIConfig().WorkFlowServer + url));
        }
Exemple #14
0
        /// <summary>
        /// 传阅任务增加
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="values">业务参数:流程变量{"key":"$"}</param>
        /// <returns></returns>
        public static string ReadPass(Builder builder, string userId, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string url = string.Format("senior/readTask?userId={0}", userId);

            return(HttpClientHelp.DoPost(builder, new APIConfig().WorkFlowServer + url, values));
        }
Exemple #15
0
        /// <summary>
        /// 设置数据库链接
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="values">业务参数:流程变量{"key":"$"}</param>
        /// <returns></returns>
        public static string SetWrokFlowDB(Builder builder, string values)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string url = string.Format("activiti-explorer2/service/config/db");

            return(HttpClientHelp.DoPost(builder, new APIConfig().WorkFlowServer + url, values));
        }
Exemple #16
0
        /// <summary>
        /// 获取注册的套件的IP
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="suite">套件</param>
        /// <returns></returns>
        public static string GetSuiteIP(Builder builder, string suite)
        {
            builder.SecurityEntity.Join      = true;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string str = string.Format("suite={0}", suite);

            return(HttpClientHelp.DoGet(builder, new APIConfig().I6PServer + "SuiteIP.ashx?" + str));
        }
Exemple #17
0
        /// <summary>
        /// 获取下一个人工任务的信息
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="taskId">任务ID</param>
        /// <param name="processDefinitionId">流程定义ID</param>
        /// <param name="nextActivityId">待跳转节点的ID</param>
        /// <param name="userId">userId</param>
        /// <returns></returns>
        public static string GetNextTaskInfo(Builder builder, string taskId, string processDefinitionId, string nextActivityId, string userId, string isExcludeProcessVar)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string url = string.Format("senior/taskInfor?taskId={0}&processDefinitionId={1}&nextActivityId={2}&userId={3}&isExcludeProcessVar={4}", taskId, processDefinitionId, nextActivityId, userId, isExcludeProcessVar);

            return(HttpClientHelp.DoGet(builder, new APIConfig().WorkFlowServer + url));
        }
Exemple #18
0
        /// <summary>
        /// 流程任务历史获取
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="processInstanceId">流程实例ID</param>
        /// <param name="userId">userId</param>
        /// <returns></returns>
        public static string GetTaskHistory(Builder builder, string processInstanceId, string userId)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string url = string.Format("process-instance/{0}/historyTasks?userId={1}", processInstanceId, userId);

            return(HttpClientHelp.DoGet(builder, new APIConfig().WorkFlowServer + url));
        }
Exemple #19
0
        /// <summary>
        /// 任务评论获取
        /// </summary>
        /// <param name="builder">系统参数</param>
        /// <param name="taskId">任务Id</param>
        /// <param name="userId">userId</param>
        /// <returns></returns>
        public static string GetComment(Builder builder, string taskId, string userId)
        {
            builder.SecurityEntity.Join      = false;
            builder.SecurityEntity.Format    = "json";
            builder.SecurityEntity.TimeStamp = System.DateTime.Now.ToString("yyyyMMddHHmmss");
            builder.SecurityEntity.Version   = "1.0";

            string url = string.Format("comment/{0}?userId={1}", taskId, userId);

            return(HttpClientHelp.DoGet(builder, new APIConfig().WorkFlowServer + url));
        }