/// <summary>
        /// ���㵱ǰ��Ӧ����Leads��ƥ��״̬
        /// </summary>
        /// <param name="leadsCollection">Ҫ���в�����MatchedTargetId�����Leads</param>
        /// <returns>LeadMatchStatus</returns>
        private void GetMatchStatus()
        {
            MatchedLeadInfo leadInfo = targetItem as MatchedLeadInfo;
            if (leadInfo == null)
            {
                return;
            }

            bool isAreaMatch = false;
            bool isIndustryMatch = false;
            int matchedAreaCount=0;

            //�жϵ���ƥ�����
            if (this.serviceAreas == "000000")//��Ӧ��ѡ����ȫ��
            {
                isAreaMatch = true;
                matchStatusDetails.AreaMatchStatus = AreaMatchStatus.FullMatch;
                goto __CHKINDUSTRY__;
            }
            else if (leadInfo.Areas == "000000" && this.serviceAreas == "000000")//Buyerѡ����ȫ��
            {
                isAreaMatch = true;
                matchStatusDetails.AreaMatchStatus = AreaMatchStatus.FullMatch;
                goto __CHKINDUSTRY__;
            }
            else
            {
                foreach (string areaCode in leadInfo.LeadAreasArray)
                {
                    if (this.serviceAreas.IndexOf(areaCode) != -1)//����
                    {
                        isAreaMatch = true;
                        matchStatusDetails.AreaMatchStatus = AreaMatchStatus.FullMatch;
                        matchedAreaCount++;
                        break;
                    }

                    if (!areaCode.EndsWith("0000") && this.serviceAreas.IndexOf(areaCode.Substring(0, 2) + "0000") != -1)//�߼�����
                    {
                        isAreaMatch = true;
                        matchStatusDetails.AreaMatchStatus = AreaMatchStatus.LogicalMatch;
                        break;
                    }
                }
            }

            __CHKINDUSTRY__:
            //�ж���ҵƥ�����
            if (leadInfo.IndustryRequired == false)
            {
                isIndustryMatch = true;
                matchStatusDetails.IndustryMatchStatus = IndustryMatchStatus.FullMatch;
                goto __ENDCHECK__;
            }
            else if (industries == "000000")
            {
                isIndustryMatch = true;
                matchStatusDetails.IndustryMatchStatus = IndustryMatchStatus.FullMatch;
                goto __ENDCHECK__;
            }
            else
            {
                if (industries.IndexOf(leadInfo.BuyerIndustry) != -1)
                {
                    isIndustryMatch = true;
                    matchStatusDetails.IndustryMatchStatus = IndustryMatchStatus.FullMatch;
                    goto __ENDCHECK__;
                }
                else if (industries.IndexOf(leadInfo.BuyerIndustry.Substring(0, 2) + "0000") != -1)
                {
                    isIndustryMatch = true;
                    matchStatusDetails.IndustryMatchStatus = IndustryMatchStatus.LogicalMatch;
                    goto __ENDCHECK__;
                }
            }

            __ENDCHECK__:
            if (isAreaMatch && isIndustryMatch)
            {
                matchStatus = LeadMatchStatus.MatchFull;
                return;
            }

            if (isAreaMatch)
            {
                matchStatus = LeadMatchStatus.MatchArea;
                return;
            }

            if (isIndustryMatch)
            {
                matchStatus = LeadMatchStatus.MatchIndustry;
                return;
            }
        }
 /// <summary>
 /// ���캯��
 /// </summary>
 /// <param name="target">Ŀ��Leads</param>
 private MatchedSupplierInfo(IMatchedItem target)
 {
     guid = "";
     email = "";
     companyName = "";
     name = "";
     gender = "";
     address = "";
     phoneNumber = "";
     zip = "";
     website = "";
     nature = "";
     foundedYear = 0;
     regDate = DateTime.MinValue;
     companyBrief = "";
     serviceAreas = "";
     categories = "";
     industries = "";
     categoryLeadsNum = "";
     matchStatusDetails = new LeadMatchStatusDetails();
     matchStatus = LeadMatchStatus.MatchNone;
     targetItem = target;
     mailSent = false;
 }
Beispiel #3
0
 public static ArrayList List(int bid, string cate, string area, bool indusRequire, short natureRequire,LeadCheckStatus chk, LeadMatchStatus mSta, DateTime start, DateTime end, Pager pager)
 {
     return List(bid, cate, area, indusRequire ? (short)1 : (short)0, natureRequire, (short)chk, (short)mSta, start, end, pager);
 }
Beispiel #4
0
 /// <summary>
 /// ����Lead��ƥ��״̬
 /// </summary>
 /// <param name="ids"></param>
 /// <param name="sta"></param>
 /// <returns></returns>
 public static int SetMatchStatus(string ids, LeadMatchStatus sta)
 {
     return SetStatus(ids, (short)sta, "MATCH");
 }
Beispiel #5
0
 public static ArrayList List(int bid, string cate, string area, LeadCheckStatus chk, LeadMatchStatus mSta, Pager pager)
 {
     return List(bid, cate, area, (short)-1, (short)-2, (short)chk, (short)mSta, DateTime.MinValue, DateTime.MinValue, pager);
 }
Beispiel #6
0
 public static ArrayList List(string cate, LeadMatchStatus mSta, DateTime start, DateTime end, Pager pager)
 {
     return List(0, cate, "", (short)-1, (short)-2, (short)-1, (short)mSta, start, end, pager);
 }
Beispiel #7
0
 public static ArrayList List(string cate, LeadCheckStatus chk, LeadMatchStatus mSta, Pager pager)
 {
     return List(0, cate, "", (short)-1, (short)-2, (short)chk, (short)mSta, DateTime.MinValue, DateTime.MinValue, pager);
 }
Beispiel #8
0
 public static ArrayList List(LeadMatchStatus mSta, Pager pager)
 {
     return List(0, "", "", (short)-1, (short)-2, (short)-1, (short)mSta, DateTime.MinValue, DateTime.MinValue, pager);
 }
Beispiel #9
0
 private Lead()
 {
     guid = "";
     category = "";
     buyerId = 0;
     buyerName = "";
     area = "";
     industryRequire = false;
     natureRequire = -1;
     matchStatus = LeadMatchStatus.None;
     publicStatus = 0;
     datetime = DateTime.Now;
 }