Commit 96f4e2dd authored by liudong1993's avatar liudong1993
parents b65731fe 6de60969
...@@ -3743,6 +3743,8 @@ namespace REBORN.Module.SellModule ...@@ -3743,6 +3743,8 @@ namespace REBORN.Module.SellModule
} }
} }
else else
{
try
{ {
demodel.CouponsId = hotel.ID; demodel.CouponsId = hotel.ID;
#region 组装详情信息 #region 组装详情信息
...@@ -3771,6 +3773,8 @@ namespace REBORN.Module.SellModule ...@@ -3771,6 +3773,8 @@ namespace REBORN.Module.SellModule
orderId = customer_TicketOrderRepository.Insert(demodel); orderId = customer_TicketOrderRepository.Insert(demodel);
demodel.OrderId = orderId; demodel.OrderId = orderId;
if (orderId > 0) if (orderId > 0)
{
try
{ {
foreach (var item in demodel.DetailList) foreach (var item in demodel.DetailList)
{ {
...@@ -3779,6 +3783,12 @@ namespace REBORN.Module.SellModule ...@@ -3779,6 +3783,12 @@ namespace REBORN.Module.SellModule
item.Unit_Price = Math.Round(item.Money / (item?.Num ?? 1), 2); item.Unit_Price = Math.Round(item.Money / (item?.Num ?? 1), 2);
bool flagD = customer_TicketOrderDetailRepository.Insert(item) > 0; bool flagD = customer_TicketOrderDetailRepository.Insert(item) > 0;
} }
}
catch (Exception ex)
{
flag = false;
}
if (!string.IsNullOrEmpty(demodel.DiscountsIds)) if (!string.IsNullOrEmpty(demodel.DiscountsIds))
{ {
int affectNum = coupon_AllotRepository.UserUseCouponAllotForB2C(orderId, Common.Enum.Dmc.DirectGoodsTypeEnum.AttractionTickets, demodel.DiscountsIds); int affectNum = coupon_AllotRepository.UserUseCouponAllotForB2C(orderId, Common.Enum.Dmc.DirectGoodsTypeEnum.AttractionTickets, demodel.DiscountsIds);
...@@ -3801,8 +3811,6 @@ namespace REBORN.Module.SellModule ...@@ -3801,8 +3811,6 @@ namespace REBORN.Module.SellModule
}); });
#region 推送企微机器人消息 #region 推送企微机器人消息
if (userInfo.SimpleEasy == 1) if (userInfo.SimpleEasy == 1)
{ {
string jdName = ticketCouponsRepository.GetEntity(demodel.CouponsId)?.Name ?? ""; string jdName = ticketCouponsRepository.GetEntity(demodel.CouponsId)?.Name ?? "";
...@@ -3830,6 +3838,11 @@ namespace REBORN.Module.SellModule ...@@ -3830,6 +3838,11 @@ namespace REBORN.Module.SellModule
} }
flag = orderId > 0; flag = orderId > 0;
} }
catch (Exception ex)
{
flag = false;
}
}
if (flag) if (flag)
{ {
try try
......
...@@ -2378,13 +2378,13 @@ namespace REBORN.Services.SellService ...@@ -2378,13 +2378,13 @@ namespace REBORN.Services.SellService
Common.Plugin.LogHelper.Write(ex, "SetTeavelTeam"); Common.Plugin.LogHelper.Write(ex, "SetTeavelTeam");
} }
} }
if ((orderGuestList?.Count) == 0) if ((DetailList?.Count) == 0)
{ {
// return ApiResult.ParamIsNull("请填写入住人员名单"); return ApiResult.ParamIsNull("请选择房间类型");
} }
else else
{ {
query.GuestInfo = JsonConvert.SerializeObject(orderGuestList); query.DetailList = DetailList;
} }
RB_TicketCoupons_Ticket ticket = new RB_TicketCoupons_Ticket RB_TicketCoupons_Ticket ticket = new RB_TicketCoupons_Ticket
{ {
...@@ -3351,7 +3351,8 @@ namespace REBORN.Services.SellService ...@@ -3351,7 +3351,8 @@ namespace REBORN.Services.SellService
// y.PassportNo, // y.PassportNo,
// y.Tel // y.Tel
//}), //}),
OtherContractList = x.OtherContractList?.Select(z=> new { OtherContractList = x.OtherContractList?.Select(z => new
{
z.ID, z.ID,
z.T_ContractNum, z.T_ContractNum,
z.CType, z.CType,
...@@ -3752,7 +3753,8 @@ namespace REBORN.Services.SellService ...@@ -3752,7 +3753,8 @@ namespace REBORN.Services.SellService
{ {
demodel.EnterID = userInfo.EmployeeId;//可以设置销售 demodel.EnterID = userInfo.EmployeeId;//可以设置销售
} }
else { else
{
//查询一下 公司别 //查询一下 公司别
demodel.EmpBranchId = CacheManager.User.RbUserCache.GetUserLoginInfo(demodel.EnterID.ToString())?.RB_Branch_id; demodel.EmpBranchId = CacheManager.User.RbUserCache.GetUserLoginInfo(demodel.EnterID.ToString())?.RB_Branch_id;
} }
......
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