diff --git a/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 b/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 index 0836f5a..25996f1 100644 Binary files a/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 and b/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 b/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 index 69cf6ea..54760c3 100644 Binary files a/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 and b/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 differ diff --git a/.vs/BPA.KitChen.GroupMeal/v17/.suo b/.vs/BPA.KitChen.GroupMeal/v17/.suo index b589a09..b62bc77 100644 Binary files a/.vs/BPA.KitChen.GroupMeal/v17/.suo and b/.vs/BPA.KitChen.GroupMeal/v17/.suo differ diff --git a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin index f5c07fc..f535cb4 100644 Binary files a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin and b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin differ diff --git a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin index a088f89..400de6e 100644 Binary files a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin and b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin differ diff --git a/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/DiningPlateService/Service/DiningPlateService.cs b/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/DiningPlateService/Service/DiningPlateService.cs index bcb8622..5a15db3 100644 --- a/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/DiningPlateService/Service/DiningPlateService.cs +++ b/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/DiningPlateService/Service/DiningPlateService.cs @@ -135,7 +135,7 @@ namespace BPA.KitChen.GroupMeal.Application.Service.AExternalPlatform.Service.Di ChipCode = inputDto.ChipCode, GroupId = CurrentUser.TenantId, QRCode = inputDto.QRCode, - IsPay=inputDto.IsPay, + IsPay= inputDto.IsPay, Status = CommonStatus.ENABLE, }).ExecuteCommandAsync(); } diff --git a/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Dtos/DiningPlateDto.cs b/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Dtos/DiningPlateDto.cs index b87bc19..faa3d98 100644 --- a/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Dtos/DiningPlateDto.cs +++ b/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Dtos/DiningPlateDto.cs @@ -35,7 +35,7 @@ namespace BPA.KitChen.GroupMeal.Application.Service.OneCard.DiningPlate.Dtos /// public string ChipCode { get; set; } - public bool IsPay { get; set; } = true; + public bool IsPay { get; set; } } diff --git a/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Service/DiningPlateService.cs b/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Service/DiningPlateService.cs index a1fff4e..38c2e24 100644 --- a/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Service/DiningPlateService.cs +++ b/BPA.KitChen.GroupMeal.Application/Service/OneCard/DiningPlate/Service/DiningPlateService.cs @@ -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(); - Dictionary dic = new Dictionary(); - 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>>(jsonData); - - if (data.statusCode != 200) + try { - throw Oops.Oh(data.errors); + Dictionary dic = new Dictionary(); + 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>>(jsonData); + + if (data.statusCode != 200) + { + throw Oops.Oh(data.errors); + } + return data.data; + } + catch (Exception e) + { + throw Oops.Oh($"内部请求错误"); } + return result; + - return data.data; } ///