|
|
@@ -31,9 +31,14 @@ namespace BPA.SAAS.KitChenManage.Application.AExternalPlatform1.Service.Goods.Se |
|
|
|
public async Task<ResultGoodsAndDeviceResultDto> GetDeviceGoods(string deviceId) |
|
|
|
{ |
|
|
|
var goodsId = await _db.Queryable<BPA_DeviceGoods>() |
|
|
|
.Where(x => x.AutoKey.ToString()==deviceId) |
|
|
|
.Where(x => x.AutoKey.ToString() == deviceId) |
|
|
|
.Select(x => x.GoodsId) |
|
|
|
.ToListAsync(); |
|
|
|
var device = await _db.Queryable<BPA_DeviceGoods>().FirstAsync(t => t.AutoKey.ToString() == deviceId); |
|
|
|
if (device != null) |
|
|
|
{ |
|
|
|
goodsId.Insert(0, device.DeviceId); |
|
|
|
} |
|
|
|
var data = await GetDeviceGoodspost(goodsId, deviceId); |
|
|
|
return data; |
|
|
|
} |
|
|
|