Commit e7223959 authored by liudong1993's avatar liudong1993

1

parent ab48d1e7
...@@ -6786,5 +6786,55 @@ namespace REBORN.Module.SellModule ...@@ -6786,5 +6786,55 @@ namespace REBORN.Module.SellModule
return "暂未开放,请联系管理员"; return "暂未开放,请联系管理员";
} }
} }
/// <summary>
/// 获取订单标题信息 55 机票 61酒店 66门票 67包车
/// </summary>
/// <param name="otherType"></param>
/// <param name="orderId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public object GetOrderTitleName(int otherType, int orderId, UserInfo userInfo)
{
if (otherType == 55)
{
var orderModel = cRMTicket_OrderRepository.GetEntity(orderId);
return new
{
Title = orderModel?.StartCityName,
orderModel?.Money,
Contact = orderModel?.ContactName,
Date = (bool)(orderModel?.DepartTime.HasValue) ? orderModel?.DepartTime.Value.ToString("yyyy-MM-dd") : ""
};
}
else if (otherType == 61)
{
var orderModel = hotelOrderRepository.GetEntity(orderId);
var detailModel = hotelOrderDetailRepository.GetList(new RB_Customer_HotelOrderDetail_Extend() { GroupId = userInfo.RB_Group_id, OrderId = orderId }).FirstOrDefault();
var roomModel = hotelOrderRoomRepository.GetList(new RB_Customer_HotelOrderRoom_Extend() { GroupId = userInfo.RB_Group_id, OrderId = orderId }).FirstOrDefault();
return new
{
Title = detailModel?.HotelName + (!string.IsNullOrEmpty(roomModel?.RoomTypeName) ? " " + roomModel?.RoomTypeName : ""),
orderModel?.Money,
Contact = orderModel?.ContactName,
Date = (detailModel.Date.HasValue ? detailModel.Date.Value.ToString("yyyy-MM-dd") : "")
};
}
else if (otherType == 66) {
var orderModel = customer_TicketOrderRepository.GetList(new RB_Customer_TicketOrder_Extend() { GroupId = userInfo.RB_Group_id, OrderIds = orderId.ToString() }).FirstOrDefault();
var detailList = customer_TicketOrderDetailRepository.GetList(new RB_Customer_TicketOrderDetail_Extend() { OrderId = orderId });
string roomName = string.Join(",", detailList.Select(x => x.TicketName).Distinct());
return new
{
Title = orderModel.CouponsName + " " + roomName,
orderModel?.Money,
Contact = orderModel?.Name,
Date = orderModel.UseDate.HasValue ? " " + orderModel.UseDate.Value.ToString("yyyy-MM-dd") : ""
};
}
return null;
}
} }
} }
...@@ -1657,7 +1657,62 @@ namespace REBORN.Module.SellModule ...@@ -1657,7 +1657,62 @@ namespace REBORN.Module.SellModule
} }
return null; return null;
} }
#endregion #endregion
/// <summary>
/// 获取订单的标题名称
/// </summary>
/// <param name="otherType"></param>
/// <param name="orderId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public object GetOrderTitleName(int otherType, int orderId, UserInfo userInfo, int type)
{
if (otherType == 1)
{
if (type == 1)
{
//查询团名称
var pmodel = travel_PriceRepository.GetPriceListRepository(new RB_Travel_Price_Extend() { RB_Group_Id = userInfo.RB_Group_id, TCID = orderId }).FirstOrDefault();
return new
{
pmodel?.Title,
Money = 0,
Contact = "",
Date = pmodel.StartDate.HasValue ? pmodel.StartDate.Value.ToString("yyyy-MM-dd") : ""
};
}
else
{
var orderModel = orderRepository.GetEntity(orderId);
//查询团名称
if (orderModel != null && orderModel.TCID > 0)
{
var pmodel = travel_PriceRepository.GetPriceListRepository(new RB_Travel_Price_Extend() { RB_Group_Id = userInfo.RB_Group_id, TCID = orderModel.TCID ?? 0 }).FirstOrDefault();
return new
{
pmodel?.Title,
Money = orderModel.PreferPrice,
Contact = orderModel.ContactName,
Date = pmodel.StartDate.HasValue ? pmodel.StartDate.Value.ToString("yyyy-MM-dd") : ""
};
}
}
}
else if(otherType==2) {
var orderModel = sell_VisaOrderRepository.GetOrderList(new RB_Sell_VisaOrder_Extend() { RB_Group_Id = userInfo.RB_Group_id, OrderId = orderId }).FirstOrDefault();
return new
{
Title = orderModel?.Name,
Money = orderModel?.TotalPrice,
Contact = orderModel?.ContactLXName,
Date = "-"
};
}
return null;
}
} }
......
...@@ -2340,6 +2340,7 @@ namespace REBORN.Services.FinanceService ...@@ -2340,6 +2340,7 @@ namespace REBORN.Services.FinanceService
model.TCIDList, model.TCIDList,
TCIDAndTCNUMList = model.TCIDAndTCNUMList?.Select(x => new { x.TCID, x.TCNUM }), TCIDAndTCNUMList = model.TCIDAndTCNUMList?.Select(x => new { x.TCID, x.TCNUM }),
model.OrderID, model.OrderID,
model.OrderSource,
model.TemplateId, model.TemplateId,
model.walist, model.walist,
HelpBranchId = model.HelpBranchId ?? -1, HelpBranchId = model.HelpBranchId ?? -1,
......
...@@ -4246,5 +4246,35 @@ namespace REBORN.Services.SellService ...@@ -4246,5 +4246,35 @@ namespace REBORN.Services.SellService
return ApiResult.Success("", RList); return ApiResult.Success("", RList);
} }
#endregion #endregion
#region 获取各订单的标题名称
/// <summary>
/// 获取订单的基础信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public ApiResult GetOrderTitleName(RequestParm request) {
var userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(request.uid);
JObject parms = JObject.Parse(request.msg.ToString());
int OtherType = parms.GetInt("OtherType");//1团队 2单签证, 55 机票 61酒店 66门票 67包车
int OrderId = parms.GetInt("OrderId");
int Type = parms.GetInt("Type");//类型 1使用团队ID
if (OrderId <= 0) { return ApiResult.Failed("参数不正确"); }
if (OtherType <= 2)
{
var robj = sellOrderModule.GetOrderTitleName(OtherType, OrderId, userInfo, Type);
return ApiResult.Success("", robj);
}
else {
var robj = customerOrderModule.GetOrderTitleName(OtherType, OrderId, userInfo);
return ApiResult.Success("", robj);
}
}
#endregion
} }
} }
...@@ -588,6 +588,11 @@ ...@@ -588,6 +588,11 @@
"fullName": "REBORN.Services.SellService.CustomerOrderService", "fullName": "REBORN.Services.SellService.CustomerOrderService",
"method": "GetOrderLogPageList" "method": "GetOrderLogPageList"
}, },
{
"cmd": "ticket_post_GetOrderTitleName", //获取订单标题信息
"fullName": "REBORN.Services.SellService.CustomerOrderService",
"method": "GetOrderTitleName"
},
{ {
"cmd": "ticket_post_GetTicketStatusEnumList", //获取单机票状态枚举 "cmd": "ticket_post_GetTicketStatusEnumList", //获取单机票状态枚举
"fullName": "REBORN.Services.SellService.CustomerOrderService", "fullName": "REBORN.Services.SellService.CustomerOrderService",
......
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