Commit 2edeb5eb authored by liudong1993's avatar liudong1993

1

parent f75e6ce6
......@@ -12577,11 +12577,11 @@ namespace REBORN.Module.SellModule
}
//删除菜单提醒
var dlist = new RB_Sys_Menu_InformationRepository().GetList(new RB_Sys_Menu_Information_Extend() { Rb_GroupId = model.RB_Group_Id, SourceId = model.OrderId, SourceType = 3, MsgType = 6 });
if (dlist.Any())
{
new RB_Sys_Menu_InformationRepository().DeleteBatch(dlist);
}
//var dlist = new RB_Sys_Menu_InformationRepository().GetList(new RB_Sys_Menu_Information_Extend() { Rb_GroupId = model.RB_Group_Id, SourceId = model.OrderId, SourceType = 3, MsgType = 6 });
//if (dlist.Any())
//{
// new RB_Sys_Menu_InformationRepository().DeleteBatch(dlist);
//}
#region 国内游订单
//if (model.MiniAppUserId > 0 && model.Income > 0)
......@@ -12609,197 +12609,197 @@ namespace REBORN.Module.SellModule
#region 推送b2b看板
var dmodel = model;
if (dmodel.OrderForm == OrderFormEnum.B2BAndroid || dmodel.OrderForm == OrderFormEnum.B2BApple || dmodel.OrderForm == OrderFormEnum.B2BApplet || dmodel.OrderForm == OrderFormEnum.Applet || (dmodel.OrderForm == OrderFormEnum.Computer && dmodel.OrderSource == OrderSourceEnum.B2B))
{
try
{
B2BTravelStatisticsModel b2BTravelStatistics = B2BTravelStatisticsReidsCache.Get(0);
if (b2BTravelStatistics != null)
{
//更新订单相关的
if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
{
b2BTravelStatistics.OrderNum--;
b2BTravelStatistics.TotalMoney -= (dmodel.PreferPrice ?? 0);//今日交易额
}
if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
{
b2BTravelStatistics.YearTotalMoney -= (dmodel.PreferPrice ?? 0);//累计交易额
}
b2BTravelStatistics.DiscountMoney -= (dmodel.DiscountMoney ?? 0);//优惠金额
b2BTravelStatistics.BigEnvelopeMoney += (dmodel.RedEnvelopeMoney ?? 0);//大红包余额
if (EnvelopeSure)
{
b2BTravelStatistics.RebateMoney -= (dmodel.RedEnvelopeMoney ?? 0);//累计返佣
}
#region 趋势
if (b2BTravelStatistics.TotalMoney >= b2BTravelStatistics.YesterdayTotalMoney)
{
b2BTravelStatistics.ToDayMoneyChange = 1;
}
else
{
b2BTravelStatistics.ToDayMoneyChange = 2;
}
if (b2BTravelStatistics.YearTotalMoney >= b2BTravelStatistics.YesterdayYearTotalMoney)
{
b2BTravelStatistics.YearMoneyChange = 1;
}
else
{
b2BTravelStatistics.YearMoneyChange = 2;
}
#endregion
#region 订单占比
if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
{
var tmodel = TModel;
//if (tmodel.TeamType == TeamTypeEnum.PacketGroup)
//if (dmodel.OrderForm == OrderFormEnum.B2BAndroid || dmodel.OrderForm == OrderFormEnum.B2BApple || dmodel.OrderForm == OrderFormEnum.B2BApplet || dmodel.OrderForm == OrderFormEnum.Applet || (dmodel.OrderForm == OrderFormEnum.Computer && dmodel.OrderSource == OrderSourceEnum.B2B))
//{
// var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "自由行").FirstOrDefault();
// try
// {
// B2BTravelStatisticsModel b2BTravelStatistics = B2BTravelStatisticsReidsCache.Get(0);
// if (b2BTravelStatistics != null)
// {
// //更新订单相关的
// if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
// {
// b2BTravelStatistics.OrderNum--;
// b2BTravelStatistics.TotalMoney -= (dmodel.PreferPrice ?? 0);//今日交易额
// }
// if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
// {
// b2BTravelStatistics.YearTotalMoney -= (dmodel.PreferPrice ?? 0);//累计交易额
// }
// b2BTravelStatistics.DiscountMoney -= (dmodel.DiscountMoney ?? 0);//优惠金额
// b2BTravelStatistics.BigEnvelopeMoney += (dmodel.RedEnvelopeMoney ?? 0);//大红包余额
// if (EnvelopeSure)
// {
// b2BTravelStatistics.RebateMoney -= (dmodel.RedEnvelopeMoney ?? 0);//累计返佣
// }
// #region 趋势
// if (b2BTravelStatistics.TotalMoney >= b2BTravelStatistics.YesterdayTotalMoney)
// {
// b2BTravelStatistics.ToDayMoneyChange = 1;
// }
// else
// {
// b2BTravelStatistics.ToDayMoneyChange = 2;
// }
// if (b2BTravelStatistics.YearTotalMoney >= b2BTravelStatistics.YesterdayYearTotalMoney)
// {
// b2BTravelStatistics.YearMoneyChange = 1;
// }
// else
// {
// b2BTravelStatistics.YearMoneyChange = 2;
// }
// #endregion
// #region 订单占比
// if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
// {
// var tmodel = TModel;
// //if (tmodel.TeamType == TeamTypeEnum.PacketGroup)
// //{
// // var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "自由行").FirstOrDefault();
// // bmodel.Count--;
// //}
// if (tmodel.TeamType == TeamTypeEnum.OneDayTrip)
// {
// var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "一日游").FirstOrDefault();
// bmodel.Count--;
//}
if (tmodel.TeamType == TeamTypeEnum.OneDayTrip)
{
var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "一日游").FirstOrDefault();
bmodel.Count--;
}
else if (dmodel.GroupType == OrderJoinType.SingleAirTicket)
{
var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "机票").FirstOrDefault();
bmodel.Count--;
}
else
{
var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "跟团游").FirstOrDefault();
bmodel.Count--;
}
var bTotal = b2BTravelStatistics.OrderTypeRatio.Sum(x => x.Count);
if (bTotal != 0)
{
foreach (var item in b2BTravelStatistics.OrderTypeRatio)
{
item.Ratio = Math.Round(Convert.ToDecimal(item.Count) / Convert.ToDecimal(bTotal), 4, MidpointRounding.AwayFromZero) * 100;
}
}
}
if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
{
var tmodel = TModel;
//if (tmodel.TeamType == TeamTypeEnum.PacketGroup)
//{
// var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "自由行").FirstOrDefault();
// }
// else if (dmodel.GroupType == OrderJoinType.SingleAirTicket)
// {
// var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "机票").FirstOrDefault();
// bmodel.Count--;
//}
if (tmodel.TeamType == TeamTypeEnum.OneDayTrip)
{
var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "一日游").FirstOrDefault();
bmodel.Count--;
}
else if (dmodel.GroupType == OrderJoinType.SingleAirTicket)
{
var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "机票").FirstOrDefault();
bmodel.Count--;
}
else
{
var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "跟团游").FirstOrDefault();
bmodel.Count--;
}
var bTotal = b2BTravelStatistics.YearOrderTypeRatio.Sum(x => x.Count);
if (bTotal != 0)
{
foreach (var item in b2BTravelStatistics.YearOrderTypeRatio)
{
item.Ratio = Math.Round(Convert.ToDecimal(item.Count) / Convert.ToDecimal(bTotal), 4, MidpointRounding.AwayFromZero) * 100;
}
}
}
#endregion
#region 订单交易额占比
if (dmodel.OrderForm == OrderFormEnum.Computer && dmodel.OrderSource == OrderSourceEnum.B2B)
{
if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
{
var bmodel = b2BTravelStatistics.ToDayPlatformTrade.Where(x => x.Name == "PC").FirstOrDefault();
bmodel.Money -= (dmodel.PreferPrice ?? 0);
}
if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
{
var ymodel = b2BTravelStatistics.YearPlatformTrade.Where(x => x.Name == "PC").FirstOrDefault();
ymodel.Money -= (dmodel.PreferPrice ?? 0);
}
}
else if (dmodel.OrderForm == OrderFormEnum.B2BAndroid || dmodel.OrderForm == OrderFormEnum.B2BApple)
{
if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
{
var bmodel = b2BTravelStatistics.ToDayPlatformTrade.Where(x => x.Name == "APP").FirstOrDefault();
bmodel.Money -= (dmodel.PreferPrice ?? 0);
}
if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
{
var ymodel = b2BTravelStatistics.YearPlatformTrade.Where(x => x.Name == "APP").FirstOrDefault();
ymodel.Money -= (dmodel.PreferPrice ?? 0);
}
}
else if (dmodel.OrderForm == OrderFormEnum.B2BApplet || dmodel.OrderForm == OrderFormEnum.Applet)
{
if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
{
var bmodel = b2BTravelStatistics.ToDayPlatformTrade.Where(x => x.Name == "小程序").FirstOrDefault();
bmodel.Money -= (dmodel.PreferPrice ?? 0);
}
if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
{
var ymodel = b2BTravelStatistics.YearPlatformTrade.Where(x => x.Name == "小程序").FirstOrDefault();
ymodel.Money -= (dmodel.PreferPrice ?? 0);
}
}
var bmTotal = b2BTravelStatistics.ToDayPlatformTrade.Sum(x => x.Money);
var ymTotal = b2BTravelStatistics.YearPlatformTrade.Sum(x => x.Money);
if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
{
if (bmTotal != 0)
{
foreach (var item in b2BTravelStatistics.ToDayPlatformTrade)
{
item.Ratio = Math.Round(Convert.ToDecimal(item.Money) / Convert.ToDecimal(bmTotal), 4, MidpointRounding.AwayFromZero) * 100;
}
}
}
if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
{
if (ymTotal != 0)
{
foreach (var item in b2BTravelStatistics.YearPlatformTrade)
{
item.Ratio = Math.Round(Convert.ToDecimal(item.Money) / Convert.ToDecimal(ymTotal), 4, MidpointRounding.AwayFromZero) * 100;
}
}
}
// }
// else
// {
// var bmodel = b2BTravelStatistics.OrderTypeRatio.Where(x => x.Name == "跟团游").FirstOrDefault();
// bmodel.Count--;
// }
// var bTotal = b2BTravelStatistics.OrderTypeRatio.Sum(x => x.Count);
// if (bTotal != 0)
// {
// foreach (var item in b2BTravelStatistics.OrderTypeRatio)
// {
// item.Ratio = Math.Round(Convert.ToDecimal(item.Count) / Convert.ToDecimal(bTotal), 4, MidpointRounding.AwayFromZero) * 100;
// }
// }
// }
// if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
// {
// var tmodel = TModel;
// //if (tmodel.TeamType == TeamTypeEnum.PacketGroup)
// //{
// // var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "自由行").FirstOrDefault();
// // bmodel.Count--;
// //}
// if (tmodel.TeamType == TeamTypeEnum.OneDayTrip)
// {
// var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "一日游").FirstOrDefault();
// bmodel.Count--;
// }
// else if (dmodel.GroupType == OrderJoinType.SingleAirTicket)
// {
// var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "机票").FirstOrDefault();
// bmodel.Count--;
// }
// else
// {
// var bmodel = b2BTravelStatistics.YearOrderTypeRatio.Where(x => x.Name == "跟团游").FirstOrDefault();
// bmodel.Count--;
// }
// var bTotal = b2BTravelStatistics.YearOrderTypeRatio.Sum(x => x.Count);
// if (bTotal != 0)
// {
// foreach (var item in b2BTravelStatistics.YearOrderTypeRatio)
// {
// item.Ratio = Math.Round(Convert.ToDecimal(item.Count) / Convert.ToDecimal(bTotal), 4, MidpointRounding.AwayFromZero) * 100;
// }
// }
// }
// #endregion
// #region 订单交易额占比
// if (dmodel.OrderForm == OrderFormEnum.Computer && dmodel.OrderSource == OrderSourceEnum.B2B)
// {
// if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
// {
// var bmodel = b2BTravelStatistics.ToDayPlatformTrade.Where(x => x.Name == "PC").FirstOrDefault();
// bmodel.Money -= (dmodel.PreferPrice ?? 0);
// }
// if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
// {
// var ymodel = b2BTravelStatistics.YearPlatformTrade.Where(x => x.Name == "PC").FirstOrDefault();
// ymodel.Money -= (dmodel.PreferPrice ?? 0);
// }
// }
// else if (dmodel.OrderForm == OrderFormEnum.B2BAndroid || dmodel.OrderForm == OrderFormEnum.B2BApple)
// {
// if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
// {
// var bmodel = b2BTravelStatistics.ToDayPlatformTrade.Where(x => x.Name == "APP").FirstOrDefault();
// bmodel.Money -= (dmodel.PreferPrice ?? 0);
// }
// if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
// {
// var ymodel = b2BTravelStatistics.YearPlatformTrade.Where(x => x.Name == "APP").FirstOrDefault();
// ymodel.Money -= (dmodel.PreferPrice ?? 0);
// }
// }
// else if (dmodel.OrderForm == OrderFormEnum.B2BApplet || dmodel.OrderForm == OrderFormEnum.Applet)
// {
// if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
// {
// var bmodel = b2BTravelStatistics.ToDayPlatformTrade.Where(x => x.Name == "小程序").FirstOrDefault();
// bmodel.Money -= (dmodel.PreferPrice ?? 0);
// }
// if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
// {
// var ymodel = b2BTravelStatistics.YearPlatformTrade.Where(x => x.Name == "小程序").FirstOrDefault();
// ymodel.Money -= (dmodel.PreferPrice ?? 0);
// }
// }
// var bmTotal = b2BTravelStatistics.ToDayPlatformTrade.Sum(x => x.Money);
// var ymTotal = b2BTravelStatistics.YearPlatformTrade.Sum(x => x.Money);
// if (dmodel.CreateDate.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
// {
// if (bmTotal != 0)
// {
// foreach (var item in b2BTravelStatistics.ToDayPlatformTrade)
// {
// item.Ratio = Math.Round(Convert.ToDecimal(item.Money) / Convert.ToDecimal(bmTotal), 4, MidpointRounding.AwayFromZero) * 100;
// }
// }
// }
// if (dmodel.CreateDate.Value.ToString("yyyy") == DateTime.Now.ToString("yyyy"))
// {
// if (ymTotal != 0)
// {
// foreach (var item in b2BTravelStatistics.YearPlatformTrade)
// {
// item.Ratio = Math.Round(Convert.ToDecimal(item.Money) / Convert.ToDecimal(ymTotal), 4, MidpointRounding.AwayFromZero) * 100;
// }
// }
// }
#endregion
// #endregion
if (b2BTravelStatistics.YearOrderTypeRatio == null)
{
LogHelper.Write(null, "b2b看板 年度订单占比为null了 地址11");
}
DataCacheService.taskQueue.Enqueue(() => B2BTravelStatisticsReidsCache.Set(b2BTravelStatistics, CacheManager.DataStatistic.Enum.PublishB2BMsgEnum.TradeInfo));
}
}
catch (Exception ex)
{
LogHelper.Write(ex, "RemoveOrder");
}
}
// if (b2BTravelStatistics.YearOrderTypeRatio == null)
// {
// LogHelper.Write(null, "b2b看板 年度订单占比为null了 地址11");
// }
// DataCacheService.taskQueue.Enqueue(() => B2BTravelStatisticsReidsCache.Set(b2BTravelStatistics, CacheManager.DataStatistic.Enum.PublishB2BMsgEnum.TradeInfo));
// }
// }
// catch (Exception ex)
// {
// LogHelper.Write(ex, "RemoveOrder");
// }
//}
#endregion
orderRepository.DBSession.Commit();
//数据统计
DataCacheService.taskQueue.Enqueue(() => DataCacheService.CancelOrder(ID));
//DataCacheService.taskQueue.Enqueue(() => DataCacheService.CancelOrder(ID));
//踢人出群
if (Config.GetAppSetting("OpenPriceCreateTeam").Equals("true") && TModel != null)
{
......@@ -12812,68 +12812,68 @@ namespace REBORN.Module.SellModule
}
//发送通知
#region 发送推送
RB_Employee emp = employeeRepository.GetEntity(TModel.CreateBy.Value);
string EmName = CacheManager.User.RbUserCache.GetEmployee(model.EnterID ?? 0)?.EmName ?? "";
//RB_Employee emp = employeeRepository.GetEntity(TModel.CreateBy.Value);
//string EmName = CacheManager.User.RbUserCache.GetEmployee(model.EnterID ?? 0)?.EmName ?? "";
List<EmAccoutIdModel> account = new List<EmAccoutIdModel>();
if (emp != null && emp.EmployeeId > 0 && (model.EnterID ?? 0) == userInfo.EmployeeId)
{
//根据部门id 查询出部门负责人
var depmodel = departmentRepository.GetEntity(emp.RB_Department_Id);
int depManagementId = depmodel.DepartmentManager ?? 0;
bool IsSendDepManagement = false;
//查询整个组的人
var employeeList = employeeRepository.GetList(new RB_Employee_Extend { RB_Department_Id = emp.RB_Department_Id, RB_Branch_id = -1 });
if (employeeList != null && employeeList.Any())
{
foreach (var item in employeeList)
{
if (item.EmployeeId == depManagementId)
{
IsSendDepManagement = true;
}
account = new List<EmAccoutIdModel>
{
new EmAccoutIdModel { EmAccount = item.EmLoginMobile, EmployeeId = item.EmployeeId }
};
PushAuditMessage(account, TModel.TCID, "团:" + TModel.TCNUM + " 下订单:" + model.OrderId + " 已取消,销售:" + EmName, "订单取消通知", userInfo.EmployeeId, Common.Enum.Log.SysTemPushTypeEnum.Audit);
}
}
if (IsSendDepManagement == false && depManagementId > 0)
{
//给部门负责人发送通知
account = new List<EmAccoutIdModel>();
RB_Employee empDep = employeeRepository.GetEntity(depManagementId);
account.Add(new EmAccoutIdModel { EmAccount = empDep.EmLoginMobile, EmployeeId = empDep.EmployeeId });
PushAuditMessage(account, TModel.TCID, "团:" + TModel.TCNUM + " 下订单:" + model.OrderId + " 已取消,销售:" + EmName, "订单取消通知", userInfo.EmployeeId, Common.Enum.Log.SysTemPushTypeEnum.Audit);
}
}
//List<EmAccoutIdModel> account = new List<EmAccoutIdModel>();
//if (emp != null && emp.EmployeeId > 0 && (model.EnterID ?? 0) == userInfo.EmployeeId)
//{
// //根据部门id 查询出部门负责人
// var depmodel = departmentRepository.GetEntity(emp.RB_Department_Id);
// int depManagementId = depmodel.DepartmentManager ?? 0;
// bool IsSendDepManagement = false;
// //查询整个组的人
// var employeeList = employeeRepository.GetList(new RB_Employee_Extend { RB_Department_Id = emp.RB_Department_Id, RB_Branch_id = -1 });
// if (employeeList != null && employeeList.Any())
// {
// foreach (var item in employeeList)
// {
// if (item.EmployeeId == depManagementId)
// {
// IsSendDepManagement = true;
// }
// account = new List<EmAccoutIdModel>
// {
// new EmAccoutIdModel { EmAccount = item.EmLoginMobile, EmployeeId = item.EmployeeId }
// };
// PushAuditMessage(account, TModel.TCID, "团:" + TModel.TCNUM + " 下订单:" + model.OrderId + " 已取消,销售:" + EmName, "订单取消通知", userInfo.EmployeeId, Common.Enum.Log.SysTemPushTypeEnum.Audit);
// }
// }
// if (IsSendDepManagement == false && depManagementId > 0)
// {
// //给部门负责人发送通知
// account = new List<EmAccoutIdModel>();
// RB_Employee empDep = employeeRepository.GetEntity(depManagementId);
// account.Add(new EmAccoutIdModel { EmAccount = empDep.EmLoginMobile, EmployeeId = empDep.EmployeeId });
// PushAuditMessage(account, TModel.TCID, "团:" + TModel.TCNUM + " 下订单:" + model.OrderId + " 已取消,销售:" + EmName, "订单取消通知", userInfo.EmployeeId, Common.Enum.Log.SysTemPushTypeEnum.Audit);
// }
//}
#endregion
#region 2025每日销售数据展示数据更新
try
{
RB_Travel_Order_Extend orderModel = new RB_Travel_Order_Extend
{
CreateDate = model.CreateDate,
OrderId = model.OrderId,
GuestNum = model.GuestNum,
PreferPrice = model.PreferPrice,
DiscountMoney = model.DiscountMoney,
RedEnvelopeMoney = model.RedEnvelopeMoney,
EnterID = model.EnterID,
};
RB_Travel_Price_Extend priceModel = new RB_Travel_Price_Extend
{
OutBranchId = TModel.OutBranchId,
StartDate = TModel.StartDate,
};
UpdateTodayKanBan(ID, orderModel, priceModel, 1);
}
catch
{
//try
//{
// RB_Travel_Order_Extend orderModel = new RB_Travel_Order_Extend
// {
// CreateDate = model.CreateDate,
// OrderId = model.OrderId,
// GuestNum = model.GuestNum,
// PreferPrice = model.PreferPrice,
// DiscountMoney = model.DiscountMoney,
// RedEnvelopeMoney = model.RedEnvelopeMoney,
// EnterID = model.EnterID,
// };
// RB_Travel_Price_Extend priceModel = new RB_Travel_Price_Extend
// {
// OutBranchId = TModel.OutBranchId,
// StartDate = TModel.StartDate,
// };
// UpdateTodayKanBan(ID, orderModel, priceModel, 1);
//}
//catch
//{
}
//}
#endregion
}
}
......@@ -214,7 +214,7 @@ namespace REBORN.Repository.Dmc
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT g.Status,g.SurName,g.`Name`,g.Tel,g.PassportNo,g.IdCard,g.PassportExpiry,g.PassportIssued,g.OrderId,g.TCID,g.Id,g.passportNo,g.mobilePhone,g.Sex,g.Birthday,g.ApplyStatus,g.VisaManageStatus,g.IsBed,g.VisaType,IFNULL(g.TicketOutType,0) AS TicketOutType
SELECT g.Status,g.SurName,g.`Name`,g.Tel,g.PassportNo,g.IdCard,g.PassportExpiry,g.PassportIssued,g.OrderId,g.TCID,g.Id,g.passportNo,g.mobilePhone,g.Sex,g.Birthday,g.ApplyStatus,g.VisaManageStatus,g.IsBed,g.VisaType,IFNULL(g.TicketOutType,0) AS TicketOutType,g.Remarks
FROM RB_Travel_Guest g
WHERE 1=1
");
......
......@@ -3909,7 +3909,7 @@ namespace REBORN.Services.DMCService
}),
ZaiTu = x.PlatformMoney,
DueInMoney = ((x.TotalPrice ?? 0) - (x.Income ?? 0) + (x.RefundMoney ?? 0) - (x.PlatformTax ?? 0) - (x.DiscountMoney ?? 0) - (x.PlatformMoney)).ToString("#0.00"),
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
VisaPlanIdStr = string.Join(",", x.GuestList.Where(y => (y.VisaPlanId ?? 0) > 0).Select(y => (y.VisaPlanId ?? 0)).Distinct().ToList()),
x.IsFinish,
FinishTime = x.FinishTime.HasValue ? x.FinishTime.Value.ToString("yyyy-MM-dd") : "",
......@@ -5541,7 +5541,7 @@ namespace REBORN.Services.DMCService
y.ApplyMoney,
y.InvoiceApplyState
}),
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
x.FinalPriceTips,
x.Meet,
x.OtherContractList,
......@@ -5680,7 +5680,7 @@ namespace REBORN.Services.DMCService
x.ExpressFeeNum,
x.ServiceFeeNum,
x.IsChargeLossOrders,
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
x.FinalPriceTips,
x.Meet,
x.OtherContractList,
......
......@@ -549,7 +549,7 @@ namespace REBORN.Services.SellService
x.FinalPriceTips,
x.OtherContractList,
ContractType = Common.Enum.ResourceTypeEnum.Hotel,
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
// OrderGuestList = x.OrderGuestList?.Select(z => new { PassportIssued = StringHelper.FormatDate(z?.PassportIssued), PassportExpiry = StringHelper.FormatDate(z?.PassportExpiry), IdCard = z?.IdCard ?? "", Name = z?.Name ?? "", Tel = z?.Tel ?? "", PassportNo = z?.PassportNo ?? "", Birthday = StringHelper.FormatDate(z.Birthday) }),
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 }),
......@@ -1406,7 +1406,7 @@ namespace REBORN.Services.SellService
x.OtherContractList,
ContractType = Common.Enum.ResourceTypeEnum.Hotel,
x.FinalPriceTips,
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
// OrderGuestList = x.OrderGuestList?.Select(z => new { PassportIssued = StringHelper.FormatDate(z?.PassportIssued), PassportExpiry = StringHelper.FormatDate(z?.PassportExpiry), IdCard = z?.IdCard ?? "", Name = z?.Name ?? "", Tel = z?.Tel ?? "", PassportNo = z?.PassportNo ?? "", Birthday = StringHelper.FormatDate(z.Birthday) }),
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 ?? "" }),
......@@ -1715,7 +1715,7 @@ namespace REBORN.Services.SellService
x.SaleRate,
x.ManagerRate,
PlacplaceDepartureStr = x.PlacplaceDeparture == 1 ? "国内" : (x.PlacplaceDeparture == 2 ? "国外" : ""),
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
// OrderGuestList = x.OrderGuestList?.Select(z => new { PassportIssued = StringHelper.FormatDate(z?.PassportIssued), PassportExpiry = StringHelper.FormatDate(z?.PassportExpiry), IdCard = z?.IdCard ?? "", Name = z?.Name ?? "", Tel = z?.Tel ?? "", PassportNo = z?.PassportNo ?? "", Birthday = StringHelper.FormatDate(z.Birthday) }),
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 }),
......@@ -2771,7 +2771,7 @@ namespace REBORN.Services.SellService
x.SaleRate,
x.ManagerRate,
PlacplaceDepartureStr = x.PlacplaceDeparture == 1 ? "国内" : (x.PlacplaceDeparture == 2 ? "国外" : ""),
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
// OrderGuestList = x.OrderGuestList?.Select(z => new { PassportIssued = StringHelper.FormatDate(z?.PassportIssued), PassportExpiry = StringHelper.FormatDate(z?.PassportExpiry), IdCard = z?.IdCard ?? "", Name = z?.Name ?? "", Tel = z?.Tel ?? "", PassportNo = z?.PassportNo ?? "", Birthday = StringHelper.FormatDate(z.Birthday) }),
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 ?? "" }),
......@@ -3425,7 +3425,7 @@ namespace REBORN.Services.SellService
x.OPRemark,
x.Meet,
x.FinalPriceTips,
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
OrderGuestList = x.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
//OrderGuestList = x.OrderGuestList.Select(y => new
//{
// Birthday = y.Birthday.HasValue ? y.Birthday.Value.ToString("yyyy-MM-dd") : "",
......@@ -3566,7 +3566,7 @@ namespace REBORN.Services.SellService
DepartTime = model.DepartTime.HasValue ? model.DepartTime.Value.ToString("yyyy-MM-dd") : "",
model.Meet,
model.FinalPriceTips,
OrderGuestList = model.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
OrderGuestList = model.OrderGuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.OrderId, Name = subItem?.Name ?? "", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }),
//OrderGuestList = model.OrderGuestList.Select(x => new
//{
// Birthday = x.Birthday.HasValue ? x.Birthday.Value.ToString("yyyy-MM-dd") : "",
......
......@@ -11725,7 +11725,7 @@ namespace REBORN.Services.SellService
y.ApplyMoney,
y.InvoiceApplyState
}),
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
GuestList = x.GuestList.Select(subItem => new { GuestId = subItem.Id, subItem?.Remarks, Tel = subItem?.Tel ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.VisaType, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
IsShowDisclaimer = (x?.GuestList?.Where(z => z.DisclaimerId > 0).Count() == x?.GuestList?.Count()) ? 0 : 1,
CancelGuestList = x.CancelGuestList.Select(subItem => new { GuestId = subItem.Id, subItem.IsApplyPhoto, subItem.OrderId, userName = subItem.SurName + subItem.Name, subItem.PassportNo, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone, subItem.TicketOutType, subItem.TicketOutTypeStr, subItem.ProtocolId, subItem.DisclaimerId }),
PhotoNum = x.PhotoNum ?? 0,
......
......@@ -5030,20 +5030,20 @@ namespace REBORN.Services.SellService
{
return ApiResult.ParamIsNull("团信息不存在,请核实后再试");
}
if (TravelModel.StartDate <= DateTime.Now)
{
return ApiResult.ParamIsNull("团已出发,不能取消订单");
}
int oldGuestNum = sellOrderModule.GetTravelOrderGuestNumModule((orderModel?.TCID ?? 0));
//if (TravelModel.StartDate <= DateTime.Now)
//{
// return ApiResult.ParamIsNull("团已出发,不能取消订单");
//}
//int oldGuestNum = sellOrderModule.GetTravelOrderGuestNumModule((orderModel?.TCID ?? 0));//画途 暂时不要
bool flag = sellOrderModule.RemoveOrder(ID, userInfo);
if (flag)
{
// SendSignalr(0, TravelModel.StartDate);
int newGuestNum = sellOrderModule.GetTravelOrderGuestNumModule((orderModel?.TCID ?? 0));
if (oldGuestNum != newGuestNum)
{
sellOrderModule.PushOrderNumChangeMessageModule((orderModel?.TCID ?? 0), oldGuestNum, newGuestNum);
}
//int newGuestNum = sellOrderModule.GetTravelOrderGuestNumModule((orderModel?.TCID ?? 0));//画途 暂时不要
//if (oldGuestNum != newGuestNum)
//{
// sellOrderModule.PushOrderNumChangeMessageModule((orderModel?.TCID ?? 0), oldGuestNum, newGuestNum);
//}
return ApiResult.Success();
}
else
......
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