Ejemplo n.º 1
0
        private void cacheDocInfo(K3DataParaInfo docInfo, K3InterceptConfig busiConfig)
        {
            try
            {
                LogInfoHelp.debugLog(string.Empty, docInfo, "进入缓存服务中断数据。");
                using (SqlConnection sqlconn = new SqlConnection(ServiceConfig.Instance.K3ConnectString))
                {
                    sqlconn.Open();
                    using (SqlCommand sqlcommCache = new SqlCommand("zz_pr_X9WebSrvBackup_Save", sqlconn))
                    {
                        sqlcommCache.CommandType = CommandType.StoredProcedure;
                        string       strDocInfo      = XmlSerializerHelper.XmlSerialize <K3DataParaInfo>(docInfo, Encoding.Unicode);
                        SqlParameter sqlparamDocInfo = new SqlParameter("@DocInfo", SqlDbType.Xml, 5000);
                        sqlparamDocInfo.Value = strDocInfo;
                        SqlParameter sqlparamUrl = new SqlParameter("@Url", SqlDbType.NVarChar, 100);
                        sqlparamUrl.Value = string.Format("http://{0}", busiConfig.ServiceAddress);
                        sqlcommCache.Parameters.Add(sqlparamDocInfo);
                        sqlcommCache.Parameters.Add(sqlparamUrl);

                        sqlcommCache.ExecuteNonQuery();
                    }
                }
            }
            catch (Exception ex)
            {
                LogInfoHelp.debugLog(string.Empty, docInfo, string.Format("进入缓存服务中断数据,发生异常:{0}", ex.Message));
                //throw new RankException(string.Format("暂存DocInfo存储异常:{0}", string.Empty), ex);
                //MessageBox.Show(string.Format("{0}\t暂存DocInfo存储异常:{1}", Environment.NewLine, ex.Message));
                throw new Exception(string.Format("{0}\t暂存DocInfo存储异常:{1}", Environment.NewLine, ex.Message), ex);
            }
            throw new Exception(string.Format("调用X9系统服务时,{0}", docInfo.Data));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 所单据表头增加了“是否进X9”字段,并在zz_t_K3InterceptConfig配置表设置好对应字段则会进行过滤调用。
        /// 对过滤字段的设定,可能是以枚举方式,这样造成保存到数据库后台的值是不可预定。所以后续可考虑加入ExcludedValue字段
        /// 保存“排除调用服务”的字段值,如N、false或其他值。
        /// </summary>
        /// <param name="itemConfig"></param>
        /// <param name="docInfo"></param>
        /// <returns></returns>
        internal bool isCalledFilter(K3InterceptConfig itemConfig, K3DataParaInfo docInfo)
        {
            bool bRlt = true;

            if (itemConfig == null || string.IsNullOrEmpty(itemConfig.ConditionTable) || string.IsNullOrEmpty(itemConfig.ConditionField) || string.IsNullOrEmpty(itemConfig.KeyField))
            {
                return(bRlt);
            }
            using (SqlConnection sqlconn = new SqlConnection(ServiceConfig.Instance.K3ConnectString))
            {
                sqlconn.Open();
                using (SqlCommand sqlcommExists = new SqlCommand(string.Format("select 1 from sys.columns where [object_id] = object_id('{0}') and name = '{1}'", itemConfig.ConditionTable, itemConfig.ConditionField), sqlconn))
                {
                    Object objIsExists = sqlcommExists.ExecuteScalar();
                    if (objIsExists == null || Convert.ToInt32(objIsExists.ToString()) != 1)
                    {
                        return(bRlt);
                    }
                }

                using (SqlCommand sqlcommKeyExists = new SqlCommand(string.Format("select 1 from sys.columns where [object_id] = object_id('{0}') and name = '{1}'", itemConfig.ConditionTable, itemConfig.KeyField), sqlconn))
                {
                    Object objIsExists = sqlcommKeyExists.ExecuteScalar();
                    if (objIsExists == null || Convert.ToInt32(objIsExists.ToString()) != 1)
                    {
                        return(bRlt);
                    }
                }

                string strExcludedValue = "N";
                if (!string.IsNullOrEmpty(itemConfig.ExcludedValue))
                {
                    strExcludedValue = itemConfig.ExcludedValue;
                }

                using (SqlCommand sqlcommCondition = new SqlCommand(string.Format("select isnull({1},'Y') from {0} where {2} = {3}", itemConfig.ConditionTable, itemConfig.ConditionField, itemConfig.KeyField, docInfo.InterID.ToString()), sqlconn))
                {
                    Object objValue = sqlcommCondition.ExecuteScalar();
                    if (objValue == null)
                    {
                        return(bRlt);
                    }
                    else
                    {
                        if (string.Equals(strExcludedValue, objValue.ToString(), StringComparison.OrdinalIgnoreCase))
                        {
                            bRlt = false;
                        }
                    }
                }
            }

            return(bRlt);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 日志级别高于等于LOG_DEBUG,进行日志记录
        /// </summary>
        public static void debugLog(string interceptEvent, K3DataParaInfo docInfo, string msg)
        {
            if (CommonFunc.ConfigLogType >= LOG_TYPE.LOG_DEBUG)
            {
                string strPreLog = String.Format("-----------日志消息:{0}---------------" + Environment.NewLine
                                                 + "\tK3传递数据内容:X9业务类型:【{1}】;K3业务类型【{2}】;红蓝字【{3}】;触发事件【{4}】;单据内码【{5}】;明细行ID【{6}】;单据编码【{7}】;额外数据【{8}】;操作人【{9}】",
                                                 msg, docInfo.X9BillType.ToString(), docInfo.TransType.ToString(), docInfo.ROB.ToString(), interceptEvent, docInfo.InterID.ToString(), docInfo.EntryID.ToString(),
                                                 docInfo.BillCode, docInfo.Data, docInfo.CurrentUser);

                Log(strPreLog, CommonFunc.ConfigLogType);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 检测基础业务是否可启用
        /// </summary>
        /// <param name="transType"></param>
        /// <param name="rob"></param>
        /// <param name="eventID"></param>
        /// <returns><\returns>
        internal K3InterceptConfig validateBusinessEnable(K3DataParaInfo docInfo, string interceptEvent)
        {
            List <K3InterceptConfig> lstConfig = (from s in ServiceConfig.Instance.BusiConfigs
                                                  where s.InterceptEvent == interceptEvent && s.X9BusinessType == docInfo.X9BillType && s.IsEnable == 1
                                                  orderby s.Id descending
                                                  select s).ToList <K3InterceptConfig>();

            foreach (var item in lstConfig)
            {
                if (DateTime.Now.Date >= item.EnableDate && DateTime.Now.Date <= item.DisableDate)
                {
                    return(item);
                }
            }
            return(null);;
        }
Ejemplo n.º 5
0
 private ResultInfo defaultEventHandle(string eventName, K3DataParaInfo docInfo, K3InterceptConfig busiConfig)
 {
     try
     {
         X9WebService.WebService svValidateBM = new X9WebService.WebService();
         svValidateBM.Url = string.Format("http://{0}", busiConfig.ServiceAddress);
         string strDocInfo = XmlSerializerHelper.XmlSerialize <K3DataParaInfo>(docInfo, Encoding.Unicode);
         //string strHttpEncoding = HttpUtility.HtmlEncode(strDocInfo);
         string strRlt = svValidateBM.SynchBillFromK3ToX9(strDocInfo);
         if (!string.IsNullOrEmpty(strRlt))
         {
             //strRlt = strRlt.Replace(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"", "");
             //string strHttpDecoding = HttpUtility.HtmlDecode(strRlt);
             ResultInfo rltInfo = XmlSerializerHelper.XmlDeserialize <ResultInfo>(strRlt, Encoding.Unicode);
             //2019-8-13 修改为:返回结果IsSuccess为false,缓存当前结果。
             //if (!rltInfo.IsSuccess)
             //{
             //    StringBuilder strbError = new StringBuilder();
             //    foreach (var item in rltInfo.Errors)
             //    {
             //        if (!String.IsNullOrEmpty(item.ErrorText))
             //        {
             //            strbError.AppendLine(item.ErrorText);
             //        }
             //    }
             //    docInfo.Data = strbError.ToString();
             //    cacheDocInfo(docInfo, busiConfig);
             //}
             return(rltInfo);
         }
         else
         {
             docInfo.Data = "X9服务未开启或执行返回为空字符";
             cacheDocInfo(docInfo, busiConfig);
         }
     }
     catch (Exception ex)
     {
         //LogInfoHelp.infoLog(eventName, docInfo, string.Format("调用X9系统服务时,异常:{0}", ex.Message));
         docInfo.Data = ex.Message;
         cacheDocInfo(docInfo, busiConfig);
         //throw new Exception(string.Format("调用X9系统服务时,{0}", ex.Message),ex);
     }
     return(null);
 }
Ejemplo n.º 6
0
 public override ResultInfo unKnownExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig)
 {
     return(defaultEventHandle(InterceptEvent.UnKnownEvent, docInfo, busiConfig));
 }
Ejemplo n.º 7
0
        /// <summary>
        /// </summary>
        /// <param name="k3Connection"></param>
        /// <param name="transType"></param>
        /// <param name="rob"></param>
        /// <param name="operateID"></param>
        /// <param name="eventID"></param>
        /// <param name="interID"></param>
        /// <param name="billCode"></param>
        /// <param name="currUser"></param>
        /// <param name="data"></param>
        /// <param name="rltFlag">特别注意为false时,也就是执行失败时外部分布式事务会回滚所有的数据更新处理。</param>
        public void handle(string k3Connection, int transType, int rob, long operateID, long eventID, long interID, int entryID, string billCode, string currUser, string data, ref bool rltFlag, ref string rltMsg)
        {
            ResultInfo rltInfo = null;
            //LogInfoHelp.Log(k3Connection, LOG_TYPE.LOG_DEBUG);

            int lCheckLevel = 0, lCurrentLevel = 0;

            try
            {
                lCheckLevel = checkMultiLevel(k3Connection, transType);
                if (lCheckLevel > 0)
                {
                    LogInfoHelp.logOnlyDebug(string.Format("业务类型【{0}】,单据内码【{1}】进入多级({2})审核判断拦截", transType.ToString(), interID.ToString(), lCheckLevel.ToString()));
                    lCurrentLevel = getCurrentLevel(k3Connection, interID, transType);
                }
            }
            catch (Exception ex)
            {
                LogInfoHelp.Log(string.Format("查询单据多级审核时异常:{0}", ex.Message), LOG_TYPE.LOG_INFO);
            }

            #region eventID=300007/300008/300015/300016关闭时
            try
            {
                //对应transType=82/83,销售发货、退货同为SEOutStock表需要通过interID查询再区分
                if (transType == 82 || transType == 83)
                {
                    if (eventID == 300007 || eventID == 300008)
                    {
                        transType = getSEOutBillType(k3Connection, interID);
                    }
                }
                //对应transType=72/73,采购收料、退料同为POInStock表需要通过interID查询再区分
                if (transType == 72 || transType == 73)
                {
                    if (eventID == 300007 || eventID == 300008)
                    {
                        transType = getPOInBillType(k3Connection, interID);
                    }
                }
            }
            catch (Exception ex)
            {
                LogInfoHelp.Log(string.Format("区分单据关闭时业务类型异常:{0}", ex.Message), LOG_TYPE.LOG_INFO);
            }

            #endregion

            K3DataParaInfo docInfo = new K3DataParaInfo()
            {
                BillCode    = billCode,
                InterID     = interID,
                EntryID     = entryID,
                TransType   = transType,
                ROB         = rob,
                CurrentUser = currUser,
                X9BillType  = CommonFunc.ContrastK3TransType(Convert.ToInt64(transType), rob),
                EventName   = InterceptEvent.ConvertToEventName(eventID, operateID, lCheckLevel, lCurrentLevel),
                Data        = data,
            };
            LogInfoHelp.debugLog(docInfo.EventName, docInfo, "进入事件分发响应处理");
            try
            {
                if (ServiceConfig.Initial(k3Connection))
                {
                    LogInfoHelp.debugLog(docInfo.EventName,
                                         docInfo, string.Format("X9对K3中间层拦截器初始化完成,进入事件{0}响应。", docInfo.EventName));
                    IK3Intercept processor = new X9BusinessIntercept();//以标准类实现
                    ///     200001 '审核前事件
                    ///     200002 '审核反写事件
                    ///     200003 '审核退出前事件
                    switch (docInfo.EventName)
                    {
                    case InterceptEvent.AddBefore:
                        rltInfo = processor.addBefore(docInfo);
                        break;

                    case InterceptEvent.AddAfter:
                        rltInfo = processor.addAfter(docInfo);
                        break;

                    case InterceptEvent.DeleteBefore:
                        rltInfo = processor.deleteBefore(docInfo);
                        break;

                    case InterceptEvent.DeleteAfter:
                        rltInfo = processor.deleteAfter(docInfo);
                        break;

                    case InterceptEvent.FirstApprovedBefore:
                        rltInfo = processor.firstApprovedBefore(docInfo);
                        break;

                    case InterceptEvent.FirstApprovedAfter:
                        rltInfo = processor.firstApprovedAfter(docInfo);
                        break;

                    case InterceptEvent.UnFirstApprovedBefore:
                        rltInfo = processor.unFirstApprovedBefore(docInfo);
                        break;

                    case InterceptEvent.UnFirstApprovedAfter:
                        rltInfo = processor.unFirstApprovedAfter(docInfo);
                        break;

                    case InterceptEvent.ApprovedBefore:
                        rltInfo = processor.approvedBefore(docInfo);
                        break;

                    case InterceptEvent.ApprovedAfter:
                        rltInfo = processor.approvedAfter(docInfo);
                        break;

                    case InterceptEvent.UnApprovedBefore:
                        rltInfo = processor.unApprovedBefore(docInfo);
                        break;

                    case InterceptEvent.UnApprovedAfter:
                        rltInfo = processor.unApprovedAfter(docInfo);
                        break;

                    case InterceptEvent.ClosedBefore:
                        rltInfo = processor.closedBefore(docInfo);
                        break;

                    case InterceptEvent.ClosedAfter:
                        rltInfo = processor.closedAfter(docInfo);
                        break;

                    case InterceptEvent.UnClosedBefore:
                        rltInfo = processor.unClosedBefore(docInfo);
                        break;

                    case InterceptEvent.UnClosedAfter:
                        rltInfo = processor.unClosedAfter(docInfo);
                        break;

                    case InterceptEvent.EntryClosedBefore:
                        rltInfo = processor.entryClosedBefore(docInfo);
                        break;

                    case InterceptEvent.EntryClosedAfter:
                        rltInfo = processor.entryClosedAfter(docInfo);
                        break;

                    case InterceptEvent.UnEntryClosedBefore:
                        rltInfo = processor.unEntryClosedBefore(docInfo);
                        break;

                    case InterceptEvent.UnEntryClosedAfter:
                        rltInfo = processor.unEntryClosedAfter(docInfo);
                        break;

                    default:
                        rltInfo = processor.unKnownEvent(docInfo);
                        break;
                    }
                    if (rltInfo == null)
                    {
                        //当未启用、单据表头标记为‘不进入X9系统’或服务调用异常时,rltInfo为null,这时K3业务继续。
                        LogInfoHelp.debugLog(docInfo.EventName, docInfo, string.Format("X9系统业务校验事件{0}服务,返回结果为空值(null),K3动作继续进行。", docInfo.EventName));
                        rltFlag = true;
                        //throw new Exception(string.Format("X9系统业务校验事件{0}服务,返回结果为空值(null),K3动作继续进行。", docInfo.EventName));
                    }
                    else
                    {
                        if (docInfo.EventName.IndexOf("After", 0, StringComparison.OrdinalIgnoreCase) > 0)
                        {
                            rltFlag = true;
                        }
                        else
                        {
                            rltFlag = rltInfo.IsSuccess;//(2019-8-17取消)返回结果对象是否校验通过。2019-8-13 改为:不管X9服务认定是否通过,都不再中断K3动作。
                        }
                        if (!rltFlag)
                        {
                            //X9服务返回false时,将异常消息传出
                            StringBuilder strbError = new StringBuilder();
                            foreach (var item in rltInfo.Errors)
                            {
                                if (!String.IsNullOrEmpty(item.ErrorText))
                                {
                                    strbError.AppendLine(item.ErrorText);
                                }
                            }
                            rltMsg = strbError.ToString();
                        }

                        LogInfoHelp.infoLog(docInfo.EventName, docInfo, string.Format("X9系统业务校验事件{0}服务,返回结果为{1}。", docInfo.EventName, rltInfo.IsSuccess.ToString()));
                        LogInfoHelp.debugLog(docInfo.EventName, docInfo, string.Format("X9系统业务校验事件{0}服务,返回结果为{1}。", docInfo.EventName,
                                                                                       XmlSerializerHelper.XmlSerialize <ResultInfo>(rltInfo, Encoding.Unicode)));
                        #region 当标记为Debug时,显示结果返回窗。
                        if (CommonFunc.ConfigLogType > LOG_TYPE.LOG_INFO)
                        {
                            StringBuilder strbInfo  = new StringBuilder();
                            StringBuilder strbError = new StringBuilder();
                            foreach (var item in rltInfo.Errors)
                            {
                                if (!String.IsNullOrEmpty(item.ErrorText))
                                {
                                    strbError.AppendLine(item.ErrorText);
                                }
                            }
                            foreach (var item in rltInfo.Results)
                            {
                                if (!String.IsNullOrEmpty(item.MsgText))
                                {
                                    strbInfo.AppendLine(item.MsgText);
                                }
                            }
                            string strEventMsg = string.Empty;
                            if (rltFlag)
                            {
                                strEventMsg = string.Format("X9系统检查{0}通过!", InterceptEvent.ConvertToCNZHName(docInfo.EventName));
                            }
                            else
                            {
                                strEventMsg = string.Format("X9系统检查{0}不通过!", InterceptEvent.ConvertToCNZHName(docInfo.EventName));
                            }
                            string strRlt = string.Format("消息:{0}{1}", strEventMsg, Environment.NewLine);
                            if (!string.IsNullOrEmpty(strbInfo.ToString()))
                            {
                                strRlt += string.Format("{0}{1}", strbInfo.ToString(), Environment.NewLine);
                            }
                            if (!string.IsNullOrEmpty(strbError.ToString()))
                            {
                                strRlt += string.Format("异常提示:{0}", strbError.ToString());
                            }
                            frmMessageSingle.Show(strRlt, XmlSerializerHelper.XmlSerialize <ResultInfo>(rltInfo, Encoding.Unicode));
                        }
                        #endregion
                    }
                    LogInfoHelp.debugLog(docInfo.EventName, docInfo, string.Format("完成X9系统业务校验事件{0}服务中", docInfo.EventName));
                }
                else
                {
                    LogInfoHelp.infoLog(docInfo.EventName, docInfo, "X9对K3中间层拦截器初始化失败。请进行Debug查阅!");
                    LogInfoHelp.debugLog(docInfo.EventName, docInfo,
                                         string.Format("X9对K3中间层拦截器初始化失败。{0}传入的K3数据库连接串:{1}{2}当前环境执行路径:{3}{4}",
                                                       Environment.NewLine, k3Connection, Environment.NewLine, CommonFunc.strPath, Environment.NewLine));
                    if (CommonFunc.ConfigLogType > LOG_TYPE.LOG_INFO)
                    {
                        frmMessageSingle.Show("X9对K3中间层拦截器初始化失败!",
                                              string.Format("{0}传入的K3数据库连接串:{1}{2}当前环境执行路径:{3}{4}",
                                                            Environment.NewLine, k3Connection, Environment.NewLine, CommonFunc.strPath, Environment.NewLine));
                    }
                }
            }
            catch (Exception ex)
            {
                //(2019-8-17取消)异常时将错误信息保存至日志,并弹窗提示,但不中断K3动作,让其继续执行下去。
                //rltFlag = false;
                rltFlag = false;
                rltMsg  = string.Format("请查看日志进行详查定位!异常消息:{0}", ex.Message);
                LogInfoHelp.infoLog(docInfo.EventName, docInfo,
                                    string.Format("X9对K3中间层拦截器执行异常,可将配置文件设置为‘Debug'进行详查定位!{0}异常消息:{1}\t{2}异常对象来源:{3}\t{4}异常堆栈:{5}",
                                                  Environment.NewLine, ex.Message, Environment.NewLine, ex.Source, Environment.NewLine, ex.StackTrace));
                //LogInfoHelp.debugLog(docInfo.EventName, docInfo,
                //    string.Format("X9对K3中间层拦截器执行异常。异常消息:{0}{1}异常对象来源:{2}{3}异常堆栈:{4}{5}{6}",
                //    Environment.NewLine, ex.Message, Environment.NewLine, ex.Source,
                //    Environment.NewLine, ex.StackTrace, Environment.NewLine));

                //if (CommonFunc.ConfigLogType > LOG_TYPE.LOG_INFO)
                //{
                frmMessageSingle.Show("X9对K3中间层拦截器执行异常!",
                                      string.Format("X9对K3中间层拦截器执行异常,可将配置文件设置为‘Debug'进行详查定位!{0}异常消息:{1}\t{2}异常对象来源:{3}\t{4}异常堆栈:{5}",
                                                    Environment.NewLine, ex.Message, Environment.NewLine, ex.Source, Environment.NewLine, ex.StackTrace));
                //}
            }
            finally
            {
                //rltFlag = rltInfo;//(2019-8-17取消)最终将内部调用结果返回给K3中间件插件 //不再中断K3动作 2019-8-13
                LogInfoHelp.infoLog(docInfo.EventName, docInfo, string.Format("K3ToX9拦截器执行结束,结果:{0}", rltFlag.ToString()));
            }
        }
Ejemplo n.º 8
0
 public ResultInfo unClosedBefore(K3DataParaInfo docInfo)
 {
     return(defaultEventHandle(InterceptEvent.UnClosedBefore, docInfo));
 }
Ejemplo n.º 9
0
 public ResultInfo closedAfter(K3DataParaInfo docInfo)
 {
     return(defaultEventHandle(InterceptEvent.ClosedAfter, docInfo));
 }
Ejemplo n.º 10
0
 public ResultInfo unApprovedAfter(K3DataParaInfo docInfo)
 {
     return(defaultEventHandle(InterceptEvent.UnApprovedAfter, docInfo));
 }
Ejemplo n.º 11
0
 public ResultInfo unKnownEvent(K3DataParaInfo docInfo)
 {
     return(defaultEventHandle(InterceptEvent.UnKnownEvent, docInfo));
 }
Ejemplo n.º 12
0
 public override ResultInfo unClosedBeforeExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig)
 {
     return(defaultEventHandle(InterceptEvent.UnClosedBefore, docInfo, busiConfig));
 }
Ejemplo n.º 13
0
 public abstract ResultInfo approvedAfterExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig);
Ejemplo n.º 14
0
        /// <summary>
        /// 基类缺省处理事件方法
        /// </summary>
        /// <param name="eventName"></param>
        /// <param name="docInfo"></param>
        /// <param name="rltFlag"></param>
        /// <returns><\returns>
        private ResultInfo defaultEventHandle(string eventName, K3DataParaInfo docInfo)
        {
            ResultInfo rltInfo = null;

            try
            {
                LogInfoHelp.debugLog(eventName, docInfo, string.Format("进入基类{0}事件响应", eventName));

                K3InterceptConfig itemConfig = validateBusinessEnable(docInfo, eventName);

                if (itemConfig != null)
                {
                    LogInfoHelp.debugLog(eventName, docInfo, string.Format("进入X9系统业务校验事件{0}服务中", eventName));
                    if (!isCalledFilter(itemConfig, docInfo))
                    {
                        LogInfoHelp.infoLog(eventName, docInfo, string.Format("X9系统业务校验事件{0}服务,单据【{1}]表头标记为“不进入X9系统”。", eventName, docInfo.InterID.ToString()));
                        return(null);
                    }
                    switch (eventName)
                    {
                    case InterceptEvent.AddBefore:
                        rltInfo = addBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.AddAfter:
                        rltInfo = addAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.DeleteBefore:
                        rltInfo = deleteBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.DeleteAfter:
                        rltInfo = deleteAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.FirstApprovedBefore:
                        rltInfo = firstApprovedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.FirstApprovedAfter:
                        rltInfo = firstApprovedAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnFirstApprovedBefore:
                        rltInfo = unFirstApprovedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnFirstApprovedAfter:
                        rltInfo = unFirstApprovedAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.ApprovedBefore:
                        rltInfo = approvedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.ApprovedAfter:
                        rltInfo = approvedAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnApprovedBefore:
                        rltInfo = unApprovedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnApprovedAfter:
                        rltInfo = unApprovedAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.ClosedBefore:
                        rltInfo = closedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.ClosedAfter:
                        rltInfo = closedAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnClosedBefore:
                        rltInfo = unClosedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnClosedAfter:
                        rltInfo = unClosedAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.EntryClosedBefore:
                        rltInfo = entryClosedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.EntryClosedAfter:
                        rltInfo = entryClosedAfterExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnEntryClosedBefore:
                        rltInfo = unEntryClosedBeforeExtend(docInfo, itemConfig);
                        break;

                    case InterceptEvent.UnEntryClosedAfter:
                        rltInfo = unEntryClosedAfterExtend(docInfo, itemConfig);
                        break;

                    default:
                        rltInfo = unKnownExtend(docInfo, itemConfig);
                        break;
                    }
                }
                else
                {
                    LogInfoHelp.debugLog(eventName, docInfo, string.Format("未启用X9系统对K3事件{0}的拦截", eventName));
                }
            }
            catch (Exception ex)
            {
                LogInfoHelp.infoLog(docInfo.EventName, docInfo,
                                    string.Format("执行基类缺省拦截处理:{0}事件。异常:{1}", eventName, ex.Message));
                //throw new Exception(string.Format("{0}\t{1}", Environment.NewLine,
                //    string.Format("执行基类缺省拦截处理:{0}事件。异常:{1}", eventName, ex.Message)),ex);
                //throw new RankException(string.Format("执行基类缺省拦截处理:{0}事件。异常:{1}", eventName, string.Empty), ex);
            }
            return(rltInfo);
        }
Ejemplo n.º 15
0
 public abstract ResultInfo unKnownExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig);
Ejemplo n.º 16
0
 public abstract ResultInfo unEntryClosedAfterExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig);
Ejemplo n.º 17
0
 public abstract ResultInfo entryClosedBeforeExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig);
Ejemplo n.º 18
0
 public abstract ResultInfo unApprovedBeforeExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig);
Ejemplo n.º 19
0
 public override ResultInfo unFirstApprovedAfterExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig)
 {
     return(defaultEventHandle(InterceptEvent.UnApprovedAfter, docInfo, busiConfig));
 }
Ejemplo n.º 20
0
 public ResultInfo deleteAfter(K3DataParaInfo docInfo)
 {
     return(defaultEventHandle(InterceptEvent.DeleteAfter, docInfo));
 }
Ejemplo n.º 21
0
 public override ResultInfo entryClosedAfterExtend(K3DataParaInfo docInfo, K3InterceptConfig busiConfig)
 {
     return(defaultEventHandle(InterceptEvent.EntryClosedAfter, docInfo, busiConfig));
 }
Ejemplo n.º 22
0
 public ResultInfo approvedBefore(K3DataParaInfo docInfo)
 {
     return(defaultEventHandle(InterceptEvent.ApprovedBefore, docInfo));
 }