@@ -113,11 +113,12 @@ namespace BPA.SAAS.Manage.Application.DataBase | |||||
/// </summary> | /// </summary> | ||||
/// <param name="goodId"></param> | /// <param name="goodId"></param> | ||||
/// <param name="attrId"></param> | /// <param name="attrId"></param> | ||||
/// <param name="autoKey"></param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet("/api/goodsattribute/getHaveTechnology")] | [HttpGet("/api/goodsattribute/getHaveTechnology")] | ||||
public async Task<bool> GetHaveTechnology(string goodId, string attrId) | |||||
public async Task<bool> GetHaveTechnology(string goodId, string attrId, int autoKey) | |||||
{ | { | ||||
return await _goodsAttributeServices.GetHaveTechnology(goodId, attrId); | |||||
return await _goodsAttributeServices.GetHaveTechnology(goodId, attrId, autoKey); | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -65,6 +65,6 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface | |||||
/// <param name="id"></param> | /// <param name="id"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
Task<List<GoodsAttributeView>> GetGoodsAttributeViewList(string id); | Task<List<GoodsAttributeView>> GetGoodsAttributeViewList(string id); | ||||
Task<bool> GetHaveTechnology(string goodId, string attrId); | |||||
Task<bool> GetHaveTechnology(string goodId, string attrId, int autoKey); | |||||
} | } | ||||
} | } |
@@ -4,8 +4,7 @@ using BPA.SAAS.Manage.Comm.Const; | |||||
using BPA.SAAS.Manage.Core.DataBase; | using BPA.SAAS.Manage.Core.DataBase; | ||||
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute; | using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute; | ||||
using StackExchange.Profiling.Internal; | using StackExchange.Profiling.Internal; | ||||
using BPA.SAAS.Manage.Core.Device; | |||||
namespace BPA.Franchisee.Application.FranchiseeCenter.GoodsServices | namespace BPA.Franchisee.Application.FranchiseeCenter.GoodsServices | ||||
{ | { | ||||
@@ -389,9 +388,12 @@ namespace BPA.Franchisee.Application.FranchiseeCenter.GoodsServices | |||||
return res; | 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)); | return data.Any(t => AreGuidsEqual(t.GoodsAttributeId, attrId)); | ||||
} | } | ||||
@@ -35,6 +35,7 @@ namespace BPA.SAAS.Manage.Application.Org.Services | |||||
var userList = await _db.Queryable<BPA_Users>().ToListAsync(); | var userList = await _db.Queryable<BPA_Users>().ToListAsync(); | ||||
var userRoleList = await _db.Queryable<BPA_UserRole>().ToListAsync(); | var userRoleList = await _db.Queryable<BPA_UserRole>().ToListAsync(); | ||||
var data = await _db.Queryable<BPA_Company>() | var data = await _db.Queryable<BPA_Company>() | ||||
.Where((a) => a.IsDeleted == 0) | |||||
.WhereIF(!input.Name.IsNullOrEmpty(), (a) => a.Name.Contains(input.Name)) | .WhereIF(!input.Name.IsNullOrEmpty(), (a) => a.Name.Contains(input.Name)) | ||||
.WhereIF(!input.AdminName.IsNullOrEmpty(), (a) => a.AdminName.Contains(input.AdminName)) | .WhereIF(!input.AdminName.IsNullOrEmpty(), (a) => a.AdminName.Contains(input.AdminName)) | ||||
.WhereIF(!input.Email.IsNullOrEmpty(), (a) => a.Email.Contains(input.Email)) | .WhereIF(!input.Email.IsNullOrEmpty(), (a) => a.Email.Contains(input.Email)) | ||||
@@ -22,9 +22,7 @@ | |||||
<ProjectReference Include="..\BPA.SAAS.Manage.Web.Core\BPA.SAAS.Manage.Web.Core.csproj" /> | <ProjectReference Include="..\BPA.SAAS.Manage.Web.Core\BPA.SAAS.Manage.Web.Core.csproj" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ProjectExtensions> | <ProjectExtensions> | ||||
<VisualStudio> | |||||
<UserProperties properties_4launchsettings_1json__JsonSchema="" /> | |||||
</VisualStudio> | |||||
<VisualStudio><UserProperties appsettings_1json__JsonSchema="" properties_4launchsettings_1json__JsonSchema="" /></VisualStudio> | |||||
</ProjectExtensions> | </ProjectExtensions> | ||||
</Project> | </Project> |