zhangxiaofeng 5 months ago
commit 6d77d7f713

@ -34,15 +34,20 @@ namespace Myshipping.Application.Service.BookingOrder
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
private readonly ILogger<BookingMSKSPOTAPIService> _logger;
private readonly ISysDataUserMenu _sysDataUserMenuService;
private readonly IDjyTenantParamService _djyTenantParamService;
const string CONST_MSK_API_COMMODITY_URL = "MSKApiCommodity";
const string CONST_MSK_API_BOOKING_URL = "MSKApiBooking";
const string CONST_MSK_SPOT_API_QUERY_SCHEDULE_RATE_URL = "MSKSPOTScheduleRate";
const string CONST_MSK_SPOT_API_LOCATION_URL = "MSKSPOTApilocation";
//租户MSK SPOT的备案注册信息
const string CONST_MSK_SPOT_COMPANY_INFO = "MSK_SPOT_API_COMPANY_INFO";
public BookingMSKSPOTAPIService(ILogger<BookingMSKSPOTAPIService> logger, ISysCacheService cache,
IDjyWebsiteAccountConfigService webAccountConfig, SqlSugarRepository<BookingDeliveryRecord> bookingDeliveryRecordRep,
ISysDataUserMenu sysDataUserMenuService,
IDjyTenantParamService djyTenantParamService,
SqlSugarRepository<BookingDeliveryRecordCtn> bookingDeliveryRecordCtnRep)
{
_logger = logger;
@ -51,6 +56,7 @@ namespace Myshipping.Application.Service.BookingOrder
_bookingDeliveryRecordRep = bookingDeliveryRecordRep;
_bookingDeliveryRecordCtnRep = bookingDeliveryRecordCtnRep;
_sysDataUserMenuService = sysDataUserMenuService;
_djyTenantParamService = djyTenantParamService;
}
#region 检索始发地、目的港口信息
@ -157,9 +163,9 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="model">请求船期详情</param>
/// <returns>返回船期结果</returns>
[HttpPost("/BookingMSKSPOTAPI/SearchShipSailingSchedule")]
public async Task<List<MSKAPISPOTSearchScheduleRateResultDataDto>> SearchShipSailingSchedule(QueryMSKSPOTShipSailingScheduleDto model)
public async Task<List<MSKAPISPOTScheduleRateResultShowDto>> SearchShipSailingSchedule(QueryMSKSPOTShipSailingScheduleDto model)
{
List<MSKAPISPOTSearchScheduleRateResultDataDto> list = new List<MSKAPISPOTSearchScheduleRateResultDataDto>();
List<MSKAPISPOTScheduleRateResultShowDto> list = new List<MSKAPISPOTScheduleRateResultShowDto>();
/*
MSKApiSailingSchedulePoint2Point
@ -285,12 +291,155 @@ namespace Myshipping.Application.Service.BookingOrder
if (resultInfo != null && resultInfo.code == 200
&& resultInfo.data != null && resultInfo.data.Count > 0)
{
list = resultInfo.data;
foreach (var scheduleModel in resultInfo.data)
{
CacheShipSailingSchedule(scheduleModel).GetAwaiter().GetResult();
}
list = resultInfo.data.Select(a =>
{
MSKAPISPOTScheduleRateResultShowDto showDto = new MSKAPISPOTScheduleRateResultShowDto
{
priceID = a.priceID,
PId = a.PId,
MD5 = a.MD5,
totalAmount = a.totalAmount.HasValue ? (decimal)a.totalAmount.Value : 0,
TotalCurrency = a.totalCurrency,
orignCarrierCityGeoID = a.originGeoId,
orignUNLocationCode = a.originUnLocCode,
orignCityName = a.originCityName,
originRegionName = a.originRegionName,
originCountryName = a.originCountryName,
deliveryCarrierCityGeoID = a.destinationGeoId,
deliveryUNLocationCode = a.destinationUnLocCode,
deliveryCityName = a.destinationCityName,
deliveryRegionName = a.destinationRegionName,
deliveryCountryName = a.destinationCountryName,
vesselName = a.vesselName,
carrierDepartureVoyageNumber = a.voyageNumber,
foreach (var scheduleModel in list)
Legs = new List<MSKAPISPOTScheduleRateResultShowLegsDto>()
};
//ETD
if (!string.IsNullOrWhiteSpace(a.departureDate))
{
await CacheShipSailingSchedule(scheduleModel);
DateTime currDate = DateTime.MinValue;
if (DateTime.TryParse(a.departureDate, out currDate))
{
showDto.ETD = currDate;
}
else
{
throw Oops.Bah($"查询船期错误priceID={a.priceID} pid={a.PId} 预计离港日期departureDate={a.departureDate} 格式解析错误");
}
}
//ETA
if (!string.IsNullOrWhiteSpace(a.arrivalDate))
{
DateTime currDate = DateTime.MinValue;
if (DateTime.TryParse(a.arrivalDate, out currDate))
{
showDto.ETA = currDate;
}
else
{
throw Oops.Bah($"查询船期错误priceID={a.priceID} pid={a.PId} 预计到达日期 arrivalDate={a.arrivalDate} 格式解析错误");
}
}
//计算预计天数
if (showDto.ETD.HasValue && showDto.ETA.HasValue)
{
TimeSpan ts = showDto.ETD.Value.Subtract(showDto.ETA.Value);
var timeDiff = ts.TotalHours;
showDto.days = (int)Math.Ceiling(timeDiff / 24.0);
}
if (a.isTransfer.Equals("true", StringComparison.OrdinalIgnoreCase))
showDto.isTransfer = true;
//Legs
if (a.scheduleDetails != null && a.scheduleDetails.Count > 0)
{
var legs = a.scheduleDetails.Select(b =>
{
MSKAPISPOTScheduleRateResultShowLegsDto leg = new MSKAPISPOTScheduleRateResultShowLegsDto
{
vesselName = b.transport.vessel.longName,
VoyageNo = b.transport.voyageNumber,
From = new MSKAPISPOTScheduleRateResultShowLegsLocationDto {
CityGeoId = b.fromLocation.cityGeoId,
CityName = b.fromLocation.cityName,
CountryCode = b.fromLocation.countryCode,
CountryName = b.fromLocation.countryName,
rkstCode = b.fromLocation.rkstCode,
SiteGeoId = b.fromLocation.siteGeoId,
LocationType = "From",
RegionName = b.fromLocation.regionName,
SiteName = b.fromLocation.siteName,
UnLocCode = b.fromLocation.unLocCode,
},
To = new MSKAPISPOTScheduleRateResultShowLegsLocationDto {
CityGeoId = b.toLocation.cityGeoId,
CityName = b.toLocation.cityName,
CountryCode = b.toLocation.countryCode,
CountryName = b.toLocation.countryName,
rkstCode = b.toLocation.rkstCode,
SiteGeoId = b.toLocation.siteGeoId,
LocationType = "To",
RegionName = b.toLocation.regionName,
SiteName = b.toLocation.siteName,
UnLocCode = b.toLocation.unLocCode,
}
};
//ETD
if (!string.IsNullOrWhiteSpace(b.fromLocation.date))
{
DateTime currDate = DateTime.MinValue;
if (DateTime.TryParse($"{b.fromLocation.date} {b.fromLocation.time}", out currDate))
{
leg.ETD = currDate;
}
else
{
throw Oops.Bah($"查询船期错误,航程明细 priceID={a.priceID} pid={a.PId} 预计离港日期fromLocation.date={b.fromLocation.date} {b.fromLocation.time} 格式解析错误");
}
}
//ETA
if (!string.IsNullOrWhiteSpace(b.toLocation.date))
{
DateTime currDate = DateTime.MinValue;
if (DateTime.TryParse(a.arrivalDate, out currDate))
{
leg.ETD = currDate;
}
else
{
throw Oops.Bah($"查询船期错误,航程明细 priceID={a.priceID} pid={a.PId} 预计到达日期 toLocation.date={b.toLocation.date} {b.toLocation.time} 格式解析错误");
}
}
return leg;
}).ToList();
showDto.Legs = legs.OrderBy(t=>t.ETD).Select((t,idx)=> {
t.SortNo = idx + 1;
return t;
}).ToList();
}
return showDto;
}).ToList();
}
else
{
@ -315,7 +464,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="model">船期查询结果明细</param>
/// <param name="busiType">船期类型 MSKSPOT-马士基即期</param>
/// <returns>返回主键ID</returns>
private async Task<long> CacheShipSailingSchedule(MSKAPISPOTSearchScheduleRateResultDataDto model,string busiType = "MSKSPOT")
private async Task CacheShipSailingSchedule(MSKAPISPOTSearchScheduleRateResultDataDto model,string busiType = "MSKSPOT")
{
/*
1IDKEY
@ -344,8 +493,6 @@ namespace Myshipping.Application.Service.BookingOrder
{
await _cache.SetTimeoutAsync(shareKey, Newtonsoft.Json.JsonConvert.SerializeObject(model), expireTimeSpan);
}
return model.PId;
}
#endregion
@ -356,7 +503,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="model">请求订舱详情</param>
/// <returns></returns>
[HttpPost("/BookingMSKSPOTAPI/SendMSKBooking")]
public async Task<MSKBookingResultDto> SendMSKBooking(MSKBookingDto model)
public async Task<MSKBookingResultDto> SendMSKBooking(MSKSPOTBookingDto model)
{
MSKBookingResultDto result = await InnerSendMSKBooking(model, 0);
return result;
@ -371,7 +518,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="currId">当前马士基订舱主键</param>
/// <param name="isDefaultSave">是否默认保存</param>
/// <returns></returns>
private async Task<MSKBookingResultDto> InnerSendMSKBooking(MSKBookingDto model, long currId, bool isDefaultSave = true)
private async Task<MSKBookingResultDto> InnerSendMSKBooking(MSKSPOTBookingDto model, long currId, bool isDefaultSave = true)
{
MSKBookingResultDto result = new MSKBookingResultDto();
@ -686,7 +833,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// 校验马士基API订舱必填项
/// </summary>
/// <param name="model"></param>
private void ValidateMSKAPIData(MSKBookingDto model)
private void ValidateMSKAPIData(MSKSPOTBookingDto model)
{
/*
API
@ -927,9 +1074,9 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="id">马士基API订舱ID</param>
/// <returns>返回详情</returns>
[HttpGet("/BookingMSKSPOTAPI/GetInfo")]
public async Task<MSKBookingDto> GetInfo(long id)
public async Task<MSKSPOTBookingDto> GetInfo(long id)
{
MSKBookingDto model = null;
MSKSPOTBookingDto model = null;
var entity = await _bookingDeliveryRecordRep.AsQueryable()
.FirstAsync(a => a.Id == id);
@ -937,7 +1084,7 @@ namespace Myshipping.Application.Service.BookingOrder
if (entity == null)
throw Oops.Oh($"获取马士基API订舱详情失败不存在或已作废");
model = entity.Adapt<MSKBookingDto>();
model = entity.Adapt<MSKSPOTBookingDto>();
var ctnList = _bookingDeliveryRecordCtnRep.AsQueryable()
.Where(a => a.RECORD_ID == id && a.IsDeleted == false).ToList();
@ -968,7 +1115,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="model">请求订舱详情</param>
/// <returns>返回ID</returns>
[HttpPost("/BookingMSKSPOTAPI/Save")]
public async Task<long> Save([FromBody] MSKBookingDto model)
public async Task<long> Save([FromBody] MSKSPOTBookingDto model)
{
return await InnerSave(model);
}
@ -981,7 +1128,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="model">API订舱详情</param>
/// <param name="isSendApi">是否发送APItrue-发送需要校验状态false-不校验状态</param>
/// <returns></returns>
private async Task<long> InnerSave(MSKBookingDto model, bool isSendApi = false)
private async Task<long> InnerSave(MSKSPOTBookingDto model, bool isSendApi = false)
{
DateTime nowDate = DateTime.Now;
@ -1256,7 +1403,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="model">马士基API批量复制指定数据</param>
/// <returns>返回执行结果消息</returns>
[HttpPost("/BookingMSKSPOTAPI/BatchCopy")]
public async Task<string> BatchCopy(MSKAPIBookingCopyDto model)
public async Task<string> BatchCopy(MSKAPISPOTBookingCopyDto model)
{
@ -1450,7 +1597,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="model">马士基API批量复制指定数据</param>
/// <returns>返回提示信息</returns>
[HttpPost("/BookingMSKSPOTAPI/CheckWarningBatchCopy")]
public async Task<string> CheckWarningBatchCopy(MSKAPIBookingCopyDto model)
public async Task<string> CheckWarningBatchCopy(MSKAPISPOTBookingCopyDto model)
{
/*
@ -1534,5 +1681,21 @@ namespace Myshipping.Application.Service.BookingOrder
return "校验成功";
}
#endregion
#region 获取初始化页面默认值
/// <summary>
/// 获取初始化页面默认值
/// </summary>
/// <returns>返回详情</returns>
public async Task<MSKSPOTBookingInitDto> GetInitInfo()
{
return null;
//var paramList = _djyTenantParamService.GetParaCodeWithValue(new[] { CONST_AMENDMENT_DEFAULT_PARAM,
// CONST_CANCELLATION_DEFAULT_PARAM,
// CONST_AMENDMENT_DING_DEFAULT_PARAM,
// CONST_CANCELLATION_DING_DEFAULT_PARAM }).GetAwaiter().GetResult();
}
#endregion
}
}

@ -7982,6 +7982,7 @@ namespace Myshipping.Application
SendTo = dto.SendTo,
Title = dto.Title,
Body = dto.Body,
CCTo= dto.CCTo,
SmtpConfig = "",
Account=userMail.MailAccount,
Password=userMail.Password,
@ -10440,7 +10441,7 @@ namespace Myshipping.Application
}
//提箱返场
var statusloglist = _repStatuslog.AsQueryable().Filter(null, true).Where(x => x.BookingId == item.Id && x.IsDeleted == false).ToList();
var statusloglist = _repStatuslog.AsQueryable().Filter(null, true).Where(x => x.BookingId == item.Id && x.IsDeleted == false && x.Category == "yunzong").ToList();
var statuslogId = statusloglist.Select(x => x.Id).ToList();
//运踪状态详情
var statuslogdetaillist = _statuslogdetail.AsQueryable().Where(x => statuslogId.Contains(x.PId)).ToList();

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class MSKAPISPOTBookingCopyDto
{
/// <summary>
/// 被复制马士基API订舱主键
/// </summary>
public long originalId { get; set; }
/// <summary>
/// 操作类型 only_copy-只单票复制copy_edit-复制使用提交的编辑信息
/// </summary>
public string opType { get; set; }
/// <summary>
/// 编辑详情(弹出编辑框后修改的详情内容)
/// </summary>
public MSKBookingDto bookingDto { get; set; }
/// <summary>
/// 复制数量
/// </summary>
public int copyNum { get; set; } = 1;
}
}

@ -40,6 +40,282 @@ namespace Myshipping.Application
public long PId { get; set; }
}
public class MSKAPISPOTScheduleRateResultShowDto
{
/// <summary>
/// 主键ID
/// </summary>
public long PId { get; set; }
/// <summary>
/// 船期MD5
/// </summary>
public string MD5 { get; set; }
/// <summary>
/// 价格id, 可进一步通过API进行其他操作
/// </summary>
public string priceID { get; set; }
/// <summary>
/// 币别
/// </summary>
public string TotalCurrency { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal totalAmount { get; set; }
/// <summary>
/// 是否中转
/// </summary>
public bool isTransfer { get; set; }
/// <summary>
/// ETD
/// </summary>
public Nullable<DateTime> ETD { get; set; }
/// <summary>
/// ETA
/// </summary>
public Nullable<DateTime> ETA { get; set; }
/// <summary>
/// 城市名(始发地)
/// </summary>
public string orignCityName { get; set; }
/// <summary>
/// 地点的GEO ID(始发地)
/// </summary>
public string orignCarrierSiteGeoID { get; set; }
/// <summary>
/// 地点的CITY GEO ID(始发地)
/// </summary>
public string orignCarrierCityGeoID { get; set; }
/// <summary>
/// 地点的名称(始发地)
/// </summary>
public string orignLocationName { get; set; }
/// <summary>
/// 省
/// </summary>
public string originRegionName { get; set; }
/// <summary>
/// 国家代码(始发地)
/// </summary>
public string orignCountryCode { get; set; }
/// <summary>
///国家名称(始发地)
/// </summary>
public string originCountryName { get; set; }
/// <summary>
/// 位置类型(始发地)
/// </summary>
public string orignLocationType { get; set; }
/// <summary>
/// 五字码(始发地)
/// </summary>
public string orignUNLocationCode { get; set; }
/// <summary>
/// 区代码(始发地)
/// </summary>
public string orignUNRegionCode { get; set; }
/// <summary>
/// 城市名(目的地)
/// </summary>
public string deliveryCityName { get; set; }
/// <summary>
/// 地点的GEO ID(目的地)
/// </summary>
public string deliveryCarrierSiteGeoID { get; set; }
/// <summary>
/// 地点的CITY GEO ID(目的地)
/// </summary>
public string deliveryCarrierCityGeoID { get; set; }
/// <summary>
/// 地点的名称(目的地)
/// </summary>
public string deliveryLocationName { get; set; }
/// <summary>
/// 省
/// </summary>
public string deliveryRegionName { get; set; }
/// <summary>
/// 国家代码(目的地)
/// </summary>
public string deliveryCountryCode { get; set; }
/// <summary>
/// 国家名称(目的地)
/// </summary>
public string deliveryCountryName { get; set; }
/// <summary>
/// 位置类型(目的地)
/// </summary>
public string deliveryLocationType { get; set; }
/// <summary>
/// 五字码(目的地)
/// </summary>
public string deliveryUNLocationCode { get; set; }
/// <summary>
/// 区代码(目的地)
/// </summary>
public string deliveryUNRegionCode { get; set; }
/// <summary>
/// IMO
/// </summary>
public string vesselIMONumber { get; set; }
/// <summary>
/// 航次号
/// </summary>
public string carrierVesselCode { get; set; }
/// <summary>
/// 运输方式
/// </summary>
public string transportMode { get; set; }
/// <summary>
/// 船名
/// </summary>
public string vesselName { get; set; }
/// <summary>
/// 航次代码
/// </summary>
public string carrierDepartureVoyageNumber { get; set; }
/// <summary>
/// 承运人代码(MAEU, SEAU, SEJJ, MCPU, MAEI)
/// </summary>
public string vesselOperatorCarrierCode { get; set; }
/// <summary>
/// 行程天数
/// </summary>
public int days { get; set; }
/// <summary>
/// 航程明细
/// </summary>
public List<MSKAPISPOTScheduleRateResultShowLegsDto> Legs { get; set; }
}
public class MSKAPISPOTScheduleRateResultShowLegsDto
{
/// <summary>
/// 排序值
/// </summary>
public int SortNo { get; set; }
/// <summary>
/// 船名
/// </summary>
public string vesselName { get; set; }
/// <summary>
/// 航次
/// </summary>
public string VoyageNo { get; set; }
/// <summary>
/// ETD
/// </summary>
public Nullable<DateTime> ETD { get; set; }
/// <summary>
/// ATD
/// </summary>
public Nullable<DateTime> ETA { get; set; }
/// <summary>
/// 起始地
/// </summary>
public MSKAPISPOTScheduleRateResultShowLegsLocationDto From { get; set; }
/// <summary>
/// 目的地
/// </summary>
public MSKAPISPOTScheduleRateResultShowLegsLocationDto To { get; set; }
}
public class MSKAPISPOTScheduleRateResultShowLegsLocationDto
{
/// <summary>
/// 定位类型 From-起始地 To-目的地
/// </summary>
public string LocationType { get; set; }
/// <summary>
/// 码头定位ID
/// </summary>
public string SiteGeoId { get; set; }
/// <summary>
/// 城市定位ID
/// </summary>
public string CityGeoId { get; set; }
/// <summary>
///
/// </summary>
public string rkstCode { get; set; }
/// <summary>
/// 城市定位ID
/// </summary>
public string UnLocCode { get; set; }
/// <summary>
/// 码头全称
/// </summary>
public string SiteName { get; set; }
/// <summary>
/// 城市名
/// </summary>
public string CityName { get; set; }
/// <summary>
/// 省
/// </summary>
public string RegionName { get; set; }
/// <summary>
/// 特别行政区或国家代码
/// </summary>
public string CountryCode { get; set; }
/// <summary>
/// 特别行政区或国家名称
/// </summary>
public string CountryName { get; set; }
}
/// <summary>
/// 马士基即期船期查询结果
/// </summary>
@ -146,7 +422,7 @@ namespace Myshipping.Application
public string voyageNumber { get; set; }
/// <summary>
/// 航次
/// 海运费
/// </summary>
public Nullable<long> oceanFreight { get; set; }

@ -7,6 +7,9 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 马士基SPOT订舱保存
/// </summary>
public class MSKSPOTBookingDto
{
/// <summary>

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// MSK SPOT 订舱初始加载详情
/// </summary>
public class MSKSPOTBookingInitDto
{
/// <summary>
/// 订舱方备案编号(马士基)
/// </summary>
public string bookedByMaerskPartyCode { get; set; }
/// <summary>
/// 订舱方备案全称(马士基)
/// </summary>
public string bookedByCompanyName { get; set; }
/// <summary>
/// 订舱方联系人(马士基)
/// </summary>
public string bookedByPartyContactName { get; set; }
/// <summary>
/// 订舱方联系邮箱(马士基)
/// </summary>
public string bookedByPartyContactEmail { get; set; }
/// <summary>
/// 持约方备案代码(马士基)
/// </summary>
public string priceOwnerMaerskPartyCode { get; set; }
/// <summary>
/// 持约方备案全称(马士基)
/// </summary>
public string priceOwnerCompanyName { get; set; }
}
}

@ -26,14 +26,14 @@ namespace Myshipping.Application.Service.BookingOrder
/// </summary>
/// <param name="model">请求船期详情</param>
/// <returns>返回船期结果</returns>
Task<List<MSKAPISPOTSearchScheduleRateResultDataDto>> SearchShipSailingSchedule(QueryMSKSPOTShipSailingScheduleDto model);
Task<List<MSKAPISPOTScheduleRateResultShowDto>> SearchShipSailingSchedule(QueryMSKSPOTShipSailingScheduleDto model);
/// <summary>
/// 发送马士基订舱请求
/// </summary>
/// <param name="model">请求订舱详情</param>
/// <returns>返回检索结果</returns>
Task<MSKBookingResultDto> SendMSKBooking(MSKBookingDto model);
Task<MSKBookingResultDto> SendMSKBooking(MSKSPOTBookingDto model);
/// <summary>
/// 检索商品名称
@ -47,14 +47,14 @@ namespace Myshipping.Application.Service.BookingOrder
/// </summary>
/// <param name="id">马士基API订舱ID</param>
/// <returns>返回详情</returns>
Task<MSKBookingDto> GetInfo(long id);
Task<MSKSPOTBookingDto> GetInfo(long id);
/// <summary>
/// 保存
/// </summary>
/// <param name="model">请求订舱详情</param>
/// <returns>返回ID</returns>
Task<long> Save(MSKBookingDto model);
Task<long> Save(MSKSPOTBookingDto model);
/// <summary>
/// 删除
@ -82,14 +82,14 @@ namespace Myshipping.Application.Service.BookingOrder
/// </summary>
/// <param name="model">马士基API批量复制指定数据</param>
/// <returns>返回提示信息</returns>
Task<string> CheckWarningBatchCopy(MSKAPIBookingCopyDto model);
Task<string> CheckWarningBatchCopy(MSKAPISPOTBookingCopyDto model);
/// <summary>
/// 批量复制
/// </summary>
/// <param name="model">马士基API批量复制指定数据</param>
/// <returns>返回执行结果消息</returns>
Task<string> BatchCopy(MSKAPIBookingCopyDto model);
Task<string> BatchCopy(MSKAPISPOTBookingCopyDto model);
/// <summary>
/// 同步BC状态BC,Cancellation
@ -99,5 +99,12 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="opTypeName">操作类型 BC-同步BC状态 Cancellation-同步取消状态</param>
/// <returns>返回回执</returns>
Task<MSKBookingResultDto> SyncBCInfo(string mblno, long tenantId, string opTypeName = "BookingConfirmation");
/// <summary>
/// 获取初始化页面默认值
/// </summary>
/// <returns>返回详情</returns>
Task<MSKSPOTBookingInitDto> GetInitInfo();
}
}

@ -3784,7 +3784,7 @@ namespace Myshipping.Application
cautionNoticeTaskWholeShipDto.VoynoNewVal = bcTargetDto.VoyNo;
cautionNoticeTaskWholeShipDto.IsVesselChange = true;
//isNeedWholeShip = true;
isNeedWholeShip = true;
}
else
{
@ -3860,26 +3860,6 @@ namespace Myshipping.Application
_logger.LogInformation($"触发整船提醒完成,结果={JSON.Serialize(wholeShipRlt)}");
}
else
{
if (cautionNoticeTaskWholeShipDto.IsVesselChange)
{
if (bookingSlotAllocList.Count > 0)
{
bookingSlotAllocList.ForEach(async ca =>
{
var bookingInfo = _repBookingOrder.AsQueryable().Filter(null, true).First(x => x.Id == ca.Alloc.BOOKING_ID && x.IsDeleted == false
&& x.TenantId == UserManager.TENANT_ID);
CreateTask(CautionNoticeTaskEnum.ChangeVesselVoyno, bcSrcDto, userList, bookingInfo, slotInfo, srcVesselVoyno, targetVesselVoyno, $"提单号:{bcSrcDto.MBLNo} \r\n船名航次变更了 \r\n原{srcVesselVoyno} \r\n新{targetVesselVoyno}", true);
});
}
else if (slotInfo != null)
{
CreateTask(CautionNoticeTaskEnum.ChangeVesselVoyno, bcSrcDto, userList, null, slotInfo, srcVesselVoyno, targetVesselVoyno, $"提单号:{bcSrcDto.MBLNo} \r\n船名航次变更了 \r\n原{srcVesselVoyno} \r\n新{targetVesselVoyno}", true);
}
}
}
}
}

Loading…
Cancel
Save