Browse Source

opt:设备信息设置设备商品时增加设备Autokey字段,对外查询根据AutoKey查询

master
zhaoy 5 months ago
parent
commit
4ec71175ed
6 changed files with 25 additions and 7 deletions
  1. +3
    -6
      BPA.SAAS.KitChenManage.Application/AExternalPlatform1/Service/Goods/Services/GoodsServices.cs
  2. +5
    -0
      BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml
  3. +5
    -0
      BPA.SAAS.KitChenManage.Application/Device/Dtos/DeviceGoodsInputDto.cs
  4. +2
    -1
      BPA.SAAS.KitChenManage.Application/Device/Services/DevicePushRecodeService.cs
  5. +5
    -0
      BPA.SAAS.KitChenManage.Core/BPA.SAAS.KitChenManage.Core.xml
  6. +5
    -0
      BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs

+ 3
- 6
BPA.SAAS.KitChenManage.Application/AExternalPlatform1/Service/Goods/Services/GoodsServices.cs View File

@@ -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;
} }




+ 5
- 0
BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml View File

@@ -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类


+ 5
- 0
BPA.SAAS.KitChenManage.Application/Device/Dtos/DeviceGoodsInputDto.cs View File

@@ -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; }
} }




+ 2
- 1
BPA.SAAS.KitChenManage.Application/Device/Services/DevicePushRecodeService.cs View File

@@ -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();


+ 5
- 0
BPA.SAAS.KitChenManage.Core/BPA.SAAS.KitChenManage.Core.xml View File

@@ -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工艺


+ 5
- 0
BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs View File

@@ -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;}


Loading…
Cancel
Save