Пример #1
0
        /// <summary>
        /// 根据业务ID查询已办数据
        /// </summary>
        /// <param name="businessID"></param>
        /// <returns></returns>
        public static WFTaskQueryResult QueryDoneByBusinessID(string businessID)
        {
            var dicParamWebService = SDKHelper.BuildParamWebService(AppSettingInfo.CONST_Action_ProcessOperator, AppSettingInfo.CONST_OtherMethod_QueryDoneByBusinessID, Guid.NewGuid().ToString(), Newtonsoft.Json.JsonConvert.SerializeObject(new
            {
                BusinessID = businessID,
            }));

            return(PostWebServiceGetResult <WFTaskQueryResult>(dicParamWebService));
        }
Пример #2
0
        /// <summary>
        /// 查询待办/已办
        /// </summary>
        /// <param name="condition">查询条件</param>
        /// <param name="methodName">方法名称</param>
        /// <returns></returns>
        internal static WFTaskQueryResult QureyTask(WFTaskQueryFilter condition, string methodName)
        {
            var dicParamWebService = SDKHelper.BuildParamWebService(AppSettingInfo.CONST_Action_ProcessOperator, methodName, Guid.NewGuid().ToString(), Newtonsoft.Json.JsonConvert.SerializeObject(new
            {
                Condition = condition,
            }));

            return(PostWebServiceGetResult <WFTaskQueryResult>(dicParamWebService));
        }
Пример #3
0
        /// <summary>
        /// 查询已办(同一流程同一个人只会查询到一条最新的已办信息)
        /// </summary>
        /// <param name="condition">查询条件(PageSize和PageIndex同时为0表示查询所有)</param>
        /// <returns>已办查询结果(同一流程同一个人只会查询到一条最新的已办信息)</returns>
        public static WFTaskQueryResult QueryDoneDistinct(WFTaskQueryFilter condition)
        {
            var dicParamWebService = SDKHelper.BuildParamWebService(AppSettingInfo.CONST_Action_ProcessOperator, AppSettingInfo.CONST_OtherMethod_QueryDoneDistinct, Guid.NewGuid().ToString(), Newtonsoft.Json.JsonConvert.SerializeObject(new
            {
                Condition = condition,
            }));

            return(PostWebServiceGetResult <WFTaskQueryResult>(dicParamWebService));
        }
Пример #4
0
        /// <summary>
        /// 查询审批日志
        /// </summary>
        /// <param name="businessID">业务ID</param>
        /// <returns></returns>
        internal static List <ProcessLog> GetProcessLogList(string businessID)
        {
            //将appCode,action,method,param(序列化后的dicParam)添加到dicParamWebService中调用WebService
            var dicParamWebService = SDKHelper.BuildParamWebService(AppSettingInfo.CONST_Action_ProcessOperator, AppSettingInfo.CONST_OtherMethod_QueryProcessLog, Guid.NewGuid().ToString(), Newtonsoft.Json.JsonConvert.SerializeObject(new
            {
                BusinessID = businessID,
            }));

            return(PostWebServiceGetResult <List <ProcessLog> >(dicParamWebService));
        }
Пример #5
0
        /// <summary>
        /// 检查是否发起过流程
        /// </summary>
        /// <param name="businessID">业务ID</param>
        /// <returns></returns>
        internal static bool Exist(string businessID)
        {
            var dicParamWebService = SDKHelper.BuildParamWebService(AppSettingInfo.CONST_Action_ProcessOperator, AppSettingInfo.CONST_OtherMethod_ExistProcess, Guid.NewGuid().ToString(), Newtonsoft.Json.JsonConvert.SerializeObject(new
            {
                BusinessID = businessID,
            }));
            string            result      = SDKHelper.QueryPostWebService(dicParamWebService);
            ResultBaseContext baseContext = JsonConvert.DeserializeObject <ResultBaseContext>(result);

            if (baseContext.StatusCode == ClientConstDefine.WORKFLOW_SERVICE_ERRORCODE_NOERROR)
            {
                return((string)baseContext.Data == Boolean.TrueString);
            }
            else
            {
                throw new Exception(baseContext.StatusMessage, baseContext.LastException);
            }
        }
        public override Dictionary <string, object> BuildParamWebService(string action, string method, string token, string callBackUrl, Dictionary <string, string> dicParam, HttpContext context)
        {
            string version = "1.0";

            if (dicParam.ContainsKey("Version"))
            {
                version = dicParam["Version"];
            }
            string paramStr = string.Empty;

            if (dicParam.ContainsKey("Param"))
            {
                paramStr = dicParam["Param"];
            }
            //将appCode,action,method,param(序列化后的dicParam)添加到dicParamWebService中调用WebService
            return(SDKHelper.BuildParamWebService(action, method, token, Newtonsoft.Json.JsonConvert.SerializeObject(
                                                      new
            {
                Version = version,
                Param = paramStr,
                CurrentUserLoginID = SDKHelper.GetUserName(context),
                BizAppCode = AppSettingInfo.ApplicationCode
            }), callBackUrl));
        }
 public override Dictionary <string, object> BuildParamWebService(string action, string method, string token, string callBackUrl, Dictionary <string, string> dicParam, HttpContext context)
 {
     return(SDKHelper.BuildParamWebService(action, method, token, Newtonsoft.Json.JsonConvert.SerializeObject(dicParam), callBackUrl));
 }