修改BC的订舱检索

optimize
jianghaiqing 1 year ago
parent 45f68a4883
commit 0425e5f362

@ -370,7 +370,9 @@ namespace Myshipping.Application
if (endDate > beginDate.AddDays(7)) if (endDate > beginDate.AddDays(7))
throw Oops.Oh($"船期的日期范围不能超过7天"); throw Oops.Oh($"船期的日期范围不能超过7天");
queryWhere = queryWhere.Where(a => a.ETD >= beginDate && a.ETD < endDate.AddDays(1)); endDate = endDate.AddDays(1);
queryWhere = queryWhere.Where(a => a.ETD >= beginDate && a.ETD < endDate);
isAvailable = true; isAvailable = true;
} }
@ -392,7 +394,9 @@ namespace Myshipping.Application
if (endDate > beginDate.AddDays(7)) if (endDate > beginDate.AddDays(7))
throw Oops.Oh($"制单的日期范围不能超过7天"); throw Oops.Oh($"制单的日期范围不能超过7天");
queryWhere = queryWhere.Where(a => a.CreatedTime >= beginDate && a.CreatedTime < endDate.AddDays(1)); endDate = endDate.AddDays(1);
queryWhere = queryWhere.Where(a => a.CreatedTime >= beginDate && a.CreatedTime < endDate);
isAvailable = true; isAvailable = true;
} }
@ -431,7 +435,7 @@ namespace Myshipping.Application
var list = await queryWhere.OrderBy(a => a.CreatedTime) var list = await queryWhere.OrderBy(a => a.CreatedTime)
.Take(query.topNum).ToListAsync(); .Take(query.topNum).ToListAsync();
var bkList = list.Adapt<BookingOrderBCTaskDto>(); var bkList = list.Adapt<List<BookingOrderBCTaskDto>>();
result.succ = true; result.succ = true;
result.ext = bkList; result.ext = bkList;

Loading…
Cancel
Save