测试
This commit is contained in:
@@ -129,6 +129,7 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public async Task<Result<List<LingXingInventoryResponse>>> GetInventory(LingXingInventoryRequest dto)
|
public async Task<Result<List<LingXingInventoryResponse>>> GetInventory(LingXingInventoryRequest dto)
|
||||||
{
|
{
|
||||||
|
//dto.length = 50;
|
||||||
//dto.sku = "NTONPOWER-OSP-3A2U-US-BK-4.6M";
|
//dto.sku = "NTONPOWER-OSP-3A2U-US-BK-4.6M";
|
||||||
var resUrl = await GetStr<LingXingInventoryRequest>("/erp/sc/routing/data/local_inventory/inventoryDetails", dto);
|
var resUrl = await GetStr<LingXingInventoryRequest>("/erp/sc/routing/data/local_inventory/inventoryDetails", dto);
|
||||||
if (!resUrl.IsSuccess) return Result<List<LingXingInventoryResponse>>.ReFailure(ResultCodes.LingXingUrlError);
|
if (!resUrl.IsSuccess) return Result<List<LingXingInventoryResponse>>.ReFailure(ResultCodes.LingXingUrlError);
|
||||||
@@ -155,8 +156,12 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
_logger.LogInformation($"领星获取数据失败{res.Message}");
|
_logger.LogInformation($"领星获取数据失败{res.Message}");
|
||||||
return Result<List<LingXingInventoryResponse>>.ReFailure(ResultCodes.LingXingDataError);
|
return Result<List<LingXingInventoryResponse>>.ReFailure(ResultCodes.LingXingDataError);
|
||||||
}
|
}
|
||||||
list.AddRange(JsonConvert.DeserializeObject<List<LingXingInventoryResponse>>(res_f.Data.ToString()));
|
var d = JsonConvert.DeserializeObject<List<LingXingInventoryResponse>>(res_f.Data.ToString());
|
||||||
//var bc = list.Where(w => w.SKU.Equals("NTONPOWER-OSP-3A2U-US-BK-4.6M")).ToList();
|
//var bc = d.Where(w => w.SKU.Equals("NTONPOWER-OSP-3A2U-US-BK-4.6M")).Any();
|
||||||
|
//_logger.LogInformation($"次数:{i} 是否存在{bc}");
|
||||||
|
|
||||||
|
list.AddRange(d);
|
||||||
|
|
||||||
}
|
}
|
||||||
//var bcd = list.Where(w => w.SKU.Equals("NTONPOWER-OSP-3A2U-US-BK-4.6M")).ToList();
|
//var bcd = list.Where(w => w.SKU.Equals("NTONPOWER-OSP-3A2U-US-BK-4.6M")).ToList();
|
||||||
return Result<List<LingXingInventoryResponse>>.ReSuccess(list.Where(w => w.Product_Total > 0 && w.Product_Valid_Num > 0).ToList());
|
return Result<List<LingXingInventoryResponse>>.ReSuccess(list.Where(w => w.Product_Total > 0 && w.Product_Valid_Num > 0).ToList());
|
||||||
|
|||||||
Reference in New Issue
Block a user