/// <summary> /// 开始FP验证 /// </summary> /// <param name="jobContext">Job运行上下文</param> public static void Check(JobContext jobContext) { GetOprationUserInfo(); //提前取得所有支付方式的列表 payTypeList = CommonDA.GetPayTypeList(CompanyCode); BizLogFile = jobContext.Properties["BizLog"]; StartCheckAll(jobContext); //提前取得一次验单的最多数目 TopCount = GetFPCheckTopCount(); //提取验证的订单列表 List <SOEntity4FPEntity> tmpSOENtityList = SOFPCheckDA.GetSOList4FPCheck(TopCount, CompanyCode); //无新单时退出 if (null == tmpSOENtityList || tmpSOENtityList.Count == 0) { jobContext.Message += "没有附合条件的订单记录" + Environment.NewLine; WriteLog("没有附合条件的订单记录"); return; } else { jobContext.Message += "本次提取订单记录" + tmpSOENtityList.Count + "条." + Environment.NewLine; } //提前获取断货支持仓库 string outStockStr = ConfigurationManager.AppSettings["OUT_STOCK"]; string[] outStockArray = outStockStr.Split(','); foreach (string os in outStockArray) { OutStockList.Add(os); } //提前取得一个月内被物流拒收过单拒的客户编号 AutoRMACustomerSysNos = SOFPCheckDA.GetAutoRMACustomerSysNos(CompanyCode); //提取现有恶意用户列表 //spiteList = SOFPCheckDA.GetDubiousCustomersByCat(2); //提取现有拒收用户列表 //rejList = SOFPCheckDA.GetDubiousCustomersByCat(1); //提取现有占库存用户列表 //occupyList = SOFPCheckDA.GetDubiousCustomersByCat(0); //提取FP检查项列表 FPCheckMasterList = SOFPCheckDA.GetFPCheckMasterList(CompanyCode); //提取FP检查项列表明细项 FPCheckItemList = SOFPCheckDA.GetFPCheckItemList(CompanyCode); //提前取得是否进行可疑订单检测是标识符 IsCheckKeYi = GetFPCheckKeYiFlag(); //提前取得是否进行串单检测标识符 IsCheckChuanHuo = GetFPCheckChuanHuoFlag(); //提前取得是否进行炒货订单检测标识符 IsCheckChaoHuo = GetFPCheckChaoHuoFlag(); //提前获取是否进行重复订单检测标识符 IsCheckChongFu = GetCheckChongFuFlag(); foreach (SOEntity4FPEntity x in tmpSOENtityList) { try { string FromLinkSource = SOFPCheckDA.GetFromLinkSource(x.CustomerSysNo); //阿斯利康用户、盛大用户、柯尼卡美能达用户、理光用户、Intel用户无需审核 if ((FromLinkSource != null && FromLinkSource == INTERORDER) || (x.CustomerID.StartsWith("AstraZeneca-")) || (x.CustomerID.StartsWith("Shanda")) || (x.CustomerID.StartsWith("konicaminolta")) || (x.CustomerID.StartsWith("Ricoh-"))) { continue; } CheckSingle(x); } catch (Exception ex) { jobContext.Message += string.Format("订单[{0}]出现异常:{1}\r\n", x.SysNo, ex.Message); } } EndCheckAll(jobContext); }