任务描述
需求描述
有些sku设置仿牌,但是部分站点的asin添加了白名单,仍然需要继续备货,因此需要优化仿牌过滤逻辑
具体规则如下:


验收标准
158Create
有些sku设置仿牌,但是部分站点的asin添加了白名单,仍然需要继续备货,因此需要优化仿牌过滤逻辑
具体规则如下:


| 所属迭代 | 智能中心-智能备货迭代 |
|---|---|
| 所属模块 | 智能中心-需求池 战略独立项目 智能备货 |
| 相关需求 | 智能备货:仿牌过滤优化 |
| 指派给 | Closed 于 2025-05-17 09:38:33 |
| 任务类型 | 后端 |
| 任务标签 | 初始 |
| 开发组 | |
| 任务状态 | 已关闭 |
| 进度 | 100% |
| 优先级 | P1 |
| 关键词 | |
| 抄送给 |
| 由谁创建 | 罗友军 于 2025-04-14 13:59:00 |
|---|---|
| 由谁完成 | 钟国泽 于 2025-04-15 09:49:12 |
| 由谁取消 | 暂无 |
| 由谁关闭 | 李亚婷 于 2025-05-17 09:38:33 |
| 关闭原因 | 已完成 |
| 最后编辑 | 李亚婷 于 2025-05-17 09:38:33 |
| 团队 | 最初预计 | 总计消耗 | 预计剩余 |
|---|
| 最初预计 | 8工时 |
|---|---|
| 总计消耗 | 8工时 |
| 预计剩余 | 0工时 |
| 预计开始 | 2025-04-14 |
| 实际开始 | 2025-04-15 |
| 截止日期 | 2025-04-18 |
逻辑:先判断 RB_Product 表 中 ProductProperty字段是否为【2:仿牌,4:疑似仿牌】如果是则判断白名单表RB_StockOrderASIN_Whitelist 中asin+country 为维度字段ProductType是否为【0:仿牌】IsActive是否为【1:激活】如果成立就备货
修改方法:
1 FirstAutoStockUpAsync: 自动备货-添加购物车--首次备货
2 SecondaryStockingAsync: 二次备货-添加购物车
3 IndependenceStockingAsync: 26393独立账号新品特殊备货
4 NormalAutoStockUpAsync: 常态化自动备货-添加购物车
5 RunOutOfFbaStock:断货fba备货详情
代码:
/// <summary>
/// 分站点判断是否仿牌---27544-仿牌过滤优化
/// </summary>
/// <param name="product"></param>
/// <param name="transferFba"></param>
/// <param name="productAdminList"></param>
/// <param name="imitionResult"></param>
/// <returns></returns>
private bool IsImitationBrand(RB_Product product, string sku, List<RB_Product_Admin> productAdminList, List<RB_Imitation_Country> imitionResult, string siteCode, string asin)
{
bool isTrue = false;
if (product.ProductProperty == (int)EnumAmazon.ProductProperty.仿牌 || product.ProductProperty == (int)EnumAmazon.ProductProperty.疑似仿牌)
{
if (_amazonCommonService.IsImitationCard(sku, productAdminList, imitionResult, siteCode))
{
RB_StockOrderASIN_Whitelist rB_StockOrderASIN_Whitelist = _StockOrderASIN_Whitelist_Repository.GetStockOrderASIN_Whitelist(asin, siteCode);
if (rB_StockOrderASIN_Whitelist?.IsActive == true && rB_StockOrderASIN_Whitelist?.ProductType == 0)
{
isTrue = false;
}
else
{
isTrue = true;
}
}
}
return isTrue;
}
/// <summary>
/// 根据asin+country获取StockOrderASIN_Whitelis数据
/// </summary>
/// <param name="asin"></param>
/// <param name="country"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public RB_StockOrderASIN_Whitelist GetStockOrderASIN_Whitelist(string asin, string country)
{
RB_StockOrderASIN_Whitelist rb_StockOrderASIN_Whitelist = new RB_StockOrderASIN_Whitelist();
if (string.IsNullOrWhiteSpace(asin) || string.IsNullOrWhiteSpace(country))
{
return rb_StockOrderASIN_Whitelist;
}
var list = this.GetQueryable().Where(o => o.ASIN == asin && o.Country == country).ToList();
if (list.Count > 0)
{
rb_StockOrderASIN_Whitelist = list.First();
}
return rb_StockOrderASIN_Whitelist;
}