|
|
@@ -179,6 +179,7 @@ namespace BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Service |
|
|
|
TotalAmount = thisGoods.Price * item.GoodsWeight, |
|
|
|
Id = Guid.NewGuid().ToString(), |
|
|
|
DiningPlateId = thisdiningPlate.Id, |
|
|
|
Price= thisGoods.Price |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
@@ -596,9 +597,33 @@ namespace BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Service |
|
|
|
GroupId = x.GroupId, |
|
|
|
Id = x.Id, |
|
|
|
OrderId = x.OrderId, |
|
|
|
TotalAmount = x.TotalAmount, |
|
|
|
DiningPlateId = x.DiningPlateId, |
|
|
|
Price=x.Price, |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询订单餐盘 |
|
|
|
var diningPlate = await db.Queryable<BPA_WeighOrderDiningPlate>() |
|
|
|
.Where(x => x.WeighOrderId == item.Id) |
|
|
|
.Select(x => new WeighOrderDiningPlateDto() |
|
|
|
{ |
|
|
|
DiningPlateId = x.DiningPlateId, |
|
|
|
OrderId = x.WeighOrderId, |
|
|
|
ChipCode = x.ChipCode, |
|
|
|
QRCode = x.QRCode, |
|
|
|
}).ToListAsync(); |
|
|
|
// item.DiningPlateInfo = diningPlate; |
|
|
|
if (diningPlate != null) |
|
|
|
{ |
|
|
|
foreach (var item2 in diningPlate) |
|
|
|
{ |
|
|
|
var goods = item.GoodsInfo.Where(x => x.DiningPlateId == item2.DiningPlateId).ToList(); |
|
|
|
item2.GoodsInfo = goods; |
|
|
|
} |
|
|
|
item.DiningPlateInfo = diningPlate; |
|
|
|
} |
|
|
|
item.GoodsInfo = item.GoodsInfo |
|
|
|
.GroupBy(x => x.GoodsId) |
|
|
|
.Select(x => new WeighOrderGoodsDto() |
|
|
@@ -611,20 +636,6 @@ namespace BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Service |
|
|
|
OrderId = x.FirstOrDefault()?.OrderId, |
|
|
|
}) |
|
|
|
.ToList(); |
|
|
|
|
|
|
|
//查询订单餐盘 |
|
|
|
var diningPlate = await db.Queryable<BPA_WeighOrderDiningPlate>() |
|
|
|
.Where(x => x.WeighOrderId == item.Id) |
|
|
|
.Select(x => new WeighOrderDiningPlateDto() |
|
|
|
{ |
|
|
|
DiningPlateId = x.DiningPlateId, |
|
|
|
OrderId = x.WeighOrderId, |
|
|
|
ChipCode = x.ChipCode, |
|
|
|
QRCode = x.QRCode, |
|
|
|
}).ToListAsync(); |
|
|
|
item.DiningPlateInfo = diningPlate; |
|
|
|
|
|
|
|
item.TotalAmount = item.GoodsInfo.Sum(x => x.TotalAmount); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@@ -682,6 +693,7 @@ namespace BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Service |
|
|
|
OrderId = x.OrderId, |
|
|
|
DiningPlateId = x.DiningPlateId, |
|
|
|
TotalAmount = x.TotalAmount, |
|
|
|
Price = x.Price, |
|
|
|
}).ToList(); |
|
|
|
} |
|
|
|
|
|
|
|