/// <summary>
        /// 过滤器
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        private static List <FilterResult> FilterExist(List <ResumeSearch> list)
        {
            var filterResult = new List <FilterResult>();

            filterResult.AddRange(list.Select(s => new FilterResult
            {
                ResumeId        = s.ResumeId,
                ResumeNumber    = s.ResumeNumber,
                UserMasterExtId = s.UserMasterExtId
            }));

            if (!isFirst)
            {
                using (var db = new ResumeRepairDBEntities())
                {
                    var filterResultArr = filterResult.Select(s => s.ResumeId).ToArray();

                    var resumeIdArr = db.ResumeRecord.Where(w => filterResultArr.Any(a => w.ResumeId == a)).Select(s => s.ResumeId).ToArray();

                    filterResult.RemoveAll(r => resumeIdArr.Any(a => r.ResumeId == a));

                    var resumeList = filterResult.Select(s => new ResumeRecord
                    {
                        LibraryExist   = 2,
                        ResumePlatform = 1,
                        ResumeId       = s.ResumeId,
                        Status         = (short)ResumeRecordStatus.WaitMatch,
                        PostBackStatus = 0
                    }).ToList();

                    db.ResumeRecord.AddRange(resumeList);

                    db.SaveChanges();

                    var query = from n in resumeList.AsQueryable()
                                join l in list.AsQueryable() on new { n.ResumeId } equals new { l.ResumeId }
                    select new MatchResumeSearch
                    {
                        LastCompany     = l.LastCompany,
                        Name            = l.Name,
                        ResumeId        = n.ResumeId,
                        ResumeNumber    = l.ResumeNumber,
                        University      = l.University,
                        UserMasterExtId = l.UserMasterExtId,
                        ResumeRecodeId  = n.Id
                    };

                    db.MatchResumeSearch.AddRange(query);

                    db.SaveChanges();
                }
            }

            isFirst = false;

To:

            var result = RequestFactory.QueryRequest(Global.FilterAuthUrl, "{\"Username\": \"longzhijie\",\"Password\": \"NuRQe6kC\"}", RequestEnum.POST, contentType: EnumFactory.Codes(ContentTypeEnum.Json));

            if (!string.IsNullOrWhiteSpace(result))
            {
                var jObject = JsonConvert.DeserializeObject(result) as JObject;

                if ((int)jObject["Code"] == 0)
                {
                    dynamic param = new
                    {
                        Username        = "******",
                        Signature       = (string)jObject["Signature"],
                        ResumeSummaries = new List <object>()
                    };

                    param.ResumeSummaries.AddRange(list.Select(s => new { ResumeNumber = s.ResumeNumber, UserMasterExtendId = s.UserMasterExtId, ResumeId = s.ResumeId }).ToList());

                    result = RequestFactory.QueryRequest(Global.FilterUrl, JsonConvert.SerializeObject(param), RequestEnum.POST, contentType: EnumFactory.Codes(ContentTypeEnum.Json));

                    if (!string.IsNullOrWhiteSpace(result))
                    {
                        jObject = JsonConvert.DeserializeObject(result) as JObject;

                        if ((int)jObject["Code"] == 3)
                        {
                            goto To;
                        }

                        if ((int)jObject["Code"] == 0)
                        {
                            using (var db = new ResumeRepairDBEntities())
                            {
                                var jArray = jObject["ResumeSummaries"] as JArray;

                                var isSuccessBack = true;

                                if (jArray.Count > 0)
                                {
                                    Global.TotalMatchSuccess += jArray.Count;

                                    Global.TotalDownload += jArray.Count;

                                    var matchedResult = jArray.Select(s => new ResumeMatchResult
                                    {
                                        Cellphone    = (string)s["Cellphone"],
                                        Email        = (string)s["Email"],
                                        ResumeNumber = ((string)s["ResumeNumber"]).Substring(0, 10),
                                        Status       = 2
                                    }).ToList();

                                    var data = RequestFactory.QueryRequest(Global.PostResumesUrl, JsonConvert.SerializeObject(matchedResult), RequestEnum.POST, contentType: "application/json");

                                    if (!data.Contains("成功"))
                                    {
                                        isSuccessBack = false;
                                    }
                                }

                                foreach (var item in jArray)
                                {
                                    var resumeId = (string)item["ResumeId"];

                                    var resume = db.ResumeRecord.FirstOrDefault(f => f.ResumeId == resumeId);

                                    filterResult.RemoveAll(f => f.ResumeNumber == (string)item["ResumeNumber"] && f.UserMasterExtId == (string)item["UserMasterExtendId"]);

                                    if (resume != null)
                                    {
                                        resume.LibraryExist   = 1;
                                        resume.Status         = (short)ResumeRecordStatus.DownLoadSuccess;
                                        resume.DownLoadTime   = DateTime.UtcNow;
                                        resume.Cellphone      = (string)item["Cellphone"];
                                        resume.Email          = (string)item["Email"];
                                        resume.PostBackStatus = isSuccessBack ? (short)1 : (short)2;
                                    }
                                }

                                db.SaveChanges();
                            }
                        }
                    }
                }
            }

            return(filterResult);
        }