From 4ec71175ed53fec18ec5c84f3234928136ff0830 Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Tue, 21 May 2024 13:37:36 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=AE=BE=E5=A4=87=E5=95=86=E5=93=81=E6=97=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87Autokey=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E5=AF=B9=E5=A4=96=E6=9F=A5=E8=AF=A2=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?AutoKey=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Goods/Services/GoodsServices.cs | 9 +++------ .../BPA.SAAS.KitChenManage.Application.xml | 5 +++++ .../Device/Dtos/DeviceGoodsInputDto.cs | 5 +++++ .../Device/Services/DevicePushRecodeService.cs | 3 ++- .../BPA.SAAS.KitChenManage.Core.xml | 5 +++++ BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs | 5 +++++ 6 files changed, 25 insertions(+), 7 deletions(-) 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;}