Commit a7faca18 authored by liudong1993's avatar liudong1993

1

parent 1fd66b99
......@@ -31,9 +31,9 @@ namespace REBORN.Common.Enum.Dmc
Hotel = 3,
/// <summary>
/// 门票
/// 邮轮
/// </summary>
[EnumField("门票")]
[EnumField("邮轮")]
Ticket = 4,
/// <summary>
......
......@@ -388,6 +388,16 @@ namespace REBORN.Model.Extend.Sell
/// 第三方订单号
/// </summary>
public string ThirdOrderNo { get; set; }
/// <summary>
/// 团队主类型
/// </summary>
public int TeamType { get; set; }
/// <summary>
/// 团队类型
/// </summary>
public int PriceTeamType { get; set; }
}
/// <summary>
......
......@@ -234,7 +234,7 @@ namespace REBORN.Module.SellModule
}
var branchList = branchRepository.GetList(new RB_Branch_Extend() { RB_Group_Id = demodel.GroupId, Q_SelectForeign = 1 });
//查询团队
var tclist = travel_PriceRepository.GetTravelPriceListByTCIDs(rtlist.Select(x => x.TCID ?? 0).ToList());
var tclist = travel_PriceRepository.GetTravelPriceListByTCIDs(rtlist.Select(x => x.TCID ?? 0).ToList(), 1);
//查询营收报表利润
List<Model.Extend.DataStatistics.RB_RevenueReport_Extend> ReportList = new List<Model.Extend.DataStatistics.RB_RevenueReport_Extend>();
List<RB_Travel_Order_Extend> OrderPeopleList = new List<RB_Travel_Order_Extend>();
......@@ -254,11 +254,23 @@ namespace REBORN.Module.SellModule
foreach (var item in travellist)
{
var rmodel = rtlist.Where(x => x.OrderId == item.OrderId).FirstOrDefault();
var tcmodel = tclist.Where(x => x.TCID == item.TCID).FirstOrDefault();
item.StartDate = rmodel.StartDate.HasValue ? rmodel.StartDate.Value.ToString("yyyy-MM-dd") : "";
item.TCNUM = rmodel.TCNUM;
item.TeamType = rmodel.TeamType ?? 0;
item.PriceTeamType = (int)(tcmodel?.PriceTeamType ?? PriceTeamTypeEnum.SanPing);
if (rmodel.TeamType == 1 && (tcmodel?.PriceTeamType ?? PriceTeamTypeEnum.SanPing) == PriceTeamTypeEnum.SanPing)
{
item.TCNUM += "(定制团)";
}
else if (rmodel.TeamType == 1 && (tcmodel?.PriceTeamType ?? PriceTeamTypeEnum.SanPing) == PriceTeamTypeEnum.OutTravel)
{
item.TCNUM += "(定制团)";
}
item.GuestName = rmodel.CRMGuestId > 0 ? guestList.Where(x => x.Id == rmodel.CRMGuestId)?.Select(x => x.SurName + x.Name)?.FirstOrDefault() ?? "" : rmodel.ContactName;
item.GuestId = rmodel.CRMGuestId;
item.Name = rmodel.LineName + "/" + rmodel.LtName;
if (string.IsNullOrEmpty(rmodel.LineName)) { item.Name = tcmodel?.Title ?? ""; }
item.Description = rmodel.GuestNum + "/" + (rmodel.YSeatNum > 0 ? rmodel.YSeatNum + "Y" : "") + (rmodel.ESeatNum > 0 ? rmodel.ESeatNum + "E" : "") + (rmodel.FSeatNum > 0 ? rmodel.FSeatNum + "F" : "");
item.Money = (rmodel.PreferPrice ?? 0) - (rmodel.DiscountMoney ?? 0) - (rmodel.RedEnvelopeMoney ?? 0);
item.Income = rmodel.Income ?? 0;
......@@ -297,7 +309,7 @@ namespace REBORN.Module.SellModule
{
item.CurrencyName = currencyList.Where(x => x.ID == brmodel.StandardCurrencyId).FirstOrDefault()?.Code;
}
var tcmodel = tclist.Where(x => x.TCID == item.TCID).FirstOrDefault();
if (tcmodel != null)
{
if (tcmodel.TeamType > 0 || tcmodel.PriceTeamType == Common.Enum.Dmc.PriceTeamTypeEnum.SingleService)
......
......@@ -241,7 +241,7 @@ WHERE o.RB_Group_Id ={demodel.GroupId} {(demodel.BranchId > 0 ? " and (e.RB_Bran
}
else if (i == 1)
{
//wheres[i] += $" and c.Title like @ProductName";
wheres[i] += $" and c.Title like @ProductName";
}
else if (i == 6)
{
......
......@@ -172,8 +172,8 @@ namespace REBORN.Services.SellService
/// <returns></returns>
public virtual ApiResult GetOrderTypeEnumList(RequestParm request)
{
var list = EnumHelper.GetEnumList(typeof(CRMMergeOrderTypeEnum));
return ApiResult.Success("", list.OrderBy(x => Convert.ToInt32(x.Value)).Select(x => new { Id = x.Value, Name = x.Key }));
var list = EnumHelper.GetEnumList(typeof(CRMMergeOrderTypeEnum));
return ApiResult.Success("", list.Where(x => x.Value != "7").OrderBy(x => Convert.ToInt32(x.Value)).Select(x => new { Id = x.Value, Name = x.Key }));
}
/// <summary>
......
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