@@ -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.Application.AExternalPlatform1.Service.Goods.Dtos; | ||||
using BPA.SAAS.KitChenManage.Comm.Tool; | using BPA.SAAS.KitChenManage.Comm.Tool; | ||||
using BPA.SAAS.KitChenManage.Core.Model; | using BPA.SAAS.KitChenManage.Core.Model; | ||||
@@ -28,15 +29,11 @@ namespace BPA.SAAS.KitChenManage.Application.AExternalPlatform1.Service.Goods.Se | |||||
[HttpPost("/api/goods/Getdevicegoods")] | [HttpPost("/api/goods/Getdevicegoods")] | ||||
public async Task<ResultGoodsResultDto> GetDeviceGoods(string deviceId) | public async Task<ResultGoodsResultDto> GetDeviceGoods(string deviceId) | ||||
{ | { | ||||
var goodsId = await _db.Queryable<BPA_DeviceGoods>() | var goodsId = await _db.Queryable<BPA_DeviceGoods>() | ||||
.Where(x => x.DeviceId == deviceId) | |||||
.Where(x => x.AutoKey.ToString()==deviceId) | |||||
.Select(x => x.GoodsId) | .Select(x => x.GoodsId) | ||||
.ToListAsync(); | .ToListAsync(); | ||||
var data = await GetDeviceGoodspost(goodsId); | var data = await GetDeviceGoodspost(goodsId); | ||||
return data; | return data; | ||||
} | } | ||||
@@ -400,6 +400,11 @@ | |||||
<param name="inputDto"></param> | <param name="inputDto"></param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="P:BPA.SAAS.KitChenManage.Application.Device.Dtos.DeviceGoodsInputDto.AutoKey"> | |||||
<summary> | |||||
AutoKey | |||||
</summary> | |||||
</member> | |||||
<member name="P:BPA.SAAS.KitChenManage.Application.Device.Dtos.ProductTopics.Topics"> | <member name="P:BPA.SAAS.KitChenManage.Application.Device.Dtos.ProductTopics.Topics"> | ||||
<summary> | <summary> | ||||
Topics类 | Topics类 | ||||
@@ -10,6 +10,11 @@ namespace BPA.SAAS.KitChenManage.Application.Device.Dtos | |||||
{ | { | ||||
public string DeviceId { get; set; } | public string DeviceId { get; set; } | ||||
/// <summary> | |||||
/// AutoKey | |||||
/// </summary> | |||||
public int AutoKey { get; set; } | |||||
public List<Goods> GoodsList { get; set; } | public List<Goods> GoodsList { get; set; } | ||||
} | } | ||||
@@ -1,5 +1,6 @@ | |||||
using BPA.Message; | using BPA.Message; | ||||
using BPA.Message.IOT; | using BPA.Message.IOT; | ||||
using BPA.Models.SqlEntity.BPA_Kitchen; | |||||
using BPA.SAAS.KitChenManage.Application.Device.Dtos; | using BPA.SAAS.KitChenManage.Application.Device.Dtos; | ||||
using BPA.SAAS.KitChenManage.Application.Push.Comm; | using BPA.SAAS.KitChenManage.Application.Push.Comm; | ||||
using BPA.SAAS.KitChenManage.Application.Push.奶茶机_v1.Dto; | using BPA.SAAS.KitChenManage.Application.Push.奶茶机_v1.Dto; | ||||
@@ -366,7 +367,6 @@ namespace BPA.SAAS.KitChenManage.Application.Device.Services | |||||
//删除店铺商品 | //删除店铺商品 | ||||
await _db.Deleteable<BPA_DeviceGoods>().Where(it => it.DeviceId == inputDto.DeviceId).ExecuteCommandAsync(); | await _db.Deleteable<BPA_DeviceGoods>().Where(it => it.DeviceId == inputDto.DeviceId).ExecuteCommandAsync(); | ||||
var list = new List<BPA_DeviceGoods>(); | var list = new List<BPA_DeviceGoods>(); | ||||
foreach (var item in inputDto.GoodsList) | foreach (var item in inputDto.GoodsList) | ||||
{ | { | ||||
@@ -376,6 +376,7 @@ namespace BPA.SAAS.KitChenManage.Application.Device.Services | |||||
DeviceId = inputDto.DeviceId, | DeviceId = inputDto.DeviceId, | ||||
GoodsId = item.GoodsId, | GoodsId = item.GoodsId, | ||||
GoodsName = item.GoodsName, | GoodsName = item.GoodsName, | ||||
AutoKey=inputDto.AutoKey | |||||
}); | }); | ||||
} | } | ||||
var res = await _db.Insertable(list).ExecuteCommandAsync(); | var res = await _db.Insertable(list).ExecuteCommandAsync(); | ||||
@@ -60,6 +60,11 @@ | |||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<!-- Badly formed XML comment ignored for member "M:BPA.SAAS.KitChenManage.Core.DbContext.IsSuperAdmin" --> | <!-- Badly formed XML comment ignored for member "M:BPA.SAAS.KitChenManage.Core.DbContext.IsSuperAdmin" --> | ||||
<member name="P:BPA.SAAS.KitChenManage.Core.Model.BPA_DeviceGoods.AutoKey"> | |||||
<summary> | |||||
设备AutoKey | |||||
</summary> | |||||
</member> | |||||
<member name="P:BPA.SAAS.KitChenManage.Core.Model.BPA_DevicePushRecode.Type"> | <member name="P:BPA.SAAS.KitChenManage.Core.Model.BPA_DevicePushRecode.Type"> | ||||
<summary> | <summary> | ||||
下发类型1商品 2物料 3配方 4工艺 | 下发类型1商品 2物料 3配方 4工艺 | ||||
@@ -14,6 +14,11 @@ namespace BPA.SAAS.KitChenManage.Core.Model | |||||
{ | { | ||||
public string DeviceId { get; set; } | public string DeviceId { get; set; } | ||||
/// <summary> | |||||
/// 设备AutoKey | |||||
/// </summary> | |||||
public long AutoKey { get; set; } | |||||
public string GoodsId { get; set; } | public string GoodsId { get; set; } | ||||
public string GoodsName { get; set;} | public string GoodsName { get; set;} | ||||