Commit 4b0168a4 authored by 黄奎's avatar 黄奎

页面修改

parent d60ffd92
......@@ -1161,73 +1161,8 @@ namespace Edu.Module.Course
}
}
//获取订单列表
orderList = orderRepository.GetOrderListRepository(new RB_Order_ViewModel() { Group_Id = groupId, ClassId = classId, SourceId = SourceId });
if (orderList.Any())
{
string orderIds = string.Join(",", orderList.Select(x => x.OrderId));
//获取备注列表
var remarkList = order_RemarkRepository.GetOrderRemarkListRepository(new RB_Order_Remark_ViewModel() { QOrderIds = orderIds });
//获取名单列表
var guestList = order_GuestRepository.GetOrderGuestListRepository(new RB_Order_Guest_ViewModel() { OrderIds = orderIds });
//获取合同列表
var clist = education_ContractRepository.GetList(new RB_Education_Contract_ViewModel() { Group_Id = groupId, OrderIds = orderIds, Status = -1 }).Where(x => x.Status != 4).ToList();
foreach (var item in orderList)
{
item.SaleRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 1).ToList();
item.TeacherRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 2).ToList();
item.RectorRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 3).ToList();
item.DirectorRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 4).ToList();
item.GuestList = guestList.Where(x => x.OrderId == item.OrderId).ToList();
if (item.GuestList != null && item.GuestList.Count > 0)
{
foreach (var subItem in item.GuestList)
{
var contractModel = clist.Where(x => x.OrderId == item.OrderId && x.GuestId == subItem.Id)?.FirstOrDefault();
subItem.ContractId = contractModel?.Id ?? 0;
subItem.ContractNo = contractModel?.ContractNo ?? "";
subItem.ContractStatus = contractModel?.Status ?? -1;
string ContractStatusStr = "";
if (subItem.ContractStatus == 0)
{
ContractStatusStr = "草稿";
}
else if (subItem.ContractStatus == 1)
{
ContractStatusStr = "提交审核";
}
else if (subItem.ContractStatus == 2)
{
ContractStatusStr = "审核通过";
}
else if (subItem.ContractStatus == 3)
{
ContractStatusStr = "驳回";
}
else if (subItem.ContractStatus == 4)
{
ContractStatusStr = "取消";
}
subItem.ContractStatusStr = ContractStatusStr;
}
}
item.ContractList = clist.Where(x => x.OrderId == item.OrderId).ToList();
var ZList = item.GuestList.Where(x => !item.ContractList.Select(z => z.GuestId).Contains(x.Id)).ToList();
if (ZList.Any() && item.ContractList.Any())
{
foreach (var qitem in ZList)
{
item.ContractList.Add(new RB_Education_Contract_ViewModel()
{
Id = 0,
StudentName = qitem.GuestName,
ContractNo = "",
GuestId = qitem.Id,
Status = 0
});
}
}
}
}
var query = new RB_Order_ViewModel() { Group_Id = groupId, ClassId = classId, SourceId = SourceId };
orderList = OrderPageModule(1, 100000, out _, query);
return orderList;
}
......@@ -2035,6 +1970,7 @@ namespace Edu.Module.Course
#endregion
#region 销售中心
/// <summary>
/// 获取我的订单列表
/// </summary>
......@@ -2044,6 +1980,19 @@ namespace Edu.Module.Course
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_Order_ViewModel> GetMyOrderPageList(int pageIndex, int pageSize, out long count, RB_Order_ViewModel demodel)
{
return OrderPageModule(pageIndex, pageSize, out count, demodel);
}
/// <summary>
/// 获取订单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
private List<RB_Order_ViewModel> OrderPageModule(int pageIndex, int pageSize, out long count, RB_Order_ViewModel demodel)
{
//获取订单列表
var orderList = orderRepository.GetOrderPageRepository(pageIndex, pageSize, out count, demodel);
......
......@@ -265,6 +265,8 @@ namespace Edu.WebApi.Controllers.Course
z.GuestStateStr,
z.ContractNo,
z.ContractId,
z.ContractStatus,
z.ContractStatusStr,
}),
ContractList = x.ContractList.Select(z => 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