Commit f2d17246 authored by liudong1993's avatar liudong1993

1

parent 2edeb5eb
......@@ -367,6 +367,16 @@ namespace REBORN.Model.Entity.Dmc
/// 销售提成比例 (=0 取配置表)
/// </summary>
public decimal SaleRate { get; set; }
/// <summary>
/// 联系人
/// </summary>
public string ContactLXName { get; set; }
/// <summary>
/// 联系人电话
/// </summary>
public string ContactLXNumber { get; set; }
#endregion
}
}
......@@ -331,5 +331,16 @@ namespace REBORN.Model.Entity.Sell
/// 销售提成比例 (=0 取配置表)
/// </summary>
public decimal SaleRate { get; set; }
/// <summary>
/// 联系人
/// </summary>
public string ContactName { get; set; }
/// <summary>
/// 联系人电话
/// </summary>
public string ContactNumber { get; set; }
}
}
......@@ -3223,6 +3223,8 @@ TEL:03-3779-9111";
{ nameof(RB_Sell_VisaOrder.VisaId),model.VisaId},
{ nameof(RB_Sell_VisaOrder.RB_Branch_Id),model.RB_Branch_Id},
{ nameof(RB_Sell_VisaOrder.CreateBy),model.CreateBy},
{ nameof(RB_Sell_VisaOrder.ContactLXName),model.ContactLXName},
{ nameof(RB_Sell_VisaOrder.ContactLXNumber),model.ContactLXNumber},
};
IList<WhereHelper> whereHelpers = new List<WhereHelper>()
{
......
......@@ -212,7 +212,7 @@ namespace REBORN.Module.SellModule
var rairModel = rairlist.Where(x => x.OrderId == item.OrderId).FirstOrDefault();
item.StartDate = rairModel.DepartTime.HasValue ? rairModel.DepartTime.Value.ToString("yyyy-MM-dd") : "";
item.TCNUM = "";
item.GuestName = rairModel.GuestName;
item.GuestName = rairModel.ContactName;
item.GuestId = rairModel.GuestId;
item.Name = rairModel.StartCityName;
item.Description = rairModel.Remark;
......@@ -459,7 +459,7 @@ namespace REBORN.Module.SellModule
var rmodel = rtlist.Where(x => x.Id == item.OrderId).FirstOrDefault();
item.StartDate = rmodel.SendVisaDate.HasValue ? rmodel.SendVisaDate.Value.ToString("yyyy-MM-dd") : "";
item.TCNUM = rmodel.VisaTCNUM;
item.GuestName = rmodel.CRMGuestId > 0 ? guestList.Where(x => x.Id == rmodel.CRMGuestId)?.Select(x => x.SurName + x.Name)?.FirstOrDefault() ?? "" : rmodel.PeopleNum + "人";
item.GuestName = rmodel.ContactLXName;
item.GuestId = rmodel.CRMGuestId;
item.Name = rmodel.Name;
item.Description = rmodel.Remark;
......
......@@ -5592,6 +5592,8 @@ namespace REBORN.Module.SellModule
{ nameof(RB_CRMTicket_Order_Extend.GuestInfo), demodel.GuestInfo},
{ nameof(RB_CRMTicket_Order_Extend.EnterID), demodel.EnterID},
{ nameof(RB_CRMTicket_Order_Extend.EmpBranchId), demodel.EmpBranchId},
{ nameof(RB_CRMTicket_Order_Extend.ContactName), demodel.ContactName},
{ nameof(RB_CRMTicket_Order_Extend.ContactNumber), demodel.ContactNumber},
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
......
......@@ -319,7 +319,7 @@ left join {nameof(RB_Visa_Management)} m on A.{nameof(RB_Sell_VisaProduct.VisaMa
}
if (!string.IsNullOrWhiteSpace(model.ContactName))
{
where += $@" AND g.Name like '%{model.ContactName}%'";
where += $@" AND (A.{nameof(RB_Sell_VisaOrder.ContactLXName)} like '%{model.ContactName}%' or g.Name like '%{model.ContactName}%')";
}
if (model.OpEmpId > 0)
{
......
......@@ -232,7 +232,7 @@ WHERE o.GroupId ={rB_Group_id} and o.IsSaleDrainage =1 and o.OrderStatus <>2 and
}
if (!string.IsNullOrEmpty(demodel.GuestName))
{
where += $@" and g.Name like @GuestName";
where += $@" and ( t.{nameof(RB_CRMTicket_Order_Extend.ContactName)} like @GuestName or g.Name like @GuestName)";
parameters.Add("GuestName", "%" + demodel.GuestName.Trim() + "%");
}
if (demodel.IsMyOrder == 1)
......@@ -364,7 +364,7 @@ ORDER BY t.CreateTime DESC";
}
if (!string.IsNullOrEmpty(demodel.GuestName))
{
where += $@" and g.Name like @GuestName";
where += $@" and ( t.{nameof(RB_CRMTicket_Order_Extend.ContactName)} like @GuestName or g.Name like @GuestName)";
parameters.Add("GuestName", "%" + demodel.GuestName.Trim() + "%");
}
if (demodel.IsMyOrder == 1)
......
......@@ -5027,6 +5027,8 @@ namespace REBORN.Services.DMCService
FinalPriceTips = parm.GetInt("FinalPriceTips"),
Meet = parm.GetDecimal("Meet"),
TotalPrice = parm.GetDecimal("TotalPrice"),
ContactLXName = parm.GetStringValue("ContactLXName"),
ContactLXNumber = parm.GetStringValue("ContactLXNumber"),
};
int createBy = parm.GetInt("CreateBy", 0);
if (createBy > 0)
......@@ -5548,7 +5550,9 @@ namespace REBORN.Services.DMCService
ContractType = Common.Enum.ResourceTypeEnum.Visa,
SupplierModel = new { SupplierId = x?.SupplierModel?.ID ?? 0, SupplierName = x?.SupplierModel?.Name ?? "", Tel = x?.SupplierModel?.Tel ?? "", Contact = x?.SupplierModel?.Contact ?? "", CompanyName = x?.SupplierModel?.CompanyName ?? "", DutyParagraph = x?.SupplierModel?.DutyParagraph ?? "", CompanyPhone = x?.SupplierModel?.CompanyPhone ?? "", OpeningBank = x?.SupplierModel?.OpeningBank ?? "", BankNo = x?.SupplierModel?.BankNo ?? "" },
AppointOPList = x.AppointOPList?.Select(z => new { z.OPId, OPName = CacheManager.User.RbUserCache.GetUserLoginInfo(z.OPId.ToString())?.emName ?? "" }),
x.SaleRate
x.SaleRate,
x.ContactLXName,
x.ContactLXNumber
});
pmodel.count = int.Parse(count.ToString());
pmodel.pageData = data;
......@@ -5688,7 +5692,9 @@ namespace REBORN.Services.DMCService
ContractType = Common.Enum.ResourceTypeEnum.Visa,
SupplierModel = new { SupplierId = x?.SupplierModel?.ID ?? 0, SupplierName = x?.SupplierModel?.Name ?? "", Tel = x?.SupplierModel?.Tel ?? "", Contact = x?.SupplierModel?.Contact ?? "", CompanyName = x?.SupplierModel?.CompanyName ?? "", DutyParagraph = x?.SupplierModel?.DutyParagraph ?? "", CompanyPhone = x?.SupplierModel?.CompanyPhone ?? "", OpeningBank = x?.SupplierModel?.OpeningBank ?? "", BankNo = x?.SupplierModel?.BankNo ?? "" },
AppointOPList = x.AppointOPList?.Select(z => new { z.OPId, OPName = CacheManager.User.RbUserCache.GetUserLoginInfo(z.OPId.ToString())?.emName ?? "", z.CommissionRate, z.CommissionMoney }),
x.SaleRate
x.SaleRate,
x.ContactLXName,
x.ContactLXNumber
});
pmodel.pageData = data;
}
......
......@@ -3452,7 +3452,9 @@ namespace REBORN.Services.SellService
SupplierModel = new { SupplierId = x?.SupplierModel?.ID ?? 0, SupplierName = x?.SupplierModel?.Name ?? "", Tel = x?.SupplierModel?.Tel ?? "", Contact = x?.SupplierModel?.Contact ?? "", CompanyName = x?.SupplierModel?.CompanyName ?? "", DutyParagraph = x?.SupplierModel?.DutyParagraph ?? "", CompanyPhone = x?.SupplierModel?.CompanyPhone ?? "", OpeningBank = x?.SupplierModel?.OpeningBank ?? "", BankNo = x?.SupplierModel?.BankNo ?? "" },
AppointOPList = x.AppointOPList?.Select(z => new { z.OPId, OPName = CacheManager.User.RbUserCache.GetUserLoginInfo(z.OPId.ToString())?.emName ?? "", z.CommissionRate, z.CommissionMoney }),
AppointOPIdList = x.AppointOPList?.Select(z => z.OPId).Distinct().ToList(),
x.SaleRate
x.SaleRate,
x.ContactName,
x.ContactNumber
});
return ApiResult.Success("", new
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment