wanghaomei 5 months ago
commit b9520ee795

@ -157,9 +157,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 +285,158 @@ 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 list)
foreach (var scheduleModel in resultInfo.data)
{
await CacheShipSailingSchedule(scheduleModel);
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,
Legs = new List<MSKAPISPOTScheduleRateResultShowLegsDto>()
};
//ETD
if (!string.IsNullOrWhiteSpace(a.departureDate))
{
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 +461,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 +490,6 @@ namespace Myshipping.Application.Service.BookingOrder
{
await _cache.SetTimeoutAsync(shareKey, Newtonsoft.Json.JsonConvert.SerializeObject(model), expireTimeSpan);
}
return model.PId;
}
#endregion
@ -920,181 +1064,6 @@ namespace Myshipping.Application.Service.BookingOrder
}
#endregion
#region 马士基API订舱台账
/// <summary>
/// 马士基API订舱台账
/// </summary>
/// <param name="QuerySearch">查询条件</param>
/// <returns>返回台账列表</returns>
[HttpPost("/BookingMSKSPOTAPI/GetPage")]
public async Task<SqlSugarPagedList<BookingDeliveryRecordPageDto>> GetPageAsync([FromBody] QueryBookingDeliveryRecordDto QuerySearch)
{
//制单日期
DateTime createBegin = DateTime.MinValue;
DateTime createEnd = DateTime.MinValue;
//更新日期
DateTime updateBegin = DateTime.MinValue;
DateTime updateEnd = DateTime.MinValue;
//预计离港日期
DateTime edepartureBegin = DateTime.MinValue;
DateTime edepartureEnd = DateTime.MinValue;
//ETD日期
DateTime etdBegin = DateTime.MinValue;
DateTime etdEnd = DateTime.MinValue;
//ETA时间
DateTime etaBegin = DateTime.MinValue;
DateTime etaEnd = DateTime.MinValue;
//定时
DateTime jobBegin = DateTime.MinValue;
DateTime jobEnd = DateTime.MinValue;
#region 查询条件
//制单日期
if (!string.IsNullOrWhiteSpace(QuerySearch.CreateBegin))
{
if (!DateTime.TryParse(QuerySearch.CreateBegin, out createBegin))
throw Oops.Oh($"创建起始日期格式错误,{QuerySearch.CreateBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.CreateEnd))
{
if (!DateTime.TryParse(QuerySearch.CreateEnd, out createEnd))
throw Oops.Oh($"创建结束日期格式错误,{QuerySearch.CreateEnd}");
createEnd = createEnd.AddDays(1);
}
//更新日期
if (!string.IsNullOrWhiteSpace(QuerySearch.UpdateBegin))
{
if (!DateTime.TryParse(QuerySearch.UpdateBegin, out updateBegin))
throw Oops.Oh($"更新起始日期开始格式错误,{QuerySearch.UpdateBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.UpdateEnd))
{
if (!DateTime.TryParse(QuerySearch.UpdateEnd, out updateEnd))
throw Oops.Oh($"更新结束日期格式错误,{QuerySearch.UpdateEnd}");
updateEnd = updateEnd.AddDays(1);
}
//预计离港日期
if (!string.IsNullOrWhiteSpace(QuerySearch.EDepartureBegin))
{
if (!DateTime.TryParse(QuerySearch.EDepartureBegin, out edepartureBegin))
throw Oops.Oh($"预计离港日期起始格式错误,{QuerySearch.EDepartureBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.EDepartureEnd))
{
if (!DateTime.TryParse(QuerySearch.EDepartureEnd, out edepartureEnd))
throw Oops.Oh($"预计离港日期结束格式错误,{QuerySearch.EDepartureEnd}");
edepartureEnd = edepartureEnd.AddDays(1);
}
//ETD
if (!string.IsNullOrWhiteSpace(QuerySearch.ETDBegin))
{
if (!DateTime.TryParse(QuerySearch.ETDBegin, out etdBegin))
throw Oops.Oh($"ETD起始日期格式错误{QuerySearch.ETDBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.ETDEnd))
{
if (!DateTime.TryParse(QuerySearch.ETDEnd, out etdEnd))
throw Oops.Oh($"ETD结束日期格式错误{QuerySearch.ETDEnd}");
etdEnd = etdEnd.AddDays(1);
}
//ETA
if (!string.IsNullOrWhiteSpace(QuerySearch.ETDBegin))
{
if (!DateTime.TryParse(QuerySearch.ETDBegin, out etaBegin))
throw Oops.Oh($"ETA起始日期格式错误{QuerySearch.ETDBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.ETAEnd))
{
if (!DateTime.TryParse(QuerySearch.ETAEnd, out etaEnd))
throw Oops.Oh($"ETA结束日期格式错误{QuerySearch.ETAEnd}");
etaEnd = etaEnd.AddDays(1);
}
//定时
if (!string.IsNullOrWhiteSpace(QuerySearch.JOBBegin))
{
if (!DateTime.TryParse(QuerySearch.JOBBegin, out jobBegin))
throw Oops.Oh($"返场起始日期格式错误,{QuerySearch.JOBBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.JOBEnd))
{
if (!DateTime.TryParse(QuerySearch.JOBEnd, out jobEnd))
throw Oops.Oh($"返场结束日期格式错误,{QuerySearch.JOBEnd}");
jobEnd = jobEnd.AddDays(1);
}
#endregion
string entityOrderCol = "CreatedTime";
//这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
entityOrderCol = MapsterExtHelper.GetAdaptProperty<BookingDeliveryRecordDto, BookingDeliveryRecord>(QuerySearch.SortField);
//菜单375504048771141=我的任务台账
List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi);
bool isAdmin = false;
if (userlist == null)
{
isAdmin = true;
userlist = new List<long>();
}
else if (userlist != null && userlist.Count > 0)
{
userlist.Add(UserManager.UserId);
userlist = userlist.Distinct().ToList();
}
_logger.LogInformation("任务台账权限范围 {list}", userlist);
var entities = await _bookingDeliveryRecordRep.AsQueryable()
.Where(t => isAdmin || userlist.Contains(t.CreatedUserId.Value))
.WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin)
.WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd)
.WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin)
.WhereIF(updateEnd != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value < updateEnd)
.WhereIF(edepartureBegin != DateTime.MinValue, t => t.EARLIEST_DEPARTURE_DATE.HasValue && t.EARLIEST_DEPARTURE_DATE.Value >= edepartureBegin)
.WhereIF(edepartureEnd != DateTime.MinValue, t => t.EARLIEST_DEPARTURE_DATE.HasValue && t.EARLIEST_DEPARTURE_DATE.Value < edepartureEnd)
.WhereIF(etdBegin != DateTime.MinValue, t => t.ETD.HasValue && t.ETD.Value >= etdBegin)
.WhereIF(etdEnd != DateTime.MinValue, t => t.ETD.HasValue && t.ETA.Value < etdEnd)
.WhereIF(etaBegin != DateTime.MinValue, t => t.ETA.HasValue && t.ETA.Value >= etaBegin)
.WhereIF(etaEnd != DateTime.MinValue, t => t.ETA.HasValue && t.ETA.Value < etaEnd)
.WhereIF(jobBegin != DateTime.MinValue, t => t.JOB_TIME.HasValue && t.JOB_TIME.Value >= jobBegin)
.WhereIF(jobEnd != DateTime.MinValue, t => t.JOB_TIME.HasValue && t.JOB_TIME.Value < jobEnd)
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PriceReference), t => t.PRICE_REFERENCE.Contains(QuerySearch.PriceReference))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookedByCompanyName), t => t.BOOKEDBY_COMPANY_NAME.Contains(QuerySearch.BookedByCompanyName))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookedByCompanyPartyCode), t => t.BOOKEDBY_COMPANY_PARTYCODE.Contains(QuerySearch.BookedByCompanyPartyCode))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PriceOwnerCompanyName), t => t.PRICE_OWNER_COMPANY_NAME.Contains(QuerySearch.PriceOwnerCompanyName))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PriceOwnerCompanyPartyCode), t => t.PRICE_OWNER_COMPANY_PARTYCODE.Contains(QuerySearch.PriceOwnerCompanyPartyCode))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PlaceReceiptCity), t => t.PLACERECEIPT_CITY.Contains(QuerySearch.PlaceReceiptCity) || t.PLACERECEIPT_UNLOC_CODE.Contains(QuerySearch.PlaceReceiptCity))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PlaceDeliveryCity), t => t.PLACEDELIVERY_CITY.Contains(QuerySearch.PlaceDeliveryCity) || t.PLACEDELIVERY_UNLOC_CODE.Contains(QuerySearch.PlaceDeliveryCity))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookingReference), t => t.BOOKING_REFERENCE.Contains(QuerySearch.BookingReference))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.BookingCreator), t => t.CreatedUserName.Contains(QuerySearch.BookingCreator) || t.UpdatedUserName.Contains(QuerySearch.BookingCreator))
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
return entities.Adapt<SqlSugarPagedList<BookingDeliveryRecordPageDto>>();
}
#endregion
#region 获取马士基API订舱详情
/// <summary>
/// 获取马士基API订舱详情

@ -10350,11 +10350,7 @@ namespace Myshipping.Application
}
}
//2024-06-20 这里如果遇到拆票情况需要重新组织提单号
if (item.SPLIT_OR_MERGE_FLAG.HasValue && (item.SPLIT_OR_MERGE_FLAG.Value == 1 || item.SPLIT_OR_MERGE_FLAG.Value == 2))
{
dto.MBLNO = $"{item.MBLNO}-{item.HBLNO}";
}
var ctn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == item.Id && x.IsDeleted == false).ToListAsync();
dto.ctnInputs = ctn.Adapt<List<BookingCtnDto>>();
foreach (var it in dto.ctnInputs)
@ -10362,6 +10358,45 @@ namespace Myshipping.Application
var ctnDetailInputs = await _ctndetailrep.AsQueryable().Filter(null, true).Where(x => x.CTNID == it.Id && x.IsDeleted == false).ToListAsync();
it.ctnDetailInputs = ctnDetailInputs.Adapt<List<BookingCtnDetailDto>>();
}
//2024-06-20 这里如果遇到拆票情况需要重新组织提单号
if (item.SPLIT_OR_MERGE_FLAG.HasValue && (item.SPLIT_OR_MERGE_FLAG.Value == 1 || item.SPLIT_OR_MERGE_FLAG.Value == 2))
{
dto.MBLNO = $"{item.MBLNO}-{item.HBLNO}";
//如果当前是合票时,需要所有子票的箱型箱量合并到主票同步到东胜,子票的箱型箱量不同步东胜
if (item.SPLIT_OR_MERGE_FLAG.Value == 2)
{
//如果当前是主票
if(dto.CUSTNO.Equals(dto.HBLNO,StringComparison.OrdinalIgnoreCase))
{
var allOrderList = await _rep.AsQueryable().Filter(null, true).Where(x => dto.HBLNO == x.HBLNO && (x.SPLIT_OR_MERGE_FLAG != null && x.SPLIT_OR_MERGE_FLAG == 2)
&& x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
if (allOrderList.Count > 0)
{
var allOrderIds = allOrderList.Select(x => x.Id).ToList();
var currCtn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID != null && allOrderIds.Contains(x.BILLID.Value)
&& x.IsDeleted == false).ToListAsync();
dto.ctnInputs = currCtn.Adapt<List<BookingCtnDto>>();
foreach (var it in dto.ctnInputs)
{
var ctnDetailInputs = await _ctndetailrep.AsQueryable().Filter(null, true).Where(x => x.CTNID == it.Id && x.IsDeleted == false).ToListAsync();
it.ctnDetailInputs = ctnDetailInputs.Adapt<List<BookingCtnDetailDto>>();
}
dto.CNTRTOTAL = string.Join(",", dto.ctnInputs.GroupBy(x => x.CTNALL).Select(x => $"{x.Key}*{x.Sum(b => b.CTNNUM)}").ToArray());
}
}
else
{
dto.ctnInputs = new List<BookingCtnDto>();
dto.CNTRTOTAL = string.Empty;
}
}
}
//EDI
var BookingEDIExt = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == item.Id && x.IsDeleted == false).FirstAsync();
if (BookingEDIExt != null)
@ -11704,7 +11739,7 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(order.HSCODE))
{
//如果录的HS CODE符合海领要求直接用HS CODE
if (Regex.IsMatch(order.HSCODE, "[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}") && order.HSCODE.Length == 12)
if (Regex.IsMatch(order.HSCODE, "[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}") && order.HSCODE.Length == 13)
{
voltaModel.HSCode = order.HSCODE;
}
@ -11734,7 +11769,7 @@ namespace Myshipping.Application
{
s4 = voltaModel.HSCode.Substring(8, 2);
}
//0000.00.00.00
voltaModel.HSCode = $"{s1}.{(s2.Length == 2 ? s2 : "00")}.{(s3.Length == 2 ? s3 : "00")}.{(s4.Length == 2 ? s4 : "00")}";
}
else

@ -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; }

@ -26,7 +26,7 @@ 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>
/// 发送马士基订舱请求
@ -42,14 +42,6 @@ namespace Myshipping.Application.Service.BookingOrder
/// <returns>返回检索结果</returns>
Task<List<SearchCommodityResultDto>> SearchCommodities(QueryCommoditiesDto model);
/// <summary>
/// 马士基API订舱台账
/// </summary>
/// <param name="QuerySearch">查询条件</param>
/// <returns>返回台账列表</returns>
Task<SqlSugarPagedList<BookingDeliveryRecordPageDto>> GetPageAsync(QueryBookingDeliveryRecordDto QuerySearch);
/// <summary>
/// 获取马士基API订舱详情
/// </summary>

@ -90,7 +90,7 @@ public class MenuInput
/// <summary>
/// 是否启用数据授权
/// </summary>
public bool IsEnableDataScope { get; set; }
public bool? IsEnableDataScope { get; set; }
}
public class AddMenuInput : MenuInput

@ -440,7 +440,8 @@ public class SysMenuService : ISysMenuService, IDynamicApiController, ITransient
List<MenuTreeOutput> menus = await _sysMenuRep.AsQueryable()
.LeftJoin<SysApp>((t1, t2) => t1.Application == t2.Code)
.Where(t1 => t1.Status == (int)CommonStatus.ENABLE && t1.IsEnableDataScope)
.Where(t1 => t1.Status == (int)CommonStatus.ENABLE)
.WhereIF(input.IsEnableDataScope != null, t1 => t1.IsEnableDataScope == input.IsEnableDataScope)
.WhereIF(menuIdList.Any(), t1 => menuIdList.Contains(t1.Id))
.OrderBy(t1 => t1.Sort)
.Select((t1, t2) => new MenuTreeOutput

Loading…
Cancel
Save