|
|
@@ -94,7 +94,17 @@ namespace BPA.KitChen.GroupMeal.Application.Service.OneCard.DiningPlate.Service |
|
|
|
Id = t.Id.SelectAll() |
|
|
|
|
|
|
|
}).ToPageList(inputDto.Current, inputDto.PageSize, ref total); |
|
|
|
|
|
|
|
if (data != null) |
|
|
|
{ |
|
|
|
foreach (var item1 in data) |
|
|
|
{ |
|
|
|
foreach (var item2 in res.Where(item2 => item1.DiningPlateId == item2.Id)) |
|
|
|
{ |
|
|
|
item2.IsOccupy = item1.IsOccupy; |
|
|
|
item2.WeighOrderId = item1.WeighOrderId; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new PageUtil() |
|
|
|
{ |
|
|
@@ -120,7 +130,17 @@ namespace BPA.KitChen.GroupMeal.Application.Service.OneCard.DiningPlate.Service |
|
|
|
|
|
|
|
}).ToPageList(inputDto.Current, inputDto.PageSize, ref total); |
|
|
|
|
|
|
|
|
|
|
|
if (data != null) |
|
|
|
{ |
|
|
|
foreach (var item1 in data) |
|
|
|
{ |
|
|
|
foreach (var item2 in res.Where(item2 => item1.DiningPlateId == item2.Id)) |
|
|
|
{ |
|
|
|
item2.IsOccupy = item1.IsOccupy; |
|
|
|
item2.WeighOrderId = item1.WeighOrderId; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return new PageUtil() |
|
|
|
{ |
|
|
|
Data = res, |
|
|
@@ -270,20 +290,29 @@ namespace BPA.KitChen.GroupMeal.Application.Service.OneCard.DiningPlate.Service |
|
|
|
{ |
|
|
|
var result = new List<DiningPlateOccupyDto>(); |
|
|
|
|
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>(); |
|
|
|
dic.Add("GroupId", CurrentUser.TenantId); |
|
|
|
var url = App.Configuration["GroupMealOrderUrl"] + "api/WeighOrder/GetDiningPlateOccupyInfo"; |
|
|
|
var inputData = JsonConvert.SerializeObject(inputDto); |
|
|
|
var jsonData = HttpHelper.PostData(url, inputData, Encoding.UTF8, "application/json", dic); |
|
|
|
var data = JsonConvert.DeserializeObject<ResultSAASManageDto<List<DiningPlateOccupyDto>>>(jsonData); |
|
|
|
|
|
|
|
if (data.statusCode != 200) |
|
|
|
try |
|
|
|
{ |
|
|
|
throw Oops.Oh(data.errors); |
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>(); |
|
|
|
dic.Add("GroupId", CurrentUser.TenantId); |
|
|
|
var url = App.Configuration["GroupMealOrderUrl"] + "api/WeighOrder/GetDiningPlateOccupyInfo"; |
|
|
|
var inputData = JsonConvert.SerializeObject(inputDto); |
|
|
|
var jsonData = HttpHelper.PostData(url, inputData, Encoding.UTF8, "application/json", dic); |
|
|
|
var data = JsonConvert.DeserializeObject<ResultSAASManageDto<List<DiningPlateOccupyDto>>>(jsonData); |
|
|
|
|
|
|
|
if (data.statusCode != 200) |
|
|
|
{ |
|
|
|
throw Oops.Oh(data.errors); |
|
|
|
} |
|
|
|
return data.data; |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
throw Oops.Oh($"内部请求错误"); |
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
|
|
|
|
return data.data; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|