diff --git a/BPA.SAAS.KitChenManage.Application/AExternalPlatform1/Service/Goods/Services/GoodsServices.cs b/BPA.SAAS.KitChenManage.Application/AExternalPlatform1/Service/Goods/Services/GoodsServices.cs index ff22b70..39d7cd6 100644 --- a/BPA.SAAS.KitChenManage.Application/AExternalPlatform1/Service/Goods/Services/GoodsServices.cs +++ b/BPA.SAAS.KitChenManage.Application/AExternalPlatform1/Service/Goods/Services/GoodsServices.cs @@ -1,4 +1,5 @@ -using BPA.SAAS.KitChenManage.Application.AExternalPlatform.BaseDto; +using BPA.Models.SqlEntity.BPA_Kitchen; +using BPA.SAAS.KitChenManage.Application.AExternalPlatform.BaseDto; using BPA.SAAS.KitChenManage.Application.AExternalPlatform1.Service.Goods.Dtos; using BPA.SAAS.KitChenManage.Comm.Tool; using BPA.SAAS.KitChenManage.Core.Model; @@ -28,15 +29,11 @@ namespace BPA.SAAS.KitChenManage.Application.AExternalPlatform1.Service.Goods.Se [HttpPost("/api/goods/Getdevicegoods")] public async Task GetDeviceGoods(string deviceId) { - - var goodsId = await _db.Queryable() - .Where(x => x.DeviceId == deviceId) + .Where(x => x.AutoKey.ToString()==deviceId) .Select(x => x.GoodsId) .ToListAsync(); - var data = await GetDeviceGoodspost(goodsId); - return data; } diff --git a/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml b/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml index c9c828a..4878d80 100644 --- a/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml +++ b/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml @@ -400,6 +400,11 @@ + + + AutoKey + + Topics类 diff --git a/BPA.SAAS.KitChenManage.Application/Device/Dtos/DeviceGoodsInputDto.cs b/BPA.SAAS.KitChenManage.Application/Device/Dtos/DeviceGoodsInputDto.cs index 800a2a8..b28c40d 100644 --- a/BPA.SAAS.KitChenManage.Application/Device/Dtos/DeviceGoodsInputDto.cs +++ b/BPA.SAAS.KitChenManage.Application/Device/Dtos/DeviceGoodsInputDto.cs @@ -10,6 +10,11 @@ namespace BPA.SAAS.KitChenManage.Application.Device.Dtos { public string DeviceId { get; set; } + /// + /// AutoKey + /// + public int AutoKey { get; set; } + public List GoodsList { get; set; } } diff --git a/BPA.SAAS.KitChenManage.Application/Device/Services/DevicePushRecodeService.cs b/BPA.SAAS.KitChenManage.Application/Device/Services/DevicePushRecodeService.cs index 2da2456..088e751 100644 --- a/BPA.SAAS.KitChenManage.Application/Device/Services/DevicePushRecodeService.cs +++ b/BPA.SAAS.KitChenManage.Application/Device/Services/DevicePushRecodeService.cs @@ -1,5 +1,6 @@ using BPA.Message; using BPA.Message.IOT; +using BPA.Models.SqlEntity.BPA_Kitchen; using BPA.SAAS.KitChenManage.Application.Device.Dtos; using BPA.SAAS.KitChenManage.Application.Push.Comm; using BPA.SAAS.KitChenManage.Application.Push.奶茶机_v1.Dto; @@ -366,7 +367,6 @@ namespace BPA.SAAS.KitChenManage.Application.Device.Services //删除店铺商品 await _db.Deleteable().Where(it => it.DeviceId == inputDto.DeviceId).ExecuteCommandAsync(); - var list = new List(); foreach (var item in inputDto.GoodsList) { @@ -376,6 +376,7 @@ namespace BPA.SAAS.KitChenManage.Application.Device.Services DeviceId = inputDto.DeviceId, GoodsId = item.GoodsId, GoodsName = item.GoodsName, + AutoKey=inputDto.AutoKey }); } var res = await _db.Insertable(list).ExecuteCommandAsync(); diff --git a/BPA.SAAS.KitChenManage.Core/BPA.SAAS.KitChenManage.Core.xml b/BPA.SAAS.KitChenManage.Core/BPA.SAAS.KitChenManage.Core.xml index d9b952b..5c60aee 100644 --- a/BPA.SAAS.KitChenManage.Core/BPA.SAAS.KitChenManage.Core.xml +++ b/BPA.SAAS.KitChenManage.Core/BPA.SAAS.KitChenManage.Core.xml @@ -60,6 +60,11 @@ + + + 设备AutoKey + + 下发类型1商品 2物料 3配方 4工艺 diff --git a/BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs b/BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs index bf1b3e3..dc4339f 100644 --- a/BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs +++ b/BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs @@ -14,6 +14,11 @@ namespace BPA.SAAS.KitChenManage.Core.Model { public string DeviceId { get; set; } + /// + /// 设备AutoKey + /// + public long AutoKey { get; set; } + public string GoodsId { get; set; } public string GoodsName { get; set;}