diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
index 6b4dba69..4269de08 100644
--- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
+++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
@@ -2579,7 +2579,7 @@ namespace Myshipping.Application
/// 修改订舱台账前,验证箱信息的件尺重、封号是否会被覆盖
///
/// true:会被覆盖;false:不会被覆盖
- [HttpGet("/BookingOrder/CheckCtnCover")]
+ [HttpPost("/BookingOrder/CheckCtnCover")]
public async Task CheckCtnCover(CheckCtnCoverDto checkCtnDto)
{
// 如果保存时没有箱信息,则不认为会被覆盖
diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml
index b567182e..cce0aa74 100644
--- a/Myshipping.Core/Myshipping.Core.xml
+++ b/Myshipping.Core/Myshipping.Core.xml
@@ -12491,7 +12491,7 @@
-
+
下拉列表
diff --git a/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs b/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs
index 92a1ce27..5be63d57 100644
--- a/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs
+++ b/Myshipping.Core/Service/DjyVesselInfo/DjyVesselInfoService.cs
@@ -139,17 +139,19 @@ namespace Myshipping.Core.Service
///
///
[HttpGet("/DjyVesselInfoService/GetList")]
- public async Task GetList([FromQuery] string CarrierID, DateTime? ETD = null, string PortDischargeId = null, string KeyWord = "")
+ public async Task GetList([FromQuery] string CarrierID, DateTime? ETD = null, string PortDischargeId = null, string KeyWord = "", DateTime? etdStart = null, DateTime? etdEnd = null, string sortField = null, bool descSort = false)
{
//获取船名
List list = await _sysCacheService.GetAllCodeVessel();
- var tlist = await _rep.AsQueryable().Filter(null, true).
+ var query = _rep.AsQueryable().Filter(null, true).
Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false && x.CARRIERID != null && x.CARRIERID != "").
WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.StartsWith(KeyWord.ToUpper())).
WhereIF(!string.IsNullOrEmpty(PortDischargeId), x => x.PortDischargeId == PortDischargeId).
WhereIF(ETD != null, x => Convert.ToDateTime(x.ETD).ToString("yyyy-MM-dd") == Convert.ToDateTime(ETD).ToString("yyyy-MM-dd")).//船期关联船名
- WhereIF(ETD == null, x => x.ETD > DateTime.Now.AddDays(-7)).//领导需求当前日期7天之前
+ WhereIF(ETD == null && etdStart == null && etdEnd == null, x => x.ETD > DateTime.Now.AddDays(-7)).//领导需求当前日期7天之前
+ WhereIF(etdStart.HasValue, x => x.ETD >= etdStart).
+ WhereIF(etdEnd.HasValue, x => x.ETD <= etdEnd).
WhereIF(!string.IsNullOrEmpty(CarrierID), x => x.CARRIERID == CarrierID || x.CARRIERID == null || x.CARRIERID == "").
Select(x => new
{
@@ -157,16 +159,22 @@ namespace Myshipping.Core.Service
VoynoInside = x.VoynoInside,
Vessel = x.Vessel,
ETD = x.ETD == null ? "" : Convert.ToDateTime(x.ETD).ToString("yyyy-MM-dd"),
-
//日期和时间都要
ATD = x.ATD == null ? "" : Convert.ToDateTime(x.ATD).ToString("yyyy-MM-dd HH:mm:ss"),
-
PortDischargeId = x.PortDischargeId,
PortDischarge = x.PortDischarge,
ClosingDate = x.ClosingDate == null ? "" : Convert.ToDateTime(x.ClosingDate).ToString("yyyy-MM-dd HH:mm:ss"),
CloseDocTime = x.CloseDocTime == null ? "" : Convert.ToDateTime(x.CloseDocTime).ToString("yyyy-MM-dd HH:mm:ss"),
- }).Take(20).
- ToListAsync();
+ });
+
+ if (!string.IsNullOrEmpty(sortField))
+ {
+ query = query.OrderBy(PageInputOrder.OrderBuilder(sortField, descSort));
+ }
+
+ var tlist=await query
+ .Take(20)
+ .ToListAsync();
if (_sysCacheService.GetAllTenantParam().Result.Where(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "VESSEL_FROM_CONFIG_ONLY").Select(x => x.ItemCode).FirstOrDefault() == "YES"
)