|
|
@@ -4,8 +4,7 @@ using BPA.SAAS.Manage.Comm.Const; |
|
|
|
using BPA.SAAS.Manage.Core.DataBase; |
|
|
|
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute; |
|
|
|
using StackExchange.Profiling.Internal; |
|
|
|
|
|
|
|
|
|
|
|
using BPA.SAAS.Manage.Core.Device; |
|
|
|
|
|
|
|
namespace BPA.Franchisee.Application.FranchiseeCenter.GoodsServices |
|
|
|
{ |
|
|
@@ -389,9 +388,12 @@ namespace BPA.Franchisee.Application.FranchiseeCenter.GoodsServices |
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<bool> GetHaveTechnology (string goodId, string attrId) |
|
|
|
public async Task<bool> GetHaveTechnology(string goodId, string attrId, int autoKey) |
|
|
|
{ |
|
|
|
var data = await _db.Queryable<BPA_GoodsTechnologyAction>().Where(t => t.GoodsId == goodId).ToListAsync(); |
|
|
|
var device = await _db.Queryable<BPA_DeviceInfo>().FirstAsync(t => t.AutoKey == autoKey); |
|
|
|
if (device == null) |
|
|
|
return false; |
|
|
|
var data = await _db.Queryable<BPA_GoodsTechnologyAction>().Where(t => t.GoodsId == goodId && t.DeviceId == device.Id).ToListAsync(); |
|
|
|
return data.Any(t => AreGuidsEqual(t.GoodsAttributeId, attrId)); |
|
|
|
} |
|
|
|
|
|
|
|