优化发送接口

This commit is contained in:
tongfei
2024-04-12 18:11:51 +08:00
parent 8247db60d1
commit 6ab9ca3015
2 changed files with 8 additions and 4 deletions

View File

@@ -168,8 +168,7 @@ namespace WMS.Web.Domain.Services
//要处理发送的明细
//var notSendDetails = await _inStockTaskRepositories.GetNotSendErpDetails();
var notSendDetails = await _inStockRepositories.GetNotSendDetails();
_logger.LogInformation("发送消息:要处理发送的明细->" + JsonConvert.SerializeObject(notSendDetails));
var sendDataList = new List<SendDataDto>();
if (customerList != null && customerList.Count != 0)
@@ -288,7 +287,7 @@ namespace WMS.Web.Domain.Services
}
}
update_DetailsIds = updateList.Select(x => x.Id).ToList();
update_DetailsIds = updateList.GroupBy(x=>x.Id).Select(x => x.Key).ToList();
//任务明细:修改的
//var tasksDetails = await _inStockTaskRepositories.GetDetailsList(update_taskDetailsIds);
var inStockDetails = await _inStockRepositories.GetDetailsList(update_DetailsIds);
@@ -301,6 +300,10 @@ namespace WMS.Web.Domain.Services
{
_logger.LogInformation("发送消息:失败-修改入库明细->" + JsonConvert.SerializeObject(inStockDetails));
}
else
{
_logger.LogInformation("发送消息:成功-修改入库明细->" + JsonConvert.SerializeObject(inStockDetails));
}
}
}
else

View File

@@ -430,7 +430,8 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<List<InStockDetails>> GetNotSendDetails()
{
return await _context.InStockDetails.Where(x =>x.IsHasSend != null && x.IsHasSend == false && !string.IsNullOrEmpty(x.CustomerCode)).ToListAsync();
var result= await _context.InStockDetails.Where(x =>x.IsHasSend != null && x.IsHasSend == false && !string.IsNullOrEmpty(x.CustomerCode)).ToListAsync();
return result.Clone();
}
/// <summary>