fix 处理无任务返回
This commit is contained in:
@@ -37,6 +37,11 @@ public class SapBusinessTripService : ISapBusinessTripService
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var tripResponse = await _jinkoJipService.GetTravelInfosByFactoryAsync(today, today, factory);
|
var tripResponse = await _jinkoJipService.GetTravelInfosByFactoryAsync(today, today, factory);
|
||||||
|
if (!tripResponse.Items.Any())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var tripInfoItem in tripResponse.Items.Where(x => x.Destination.IsPresent()))
|
foreach (var tripInfoItem in tripResponse.Items.Where(x => x.Destination.IsPresent()))
|
||||||
{
|
{
|
||||||
if (await _dbContext.Queryable<BusinessTripEntity>().Where(x => x.Code == tripInfoItem.Code
|
if (await _dbContext.Queryable<BusinessTripEntity>().Where(x => x.Code == tripInfoItem.Code
|
||||||
|
|||||||
Reference in New Issue
Block a user