|
|
|
@ -110,6 +110,7 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly SqlSugarRepository<SysTenant> _repTenant;
|
|
|
|
|
private readonly SqlSugarRepository<BookingStatus> _repBookingStatus;
|
|
|
|
|
private readonly SqlSugarRepository<BookingEDIExt> _bookingEDIExt;
|
|
|
|
|
private readonly SqlSugarRepository<DjyVesselInfo> _vesselInfo;
|
|
|
|
|
private readonly SqlSugarRepository<DjyUserConfig> _repUserConfig;
|
|
|
|
|
private readonly SqlSugarRepository<BookingExcelTemplate> _excelrep;
|
|
|
|
|
private readonly SqlSugarRepository<BookingServiceItem> _serviceItem;
|
|
|
|
@ -137,7 +138,7 @@ namespace Myshipping.Application
|
|
|
|
|
SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark,
|
|
|
|
|
SqlSugarRepository<BookingFile> bookingfile, SqlSugarRepository<DjyUserConfig> repUserConfig, SqlSugarRepository<BookingPrintTemplate> repPrint,
|
|
|
|
|
SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail,
|
|
|
|
|
SqlSugarRepository<BookingTemplateShare> repPrintTemplateShare,
|
|
|
|
|
SqlSugarRepository<BookingTemplateShare> repPrintTemplateShare, SqlSugarRepository<DjyVesselInfo> vesselInfo,
|
|
|
|
|
ILogger<BookingOrderService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig, ISysDataUserMenu right, SqlSugarRepository<ParaGoodsInfo> paraGoodsInfoRepository,
|
|
|
|
|
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser, SqlSugarRepository<BookingTemplate> bookingTemplate,
|
|
|
|
|
SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact, SqlSugarRepository<BookingSampleBill> repSampleBill, SqlSugarRepository<DjyCustomer> djycustomer,
|
|
|
|
@ -180,6 +181,7 @@ namespace Myshipping.Application
|
|
|
|
|
this._paraGoodsInfoRepository = paraGoodsInfoRepository;
|
|
|
|
|
this._paraContractNoInfoRepository = paraContractNoInfoRepository;
|
|
|
|
|
this._orgService = orgService;
|
|
|
|
|
this._vesselInfo = vesselInfo;
|
|
|
|
|
this._repPrintTemplateShare = repPrintTemplateShare;
|
|
|
|
|
_httpContextAccessor = httpContextAccessor;
|
|
|
|
|
_GoodsConfig = GoodsConfig;
|
|
|
|
@ -988,6 +990,18 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var entity = input.Adapt<BookingOrder>();
|
|
|
|
|
if (!string.IsNullOrEmpty(input.VESSEL)&&!string.IsNullOrEmpty(input.VOYNO)) {
|
|
|
|
|
var vesselInfo=_vesselInfo.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.UserId && x.Vessel == input.VESSEL && x.Voyno == input.VESSEL&&x.ATD!=null).ToList().FirstOrDefault();
|
|
|
|
|
if (vesselInfo!=null) {
|
|
|
|
|
entity.YgtETD = vesselInfo.ETD;
|
|
|
|
|
entity.StartETA = vesselInfo.ETA;
|
|
|
|
|
entity.ATD = vesselInfo.ATD;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (input.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(entity.VOYNO))
|
|
|
|
@ -1407,9 +1421,6 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ordOut;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|