jianghaiqing 1 year ago
commit 686999c57a

@ -418,7 +418,7 @@ namespace Myshipping.Application
var mapcarrier = _mapcarrier.Where(x => x.Module == "HeChuan").ToList();
var userlist = _repUser.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToList();
var mlist = _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID&&x.IsDeleted==false).ToList();
var mlist = _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToList();
var orderlist = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToList();
foreach (var item in model)
{
@ -458,13 +458,18 @@ namespace Myshipping.Application
}
if (m == null)
{
var e= mlist.Where(x => x.CARRIERID == entity.CARRIERID && x.Vessel == entity.Vessel && x.Voyno == entity.Voyno && x.VoynoInside == entity.VoynoInside).FirstOrDefault();
var e = mlist.Where(x => x.CARRIERID == entity.CARRIERID && x.Vessel == entity.Vessel && x.Voyno == entity.Voyno && x.VoynoInside == entity.VoynoInside).FirstOrDefault();
if (e == null)
{
//2023年7月27日王书岚航次为V.开头的不查询船期
if (!string.IsNullOrEmpty(entity.VoynoInside) && entity.VoynoInside.StartsWith("V."))
{
entity.Sign = true;
}
await _vesselinfo.InsertAsync(entity);
}
else
else
{
entity.Id = e.Id;
@ -522,7 +527,7 @@ namespace Myshipping.Application
it.LstShipOrderCompareMode
}).ExecuteCommandAsync();
await _bookingorderservice.SaveLog(it, old);
await _bookingorderservice.SendBookingOrder(new long[] { it.Id});
await _bookingorderservice.SendBookingOrder(new long[] { it.Id });
}
}
}
@ -546,11 +551,11 @@ namespace Myshipping.Application
await _vesselinfo.UpdateAsync(x => x.BSNO == item, x => new DjyVesselInfo { IsDeleted = true });
}
}
}
/// <summary>
/// 同步订舱批量 没有返回值
@ -1651,7 +1656,7 @@ namespace Myshipping.Application
[SqlSugarUnitOfWork]
public async Task SaveSyncVesselDate(List<DjyVesselDto> dto)
{
var infolist = _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID&&x.IsDeleted==false).ToList();
var infolist = _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToList();
var orderlist = await _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
foreach (var item in dto)
{
@ -1746,39 +1751,39 @@ namespace Myshipping.Application
if (it.ETA != item.ETA)
{
flag = true;
it.ETA = item.ETA;
}
if (it.MiddleETA != item.MiddleETA)
{
flag = true;
it.MiddleETA = item.MiddleETA;
}
if (it.MiddleETD != item.MiddleETD)
{
flag = true;
it.MiddleETD = item.MiddleETD;
}
if (item.MiddleATA != it.MiddleATA)
{
flag = true;
it.MiddleATA = item.MiddleATA;
}
if (item.MiddleATD != it.MiddleATD)
{
flag = true;
it.MiddleATD = item.MiddleATD;
}
if (item.ATA != it.ATA)
{
flag = true;
it.ATA = item.ATA;
}
@ -2101,7 +2106,7 @@ namespace Myshipping.Application
bookingStatusLog.OpTime = item.OpTime;
bookingStatusLog.MBLNO = item.MBLNO;
await _repStatuslog.InsertAsync(bookingStatusLog);
if (item.detail != null && item.detail.Count > 0)
{
@ -2200,7 +2205,7 @@ namespace Myshipping.Application
bookingStatus.StaTime = item.OpTime;
bookingStatus.StaCate = "book_sta_cate_billtrace";
await _repBookingStatus.InsertAsync(bookingStatus);
}
}
if (item.Status == "MDGETA")
@ -2247,7 +2252,7 @@ namespace Myshipping.Application
flag = true;
}
}
#endregion
#endregion
@ -2263,15 +2268,15 @@ namespace Myshipping.Application
o.ATD = item.OpTime;
await _rep.UpdateAsync(o);
flag = true;
await _bookingorderservice.SaveLog(o,oldorder);
await _bookingorderservice.SaveLog(o, oldorder);
}
if (!string.IsNullOrEmpty(o.VESSEL) && !string.IsNullOrEmpty(o.VOYNO) && !string.IsNullOrEmpty(o.CARRIERID))
{
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VOYNO == o.VOYNO && x.VESSEL == o.VESSEL && x.CARRIERID == o.CARRIERID && x.TenantId == o.TenantId && x.IsDeleted == false && x.Id != item.BookingId).ToListAsync();
foreach (var it in order)
{
var _oldorder= it;
var _oldorder = it;
var _oldatd = it.ATD;
if (_oldatd != item.OpTime)
{
@ -2351,11 +2356,12 @@ namespace Myshipping.Application
}
#endregion
}
if (flag) {
if (flag)
{
await _bookingorderservice.SendBookingOrder(new long[] { all[0].BookingId });
}
}
catch (Exception ex)
{
@ -2380,7 +2386,7 @@ namespace Myshipping.Application
{
var list = await _vesselinfo.AsQueryable().Filter(null, true)
.Where(x => x.Sign == false && x.ATD == null
&&x.IsDeleted==false
&& x.IsDeleted == false
&& x.TenantId == UserManager.TENANT_ID
&& (x.Voyno != null && x.Voyno != "")
&& x.ETD < DateTime.Today.AddDays(15)) //2023年7月19日根据吴悦蓉反馈查询3周左右的即可再远的无效而且也会产生无效提醒2023年7月25日改为2周

Loading…
Cancel
Save