|
|
@ -1845,18 +1845,40 @@ namespace Myshipping.Application
|
|
|
|
UpdatedTime = DateTime.Now
|
|
|
|
UpdatedTime = DateTime.Now
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var orderList = await _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID
|
|
|
|
#region 扣费相关
|
|
|
|
&& x.IsDeleted == false
|
|
|
|
|
|
|
|
&& x.VESSEL == item.Vessel
|
|
|
|
|
|
|
|
&& x.VOYNO == item.Voyno).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//当前租户配置为实际开船后扣费
|
|
|
|
//当前租户配置为实际开船后扣费
|
|
|
|
var paraVal = _tenantParamValue.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "BOOKING_FEE_METHOD");
|
|
|
|
var paraVal = _tenantParamValue.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "BOOKING_FEE_METHOD");
|
|
|
|
//有实际开船,扣费
|
|
|
|
//有实际开船,扣费
|
|
|
|
if (paraVal != null && paraVal.ItemCode == "ATD" && item.ATD.HasValue)
|
|
|
|
if (paraVal != null && paraVal.ItemCode == "ATD" && item.ATD.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
feeIdList.AddRange(orderList.Where(x => !feeIdList.Contains(x.Id)).Select(x => x.Id));
|
|
|
|
var orderIdList = await _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID
|
|
|
|
|
|
|
|
&& x.IsDeleted == false
|
|
|
|
|
|
|
|
&& x.VESSEL == item.Vessel
|
|
|
|
|
|
|
|
&& x.VOYNO == item.Voyno).Select(x => x.Id).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
feeIdList.AddRange(orderIdList.Where(x => !feeIdList.Contains(x)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 118订舱系统2024.7.19修改:同一船名航次,启运港不同,船期也会不同;更新订舱时需要判断启运港
|
|
|
|
|
|
|
|
// 钉钉审批单号:202407121821000478565
|
|
|
|
|
|
|
|
var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID
|
|
|
|
|
|
|
|
&& x.IsDeleted == false
|
|
|
|
|
|
|
|
&& x.VESSEL == item.Vessel
|
|
|
|
|
|
|
|
&& x.VOYNO == item.Voyno);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (App.Configuration["RunType"] != CommonConst.RUN_TYPE_HECHUAN)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
query.Where(x => string.IsNullOrEmpty(x.PORTLOADID));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
List<BookingOrder> orderList = await query.Select(x => new BookingOrder
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = x.Id,
|
|
|
|
|
|
|
|
StartETA = x.StartETA,
|
|
|
|
|
|
|
|
YgtETD = x.YgtETD,
|
|
|
|
|
|
|
|
ATD = x.ATD,
|
|
|
|
|
|
|
|
StartATA = x.StartATA,
|
|
|
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
bool issend = false;
|
|
|
|
bool issend = false;
|
|
|
|
//批量变更业务数据
|
|
|
|
//批量变更业务数据
|
|
|
@ -1896,10 +1918,14 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
issend = true;
|
|
|
|
issend = true;
|
|
|
|
await update.Value.Where(b => b.Id == order.Id).ExecuteCommandAsync();
|
|
|
|
await update.Value.Where(b => b.Id == order.Id).ExecuteCommandAsync();
|
|
|
|
await _bookingorderservice.SaveLog(newOrder.Value, order, "回推船期");
|
|
|
|
await _bookingorderservice.SaveLog(newOrder.Value, order, "回推船期", new List<string>()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
nameof(BookingOrder.StartATA),
|
|
|
|
|
|
|
|
nameof(BookingOrder.StartETA),
|
|
|
|
|
|
|
|
nameof(BookingOrder.YgtETD),
|
|
|
|
|
|
|
|
nameof(BookingOrder.ATD),
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (issend)
|
|
|
|
if (issend)
|
|
|
|
{
|
|
|
|
{
|
|
|
|