jianghaiqing 10 months ago
commit 00cf3c9d03

@ -2579,7 +2579,7 @@ namespace Myshipping.Application
/// 修改订舱台账前,验证箱信息的件尺重、封号是否会被覆盖
/// </summary>
/// <returns>true:会被覆盖false:不会被覆盖</returns>
[HttpGet("/BookingOrder/CheckCtnCover")]
[HttpPost("/BookingOrder/CheckCtnCover")]
public async Task<bool> CheckCtnCover(CheckCtnCoverDto checkCtnDto)
{
// 如果保存时没有箱信息,则不认为会被覆盖

@ -12491,7 +12491,7 @@
<param name="dto"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyVesselInfoService.GetList(System.String,System.Nullable{System.DateTime},System.String,System.String)">
<member name="M:Myshipping.Core.Service.DjyVesselInfoService.GetList(System.String,System.Nullable{System.DateTime},System.String,System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.String,System.Boolean)">
<summary>
下拉列表
</summary>

@ -139,17 +139,19 @@ namespace Myshipping.Core.Service
/// </summary>
/// <returns></returns>
[HttpGet("/DjyVesselInfoService/GetList")]
public async Task<dynamic> GetList([FromQuery] string CarrierID, DateTime? ETD = null, string PortDischargeId = null, string KeyWord = "")
public async Task<dynamic> 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<CodeVessel> 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"
)

Loading…
Cancel
Save