//strproject = "";
strMessagerproject = "";
strphone = "";
strCustomer = "";
strMember = "";
strParentAgency = "";
strAgency = "";
strMemberPhone = "";
strPlaceUserName = "";
strSales = "";
for (int i = 0; i < striplist.Count(); i++)
{
List<string> stripNameList = striplist[i].Trim().Split(new string[] { "齉" }, StringSplitOptions.None).ToList();
if (stripNameList[0].Trim().IndexOf("项目") > -1 || stripNameList[0].Trim().IndexOf("楼盘") > -1)
{
try
{
if (strproject.Trim() == "")
{
strproject=stripNameList[1].Trim();
}
strMessagerproject = stripNameList[1].Trim();
strproject = strproject.Replace("江南桃源霅溪桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("霅溪桃源江南桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("江南桃源·霅溪桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("霅溪桃源·江南桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("江南桃源.霅溪桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("霅溪桃源.江南桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("江南桃源.霅溪桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("霅溪桃源.江南桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("江南桃源·霅溪桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("霅溪桃源·江南桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("霅溪桃源·江南桃源", "霅溪桃源江南桃源");
strproject = strproject.Replace("灜海花墅", "瀛海花墅");
}
catch
{
}
}
//项目:*府 客户:李先生 电话:133****1234 公司:杭州我爱我家有限公司 门店:世纪新城店 经纪人:尤广高 电话:13381661617
if ((stripNameList[0].Trim().IndexOf("客户") > -1 && stripNameList[0].Trim().IndexOf("客户电话") == -1 && stripNameList[0].Trim().IndexOf("客户手机") == -1 && stripNameList[0].Trim().IndexOf("客户号码") == -1 && stripNameList[0].Trim().IndexOf("联系号码") == -1) || stripNameList[0].Trim() == "访客姓名" || stripNameList[0].Trim() == "姓名")
{
try
{
strCustomer = strCustomer + "," + stripNameList[1].Trim();
string strAllPhone = Common.StringUtil.strgetNum(strCustomer);
//客户后直接是号码
if (strAllPhone.Length >= 7)
{
string strLastNum = strAllPhone.Substring((strAllPhone.Length - 4), 4);
int intout = 0;
if (int.TryParse(strLastNum, out intout))
{
strphone = strphone + "," + strAllPhone.Substring(0, 3) + "****" + strAllPhone.Substring((strAllPhone.Length - 4), 4);
}
else
{
strphone = strphone + "," + strAllPhone.Substring(0, 3) + "****" + striplist[i + 1].Substring((striplist[i + 1].Length - 4), 4);
}
}
}
catch
{ }
}
if ((stripNameList[0].Trim().IndexOf("电话") > -1 && stripNameList[0].Trim().IndexOf("电话") < 2) || stripNameList[0].Trim().IndexOf("客户号码") > -1 || stripNameList[0].Trim().IndexOf("客户手机") > -1 || stripNameList[0].Trim().IndexOf("客户电话") > -1 || stripNameList[0].Trim().IndexOf("手机号码") > -1 || stripNameList[0].Trim().IndexOf("联系电话") > -1 || stripNameList[0].Trim() == "手机" || stripNameList[0].Trim().IndexOf("联系号码") > -1 || stripNameList[0].Trim().IndexOf("访客电") > -1 || stripNameList[0].Trim() == "号码" || stripNameList[0].Trim() == "客户联系方式" || stripNameList[0].Trim() == "联系方式")
{
try
{
string strAllPhone = "";
strAllPhone = stripNameList[1].Trim().Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "");
strAllPhone = Common.StringUtil.ReplaceCharstring(strAllPhone.Trim());
strAllPhone = Common.StringUtil.ToDBC(strAllPhone.Trim());
if (strAllPhone.Length >= 7)
{
string strLastNum = strAllPhone.Substring((strAllPhone.Length - 4), 4);
int intout = 0;
if (int.TryParse(strLastNum, out intout))
{
strphone = strphone + "," + strAllPhone.Substring(0, 3) + "****" + strAllPhone.Substring((strAllPhone.Length - 4), 4);
}
else
{
strphone = strphone + "," + strAllPhone.Substring(0, 3) + "****" + striplist[i + 1].Substring((striplist[i + 1].Length - 4), 4);
}
}
else
{
string strLastNum = Common.StringUtil.ReplaceCharstring(striplist[i + 1].ToString());
strLastNum = Common.StringUtil.ToDBC(strLastNum);
if (strLastNum.Length > 4)
{
strphone = strphone + "," + strAllPhone.Substring(0, 3) + "****" + strLastNum.Substring((strLastNum.Length - 4), 4);
}
}
string strlsi = strphone;
}
catch
{
strphone = "";
}
}
if (stripNameList[0].Trim().IndexOf("公司名") > -1 || stripNameList[0].Trim().IndexOf("公司") > -1 || stripNameList[0].Trim().IndexOf("中介名称") > -1 || stripNameList[0].Trim().IndexOf("报备单位") > -1)
{
try
{
strParentAgency = stripNameList[1].Trim();
//strParentAgency = strParentAgency.Replace("事业部", "");
}
catch
{
strParentAgency = "";
}
}
if (stripNameList[0].Trim().IndexOf("门店") > -1)
{
try
{
strAgency = stripNameList[1].Trim();
//strAgency = strAgency.Replace("有限公司分行", "");
}
catch
{ }
}
if (stripNameList[0].Trim().IndexOf("预约") > -1)
{
try
{
strSales = stripNameList[1].Trim();
//strAgency = strAgency.Replace("有限公司分行", "");
}
catch
{ }
}
//获取经纪人姓名
if (strMember.Trim() == "")
{
strMember = strAgent(striplist[i].Trim());
if (strMember.Trim() != "" && strMemberPhone.Trim() == "")
{
try
{
string strTemp = striplist[i + 1];
List<string> listNum = Regex.Matches(strTemp, @"\d+(\.\d+)?").OfType<Match>().Select(t => t.Value).ToList();
strMemberPhone = string.Join("", listNum.ToArray());
if (strMemberPhone.Length < 5)
{
strMemberPhone = "";
}
}
catch
{ }
}
}
//获取经纪人电话
if (strMemberPhone.Trim() == "")
{
strMemberPhone = strAgentPhone(striplist[i].Trim());
}
//获取市场对接人
if (strPlaceUserName.Trim() == "")
{
strPlaceUserName =Common.StringUtil.strTurntesuvalue(strServicer(striplist[i].Trim()));
}
}
if (strParentAgency == "" && strAgency != "")
{
strParentAgency = strAgency;
strAgency = "";
}