Parcourir la source

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

master
zhaoy il y a 5 mois
Parent
révision
4ec71175ed
6 fichiers modifiés avec 25 ajouts et 7 suppressions
  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 Voir le fichier

@@ -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<ResultGoodsResultDto> GetDeviceGoods(string deviceId)
{


var goodsId = await _db.Queryable<BPA_DeviceGoods>()
.Where(x => x.DeviceId == deviceId)
.Where(x => x.AutoKey.ToString()==deviceId)
.Select(x => x.GoodsId)
.ToListAsync();

var data = await GetDeviceGoodspost(goodsId);

return data;
}



+ 5
- 0
BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml Voir le fichier

@@ -400,6 +400,11 @@
<param name="inputDto"></param>
<returns></returns>
</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">
<summary>
Topics类


+ 5
- 0
BPA.SAAS.KitChenManage.Application/Device/Dtos/DeviceGoodsInputDto.cs Voir le fichier

@@ -10,6 +10,11 @@ namespace BPA.SAAS.KitChenManage.Application.Device.Dtos
{
public string DeviceId { get; set; }

/// <summary>
/// AutoKey
/// </summary>
public int AutoKey { get; set; }

public List<Goods> GoodsList { get; set; }
}



+ 2
- 1
BPA.SAAS.KitChenManage.Application/Device/Services/DevicePushRecodeService.cs Voir le fichier

@@ -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<BPA_DeviceGoods>().Where(it => it.DeviceId == inputDto.DeviceId).ExecuteCommandAsync();

var list = new List<BPA_DeviceGoods>();
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();


+ 5
- 0
BPA.SAAS.KitChenManage.Core/BPA.SAAS.KitChenManage.Core.xml Voir le fichier

@@ -60,6 +60,11 @@
</summary>
</member>
<!-- 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">
<summary>
下发类型1商品 2物料 3配方 4工艺


+ 5
- 0
BPA.SAAS.KitChenManage.Core/Model/BPA_DeviceGoods.cs Voir le fichier

@@ -14,6 +14,11 @@ namespace BPA.SAAS.KitChenManage.Core.Model
{
public string DeviceId { get; set; }

/// <summary>
/// 设备AutoKey
/// </summary>
public long AutoKey { get; set; }

public string GoodsId { get; set; }

public string GoodsName { get; set;}


Chargement…
Annuler
Enregistrer