|
|
@ -147,6 +147,8 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
private readonly IEventPublisher _publisher;
|
|
|
|
private readonly IEventPublisher _publisher;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<DjyTenantParamValue> _repTenantParamValue;
|
|
|
|
|
|
|
|
|
|
|
|
const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING";
|
|
|
|
const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING";
|
|
|
|
const string CONST_MAPPING_MODULE_ROUTE = "BOOK_OR_CLOSING_RT";
|
|
|
|
const string CONST_MAPPING_MODULE_ROUTE = "BOOK_OR_CLOSING_RT";
|
|
|
|
const string CONST_MAPPING_MODULE_VOLTA = "BOOK_CLOSING_VOLTA";
|
|
|
|
const string CONST_MAPPING_MODULE_VOLTA = "BOOK_CLOSING_VOLTA";
|
|
|
@ -175,7 +177,9 @@ namespace Myshipping.Application
|
|
|
|
SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingServiceItem> serviceItem,
|
|
|
|
SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingServiceItem> serviceItem,
|
|
|
|
SqlSugarRepository<ParaContractNoInfo> paraContractNoInfoRepository, IHttpContextAccessor httpContextAccessor, IBookingGoodsStatusConfigService GoodsConfig, SqlSugarRepository<DjyWebsiteAccountConfig> djyWebsiteAccountConfigRepository,
|
|
|
|
SqlSugarRepository<ParaContractNoInfo> paraContractNoInfoRepository, IHttpContextAccessor httpContextAccessor, IBookingGoodsStatusConfigService GoodsConfig, SqlSugarRepository<DjyWebsiteAccountConfig> djyWebsiteAccountConfigRepository,
|
|
|
|
ISysOrgService orgService, SqlSugarRepository<BookingLineOpMgrConfig> repLineOpMgrConfig, SqlSugarRepository<SysEmp> repSysEmp, SqlSugarRepository<BookingAutoYardImport> repAutoYard,
|
|
|
|
ISysOrgService orgService, SqlSugarRepository<BookingLineOpMgrConfig> repLineOpMgrConfig, SqlSugarRepository<SysEmp> repSysEmp, SqlSugarRepository<BookingAutoYardImport> repAutoYard,
|
|
|
|
IServiceWorkFlowManageService serviceWorkFlowManageService, IDjyUserConfigService djyUserConfigService, IEventPublisher publisher, SqlSugarRepository<BookingSlotBase> repSlotBase, SqlSugarRepository<BookingSlotAllocation> repSlotAllocation, SqlSugarRepository<BookingSlotAllocationCtn> repSlotAllocationCtn, IBookingSlotService bookingSlotService, SqlSugarRepository<BookingGoodsStatusSubscribe> repBookingStatusSubscribe)
|
|
|
|
IServiceWorkFlowManageService serviceWorkFlowManageService, IDjyUserConfigService djyUserConfigService, IEventPublisher publisher, SqlSugarRepository<BookingSlotBase> repSlotBase,
|
|
|
|
|
|
|
|
SqlSugarRepository<BookingSlotAllocation> repSlotAllocation, SqlSugarRepository<BookingSlotAllocationCtn> repSlotAllocationCtn, IBookingSlotService bookingSlotService,
|
|
|
|
|
|
|
|
SqlSugarRepository<BookingGoodsStatusSubscribe> repBookingStatusSubscribe, SqlSugarRepository<DjyTenantParamValue> repTenantParamValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this._logger = logger;
|
|
|
|
this._logger = logger;
|
|
|
|
this._rep = rep;
|
|
|
|
this._rep = rep;
|
|
|
@ -228,6 +232,7 @@ namespace Myshipping.Application
|
|
|
|
_repSlotAllocationCtn = repSlotAllocationCtn;
|
|
|
|
_repSlotAllocationCtn = repSlotAllocationCtn;
|
|
|
|
this.bookingSlotService = bookingSlotService;
|
|
|
|
this.bookingSlotService = bookingSlotService;
|
|
|
|
_repBookingStatusSubscribe = repBookingStatusSubscribe;
|
|
|
|
_repBookingStatusSubscribe = repBookingStatusSubscribe;
|
|
|
|
|
|
|
|
_repTenantParamValue = repTenantParamValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 主表和箱信息
|
|
|
|
#region 主表和箱信息
|
|
|
@ -9941,6 +9946,15 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
order.ATD = sjlg_time;
|
|
|
|
order.ATD = sjlg_time;
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//当前租户配置为实际开船后扣费
|
|
|
|
|
|
|
|
var paraVal = _repTenantParamValue.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "BOOKING_FEE_METHOD");
|
|
|
|
|
|
|
|
//有实际开船,扣费
|
|
|
|
|
|
|
|
if (paraVal != null && paraVal.ItemCode == "ATD")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//扣费
|
|
|
|
|
|
|
|
await _publisher.PublishAsync(new ChannelEventSource($"Booking:DoFeeRecord", new { bsType = 28, sendtype = 0, idList = new List<long>() { order.Id } }));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//同步船期
|
|
|
|
//同步船期
|
|
|
|
if (flag)
|
|
|
|
if (flag)
|
|
|
@ -12080,7 +12094,8 @@ namespace Myshipping.Application
|
|
|
|
throw Oops.Oh("未配置个人账户,请先配置个人账户 类型-MSKApi");
|
|
|
|
throw Oops.Oh("未配置个人账户,请先配置个人账户 类型-MSKApi");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MSKAPIBookingDto bookingDto = new MSKAPIBookingDto {
|
|
|
|
MSKAPIBookingDto bookingDto = new MSKAPIBookingDto
|
|
|
|
|
|
|
|
{
|
|
|
|
userKey = App.Configuration["MSKAPIDjyUserKey"],
|
|
|
|
userKey = App.Configuration["MSKAPIDjyUserKey"],
|
|
|
|
userSecret = App.Configuration["MSKAPIDjyUserSecret"],
|
|
|
|
userSecret = App.Configuration["MSKAPIDjyUserSecret"],
|
|
|
|
operatingEnvironment = App.Configuration["MSKAPIOPEnvironment"],
|
|
|
|
operatingEnvironment = App.Configuration["MSKAPIOPEnvironment"],
|
|
|
@ -12088,38 +12103,46 @@ namespace Myshipping.Application
|
|
|
|
bookingBody = new MSKAPIBookingBodyDto()
|
|
|
|
bookingBody = new MSKAPIBookingBodyDto()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
bookingDto.bookingBody.references = new MSKAPIBookingReferenceDto {
|
|
|
|
bookingDto.bookingBody.references = new MSKAPIBookingReferenceDto
|
|
|
|
|
|
|
|
{
|
|
|
|
priceReference = model.priceReference,
|
|
|
|
priceReference = model.priceReference,
|
|
|
|
productCode = model.productCode,
|
|
|
|
productCode = model.productCode,
|
|
|
|
sender = model.sender,
|
|
|
|
sender = model.sender,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
bookingDto.bookingBody.mandatoryParties = new MSKAPIBookingMandatoryParties {
|
|
|
|
bookingDto.bookingBody.mandatoryParties = new MSKAPIBookingMandatoryParties
|
|
|
|
|
|
|
|
{
|
|
|
|
bookedByCompanyName = model.bookedByCompanyName,
|
|
|
|
bookedByCompanyName = model.bookedByCompanyName,
|
|
|
|
bookedByMaerskPartyCode = model.bookedByMaerskPartyCode,
|
|
|
|
bookedByMaerskPartyCode = model.bookedByMaerskPartyCode,
|
|
|
|
bookedByPartyContact = new MSKAPIBookingMandatoryPartyContact {
|
|
|
|
bookedByPartyContact = new MSKAPIBookingMandatoryPartyContact
|
|
|
|
|
|
|
|
{
|
|
|
|
name = model.bookedByCompanyContactName,
|
|
|
|
name = model.bookedByCompanyContactName,
|
|
|
|
email = model.bookedByCompanyContactEmail
|
|
|
|
email = model.bookedByCompanyContactEmail
|
|
|
|
},
|
|
|
|
},
|
|
|
|
priceOwnerCompanyName = model.priceOwnerCompanyName,
|
|
|
|
priceOwnerCompanyName = model.priceOwnerCompanyName,
|
|
|
|
priceOwnerMaerskPartyCode = model.priceOwnerMaerskPartyCode,
|
|
|
|
priceOwnerMaerskPartyCode = model.priceOwnerMaerskPartyCode,
|
|
|
|
priceOwnerPartyContact = new MSKAPIBookingMandatoryPartyContact {
|
|
|
|
priceOwnerPartyContact = new MSKAPIBookingMandatoryPartyContact
|
|
|
|
|
|
|
|
{
|
|
|
|
name = model.priceOwnerContactName,
|
|
|
|
name = model.priceOwnerContactName,
|
|
|
|
email = model.priceOwnerContactEmail
|
|
|
|
email = model.priceOwnerContactEmail
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
bookingDto.bookingBody.transport = new MSKAPIBookingTransport {
|
|
|
|
bookingDto.bookingBody.transport = new MSKAPIBookingTransport
|
|
|
|
|
|
|
|
{
|
|
|
|
carrierCode = model.carrierCode,
|
|
|
|
carrierCode = model.carrierCode,
|
|
|
|
earliestDepartureDate = model.earliestDepartureDate,
|
|
|
|
earliestDepartureDate = model.earliestDepartureDate,
|
|
|
|
exportServiceMode = model.exportServiceMode,
|
|
|
|
exportServiceMode = model.exportServiceMode,
|
|
|
|
importServiceMode = model.importServiceMode,
|
|
|
|
importServiceMode = model.importServiceMode,
|
|
|
|
routeDetails = new MSKAPIBookingRouteDetails {
|
|
|
|
routeDetails = new MSKAPIBookingRouteDetails
|
|
|
|
placeOfReceipt = new MSKAPIBookingRouteDetailsBase {
|
|
|
|
{
|
|
|
|
|
|
|
|
placeOfReceipt = new MSKAPIBookingRouteDetailsBase
|
|
|
|
|
|
|
|
{
|
|
|
|
UNLocationCode = model.placeOfReceiptUnLocCode,
|
|
|
|
UNLocationCode = model.placeOfReceiptUnLocCode,
|
|
|
|
cityName = model.placeOfReceiptCityName,
|
|
|
|
cityName = model.placeOfReceiptCityName,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
placeOfDelivery = new MSKAPIBookingRouteDetailsBase {
|
|
|
|
placeOfDelivery = new MSKAPIBookingRouteDetailsBase
|
|
|
|
|
|
|
|
{
|
|
|
|
UNLocationCode = model.placeOfDeliveryUnLocCode,
|
|
|
|
UNLocationCode = model.placeOfDeliveryUnLocCode,
|
|
|
|
cityName = model.placeOfDeliveryCityName,
|
|
|
|
cityName = model.placeOfDeliveryCityName,
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -12183,7 +12206,8 @@ namespace Myshipping.Application
|
|
|
|
if (webAccountConfig == null)
|
|
|
|
if (webAccountConfig == null)
|
|
|
|
throw Oops.Oh("未配置个人账户,请先配置个人账户 类型-MSKApi");
|
|
|
|
throw Oops.Oh("未配置个人账户,请先配置个人账户 类型-MSKApi");
|
|
|
|
|
|
|
|
|
|
|
|
MSKAPISearchCommodityDto queryInfo = new MSKAPISearchCommodityDto {
|
|
|
|
MSKAPISearchCommodityDto queryInfo = new MSKAPISearchCommodityDto
|
|
|
|
|
|
|
|
{
|
|
|
|
userKey = App.Configuration["MSKAPIDjyUserKey"],
|
|
|
|
userKey = App.Configuration["MSKAPIDjyUserKey"],
|
|
|
|
userSecret = App.Configuration["MSKAPIDjyUserSecret"],
|
|
|
|
userSecret = App.Configuration["MSKAPIDjyUserSecret"],
|
|
|
|
operatingEnvironment = App.Configuration["MSKAPIOPEnvironment"],
|
|
|
|
operatingEnvironment = App.Configuration["MSKAPIOPEnvironment"],
|
|
|
|