修复bug
This commit is contained in:
Binary file not shown.
@@ -72,7 +72,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
//var str = string.Join(",", codes.Select(s => s.Code).ToList());
|
//var str = string.Join(",", codes.Select(s => s.Code).ToList());
|
||||||
|
|
||||||
var res = await _erpInventoryService.GetInventory(codes.Select(s => s.Code).ToList());
|
var res = await _erpInventoryService.GetInventory(codes.Select(s => s.Code).ToList());
|
||||||
_logger.LogInformation($"拉取金蝶数据结果:{res.IsSuccess} {res.Message} {res.Data.Count()}");
|
_logger.LogInformation($"拉取金蝶数据结果:{res.IsSuccess} {res.Message}");
|
||||||
if (!res.IsSuccess) return res;
|
if (!res.IsSuccess) return res;
|
||||||
//过滤掉不符合要求的组织和仓库组合
|
//过滤掉不符合要求的组织和仓库组合
|
||||||
List<ErpInventoryDto> listOld = new List<ErpInventoryDto>();
|
List<ErpInventoryDto> listOld = new List<ErpInventoryDto>();
|
||||||
@@ -144,7 +144,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
var ids = resStock.Data.Where(w => listNames.Contains(w.Name)).Select(s => s.Id).ToList();
|
var ids = resStock.Data.Where(w => listNames.Contains(w.Name)).Select(s => s.Id).ToList();
|
||||||
//获取领星库存
|
//获取领星库存
|
||||||
var resInventory = await _juShuiTanService.GetInventory(ids);
|
var resInventory = await _juShuiTanService.GetInventory(ids);
|
||||||
_logger.LogInformation($"拉取聚水潭数据结果:{resInventory.IsSuccess} {resInventory.Message} {resInventory.Data.Count()}");
|
_logger.LogInformation($"拉取聚水潭数据结果:{resInventory.IsSuccess} {resInventory.Message}");
|
||||||
if (!resInventory.IsSuccess) return resStock;
|
if (!resInventory.IsSuccess) return resStock;
|
||||||
|
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
string strIds = string.Join(",", ids);
|
string strIds = string.Join(",", ids);
|
||||||
//获取领星库存
|
//获取领星库存
|
||||||
var resInventory = await _lingXingService.GetInventory(new Core.Dto.LingXing.LingXingInventoryRequest() { wid = strIds });
|
var resInventory = await _lingXingService.GetInventory(new Core.Dto.LingXing.LingXingInventoryRequest() { wid = strIds });
|
||||||
_logger.LogInformation($"拉取领星数据结果:{resInventory.IsSuccess} {resInventory.Message} {resInventory.Data.Count()}");
|
_logger.LogInformation($"拉取领星数据结果:{resInventory.IsSuccess} {resInventory.Message}");
|
||||||
if (!resInventory.IsSuccess) return resStock;
|
if (!resInventory.IsSuccess) return resStock;
|
||||||
|
|
||||||
//物料
|
//物料
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ using WMS.Web.Core.Help;
|
|||||||
using static System.Net.WebRequestMethods;
|
using static System.Net.WebRequestMethods;
|
||||||
using WMS.Web.Domain.Values;
|
using WMS.Web.Domain.Values;
|
||||||
using WMS.Web.Core.Dto.JuShuiTan;
|
using WMS.Web.Core.Dto.JuShuiTan;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.Services.Public
|
namespace WMS.Web.Domain.Services.Public
|
||||||
{
|
{
|
||||||
@@ -142,6 +143,7 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
int num = res.Total / 800;
|
int num = res.Total / 800;
|
||||||
for (int i = 1; i <= num; i++)
|
for (int i = 1; i <= num; i++)
|
||||||
{
|
{
|
||||||
|
Thread.Sleep(1000);//怕拉取过于频繁接口限制
|
||||||
dto.offset = i;
|
dto.offset = i;
|
||||||
if (i == num) dto.length = res.Total - (num * 800);
|
if (i == num) dto.length = res.Total - (num * 800);
|
||||||
resUrl = await GetStr<LingXingInventoryRequest>("/erp/sc/routing/data/local_inventory/inventoryDetails", dto);
|
resUrl = await GetStr<LingXingInventoryRequest>("/erp/sc/routing/data/local_inventory/inventoryDetails", dto);
|
||||||
|
|||||||
Reference in New Issue
Block a user