Exemple #1
0
        /// <summary>
        /// 获取审批痕迹
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="formInstId"></param>
        /// <param name="formCodeId"></param>
        /// <returns></returns>
        private string GetFlowRecord(string formInstId, string formCodeId)
        {
            string  url   = "https://yunzhijia.com/gateway/workflow/form/thirdpart/getFlowRecord?accessToken=" + CallExternal.GetAccessToken();
            JObject param = new JObject();

            param.Add("formInstId", formInstId);
            param.Add("formCodeId", formCodeId);
            string response = CallExternal.PostUrl(url, param.ToString(), "application/json");

            return(response);
        }
Exemple #2
0
        /// <summary>
        /// 获取外部日志
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <param name="pageId"></param>
        /// <param name="pageType"></param>
        /// <returns></returns>
        private List <PushLogs> GetExternalLog(
            string accessToken,
            long startTime,
            long endTime,
            string pageId,
            string pageType)
        {
            string url = "https://yunzhijia.com/gateway/workflow/form/thirdpart/getPushLog?accessToken=" + accessToken;
            //页码信息
            JObject pageable = new JObject();

            pageable.Add("id", pageId);
            pageable.Add("pageSize", 100);
            pageable.Add("type", pageType);
            //请求参数
            JObject postParam = new JObject();

            postParam.Add("pageable", pageable);
            postParam.Add("devType", "user");
            postParam.Add("startTime", startTime);
            postParam.Add("endTime", endTime);
            postParam.Add("pushType", "all");
            string jsonRequest = CallExternal.PostUrl(url, postParam.ToString(), "application/json");

            JObject         json     = JObject.Parse(jsonRequest.ToString());
            List <PushLogs> pushlogs = GetPushLogs(json["data"]["pushLogs"].ToString());

            if (pushlogs.Count() == 100)
            {
                pageId   = pushlogs.Last().Id;
                pageType = "next";
                var logs = GetExternalLog(accessToken, startTime, endTime, pageId, pageType);
                pushlogs.AddRange(logs);
            }
            return(pushlogs);
        }