修改马士基API订舱

修改手工刷新运踪,自动推送服务状态
master
jianghaiqing 9 months ago
parent a23d80b637
commit 8788b01031

@ -312,6 +312,21 @@ namespace Myshipping.Application.Entity
/// </summary>
public string WEEK_AT { get; set; }
/// <summary>
/// 发送时间
/// </summary>
public Nullable<DateTime> SEND_TIME { get; set; }
/// <summary>
/// 是否定时任务 1-是 0-否
/// </summary>
public bool IS_JOB { get; set; }
/// <summary>
/// 是否定时任务 1-是 0-否
/// </summary>
public Nullable<DateTime> JOB_TIME { get; set; }
/// <summary>
/// 危险品类别
/// </summary>

@ -15,6 +15,8 @@ using Furion.DynamicApiController;
using Furion.DependencyInjection;
using Myshipping.Core.Service;
using Microsoft.Extensions.Logging;
using Myshipping.Application.Helper;
using System.Text.RegularExpressions;
namespace Myshipping.Application.Service.BookingOrder
{
@ -663,5 +665,189 @@ namespace Myshipping.Application.Service.BookingOrder
return list;
}
#endregion
#region 马士基API订舱台账
/// <summary>
/// 马士基API订舱台账
/// </summary>
/// <param name="QuerySearch">查询条件</param>
/// <returns>返回台账列表</returns>
public async Task<SqlSugarPagedList<BookingDeliveryRecordPageDto>> GetPageAsync([FromBody] QueryBookingDeliveryRecordDto QuerySearch)
{
/*
List<string> contaList = new List<string>();
if (!string.IsNullOrWhiteSpace(QuerySearch.ContaNo))
{
if (Regex.IsMatch(QuerySearch.ContaNo, "(\\t|\\n\\r|\\n)"))
{
contaList = Regex.Replace(QuerySearch.ContaNo, "(\\t |\\n\\r |\\n)", "#").Split(new char[] { '#' }).Select(t => t?.Trim()).ToList();
}
else
{
contaList.Add(QuerySearch.ContaNo.Trim());
}
}
//制单日期
DateTime createBegin = DateTime.MinValue;
DateTime createEnd = DateTime.MinValue;
//派车日期
DateTime truckDateBegin = DateTime.MinValue;
DateTime truckDateEnd = DateTime.MinValue;
//截单日期
DateTime closeDateBegin = DateTime.MinValue;
DateTime closeDateEnd = DateTime.MinValue;
//提货日期
DateTime pickUpTimeBegin = DateTime.MinValue;
DateTime pickUpTimeEnd = DateTime.MinValue;
//返场时间
DateTime returnTimeBegin = DateTime.MinValue;
DateTime returnTimeEnd = DateTime.MinValue;
//要求到达时间
DateTime needArriveTimeBegin = DateTime.MinValue;
DateTime needArriveTimeEnd = 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.TruckTimeBegin))
{
if (!DateTime.TryParse(QuerySearch.TruckTimeBegin, out truckDateBegin))
throw Oops.Oh($"派车起始日期格式错误,{QuerySearch.TruckTimeBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.TruckTimeEnd))
{
if (!DateTime.TryParse(QuerySearch.TruckTimeEnd, out truckDateEnd))
throw Oops.Oh($"派车结束日期格式错误,{QuerySearch.TruckTimeEnd}");
truckDateEnd = truckDateEnd.AddDays(1);
}
//截单日期
if (!string.IsNullOrWhiteSpace(QuerySearch.ClosingTimeBegin))
{
if (!DateTime.TryParse(QuerySearch.ClosingTimeBegin, out closeDateBegin))
throw Oops.Oh($"截单起始日期格式错误,{QuerySearch.ClosingTimeBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.ClosingTimeEnd))
{
if (!DateTime.TryParse(QuerySearch.ClosingTimeEnd, out closeDateEnd))
throw Oops.Oh($"截单结束日期格式错误,{QuerySearch.ClosingTimeEnd}");
closeDateEnd = closeDateEnd.AddDays(1);
}
//提货日期
if (!string.IsNullOrWhiteSpace(QuerySearch.PickUpTimeBegin))
{
if (!DateTime.TryParse(QuerySearch.PickUpTimeBegin, out pickUpTimeBegin))
throw Oops.Oh($"提货起始日期格式错误,{QuerySearch.PickUpTimeBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.PickUpTimeEnd))
{
if (!DateTime.TryParse(QuerySearch.ClosingTimeEnd, out pickUpTimeEnd))
throw Oops.Oh($"提货结束日期格式错误,{QuerySearch.PickUpTimeEnd}");
pickUpTimeEnd = pickUpTimeEnd.AddDays(1);
}
//返场时间
if (!string.IsNullOrWhiteSpace(QuerySearch.ReturnTimeBegin))
{
if (!DateTime.TryParse(QuerySearch.ReturnTimeBegin, out returnTimeBegin))
throw Oops.Oh($"返场起始日期格式错误,{QuerySearch.ReturnTimeBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.ReturnTimeEnd))
{
if (!DateTime.TryParse(QuerySearch.ReturnTimeEnd, out returnTimeEnd))
throw Oops.Oh($"返场结束日期格式错误,{QuerySearch.ReturnTimeEnd}");
returnTimeEnd = returnTimeEnd.AddDays(1);
}
//要求到达时间
if (!string.IsNullOrWhiteSpace(QuerySearch.NeedArriveTimeBegin))
{
if (!DateTime.TryParse(QuerySearch.NeedArriveTimeBegin, out needArriveTimeBegin))
throw Oops.Oh($"返场起始日期格式错误,{QuerySearch.NeedArriveTimeBegin}");
}
if (!string.IsNullOrWhiteSpace(QuerySearch.NeedArriveTimeEnd))
{
if (!DateTime.TryParse(QuerySearch.NeedArriveTimeEnd, out needArriveTimeEnd))
throw Oops.Oh($"返场结束日期格式错误,{QuerySearch.NeedArriveTimeEnd}");
needArriveTimeEnd = needArriveTimeEnd.AddDays(1);
}
#endregion
string entityOrderCol = "CreatedTime";
//这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
entityOrderCol = MapsterExtHelper.GetAdaptProperty<BookingTruckDto, BookingTruck>(QuerySearch.SortField);
var entities = await _bookingTruckRepository.AsQueryable()
.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(truckDateBegin != DateTime.MinValue, t => t.TruckTime.HasValue && t.TruckTime.Value >= truckDateBegin)
.WhereIF(truckDateEnd != DateTime.MinValue, t => t.TruckTime.HasValue && t.TruckTime.Value < truckDateEnd)
.WhereIF(closeDateBegin != DateTime.MinValue, t => t.ClosingTime.HasValue && t.ClosingTime.Value >= closeDateBegin)
.WhereIF(closeDateEnd != DateTime.MinValue, t => t.ClosingTime.HasValue && t.ClosingTime.Value < closeDateEnd)
.WhereIF(pickUpTimeBegin != DateTime.MinValue, t => t.PickUpTime.HasValue && t.PickUpTime.Value >= pickUpTimeBegin)
.WhereIF(pickUpTimeEnd != DateTime.MinValue, t => t.PickUpTime.HasValue && t.PickUpTime.Value < pickUpTimeEnd)
.WhereIF(returnTimeBegin != DateTime.MinValue, t => t.ReturnTime.HasValue && t.ReturnTime.Value >= returnTimeBegin)
.WhereIF(returnTimeEnd != DateTime.MinValue, t => t.ReturnTime.HasValue && t.ReturnTime.Value < returnTimeEnd)
.WhereIF(needArriveTimeBegin != DateTime.MinValue, t => t.NeedArriveTime.HasValue && t.NeedArriveTime.Value >= needArriveTimeBegin)
.WhereIF(needArriveTimeEnd != DateTime.MinValue, t => t.NeedArriveTime.HasValue && t.NeedArriveTime.Value < needArriveTimeEnd)
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Yard), t => t.YARDID.Contains(QuerySearch.Yard) || t.YARD.Contains(QuerySearch.Yard))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.InYard), t => t.InYardID.Contains(QuerySearch.Yard) || t.InYard.Contains(QuerySearch.Yard))
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), t => t.Status == QuerySearch.Status)
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " asc " : " desc "))
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
return entities.Adapt<SqlSugarPagedList<BookingTruckPageDto>>();
*/
return null;
}
#endregion
#region 获取马士基API订舱详情
/// <summary>
/// 获取马士基API订舱详情
/// </summary>
/// <param name="id">马士基API订舱ID</param>
/// <returns>返回详情</returns>
public async Task<BookingDeliveryRecordDto> GetInfo(long id)
{
BookingDeliveryRecordDto model = null;
var entity = await _bookingDeliveryRecordRep.AsQueryable()
.FirstAsync(a => a.Id == id);
if(entity == null)
throw Oops.Oh($"获取马士基API订舱详情失败不存在或已作废");
model = entity.Adapt<BookingDeliveryRecordDto>();
return model;
}
#endregion
}
}

@ -6,7 +6,370 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 主要记录订舱发送时的详情记录
/// </summary>
public class BookingDeliveryRecordDto
{
/// <summary>
/// ID
/// </summary>
public long id { get; set; }
/// <summary>
/// 订舱ID
/// </summary>
public long bookingId { get; set; }
/// <summary>
/// 船公司代号
/// </summary>
public string carrierId { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string carrier { get; set; }
/// <summary>
/// 合约号
/// </summary>
public string priceReference { get; set; }
/// <summary>
/// 产品类型
/// </summary>
public string productCode { get; set; }
/// <summary>
/// 请求类别
/// </summary>
public string sender { get; set; }
/// <summary>
/// 订舱公司名称(英文全称)
/// </summary>
public string bookedByCompanyName { get; set; }
/// <summary>
/// 订舱公司代码
/// </summary>
public string bookedByCompanyPartyCode { get; set; }
/// <summary>
/// 订舱公司联系人名称
/// </summary>
public string bookedByCompanyContact { get; set; }
/// <summary>
/// 订舱公司联系人邮箱
/// </summary>
public string bookedByCompanyEmail { get; set; }
/// <summary>
/// 当前订舱公司是否也是合约方 1-标识合约信息跟订舱公司一致0-标识有单独的合约方
/// </summary>
public bool isbookingPartOwnPrice { get; set; }
/// <summary>
/// 价格所有者公司名称
/// </summary>
public string priceOwnerCompanyName { get; set; }
/// <summary>
/// 价格所有者代码
/// </summary>
public string priceOwnerCompanyPartyCode { get; set; }
/// <summary>
/// 价格所有者公司联系人名称
/// </summary>
public string priceOwnerCompanyContact { get; set; }
/// <summary>
/// 价格所有者公司联系人邮箱
/// </summary>
public string priceOwnerCompanyContactEmail { get; set; }
/// <summary>
/// 承运人代码
/// </summary>
public string carrierCode { get; set; }
/// <summary>
/// 最早起运日期
/// </summary>
public Nullable<DateTime> earliestDepartureDate { get; set; }
/// <summary>
/// 出口服务类型
/// </summary>
public string exportServiceMode { get; set; }
/// <summary>
/// 进口服务类型
/// </summary>
public string importServiceMode { get; set; }
/// <summary>
/// 收货地城市英文名称
/// </summary>
public string placeReceiptCity { get; set; }
/// <summary>
/// 收货地UN地点代码
/// </summary>
public string placeReceiptUnlocCode { get; set; }
/// <summary>
/// 收货地代码
/// </summary>
public string placeReceiptId { get; set; }
/// <summary>
/// 收货地
/// </summary>
public string placeReceipt { get; set; }
/// <summary>
/// 交货地城市英文名称
/// </summary>
public string placeDeliveryCity { get; set; }
/// <summary>
/// 交货地UN地点代码
/// </summary>
public string placeDeliveryUnlocCode { get; set; }
/// <summary>
/// 预计开船日期
/// </summary>
public Nullable<DateTime> etd { get; set; }
/// <summary>
/// 预计到港日期
/// </summary>
public Nullable<DateTime> atd { get; set; }
/// <summary>
/// 船名
/// </summary>
public string vessel { get; set; }
/// <summary>
/// 船名代码
/// </summary>
public string vesselCode { get; set; }
/// <summary>
/// 航次号
/// </summary>
public string voyno { get; set; }
/// <summary>
/// 运输方式
/// </summary>
public string transportMode { get; set; }
/// <summary>
/// 重量
/// </summary>
public Nullable<int> totalCargoWeight { get; set; }
/// <summary>
/// 是否冷冻处理 1-是0-否
/// </summary>
public bool isReefer { get; set; }
/// <summary>
/// 温度探头的数量
/// </summary>
public Nullable<int> noOfProbes { get; set; }
/// <summary>
/// 设置温度
/// </summary>
public string tempSet { get; set; }
/// <summary>
/// 温度单位
/// </summary>
public string tempId { get; set; }
/// <summary>
/// 通风度
/// </summary>
public Nullable<int> vent { get; set; }
/// <summary>
/// 湿度
/// </summary>
public Nullable<int> humidity { get; set; }
/// <summary>
/// 货物标识
/// </summary>
public string cargoId { get; set; }
/// <summary>
/// 货物代码类型
/// </summary>
public string commodityCodeType { get; set; }
/// <summary>
/// 品名代码
/// </summary>
public string goodsCode { get; set; }
/// <summary>
/// 品名
/// </summary>
public string goodsName { get; set; }
/// <summary>
/// 货物类型
/// </summary>
public string cargoType { get; set; }
/// <summary>
/// 交货地代码
/// </summary>
public string placeDeliveryId { get; set; }
/// <summary>
/// 交货地
/// </summary>
public string placeDelivery { get; set; }
/// <summary>
/// 装货港代码
/// </summary>
public string portLoadId { get; set; }
/// <summary>
/// 装货港
/// </summary>
public string portLoad { get; set; }
/// <summary>
/// 卸货港代码
/// </summary>
public string portDischargeId { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string portDischarge { get; set; }
/// <summary>
/// 航线代码(船公司)
/// </summary>
public string laneCode { get; set; }
/// <summary>
/// 航线名称(船公司)
/// </summary>
public string laneName { get; set; }
/// <summary>
/// 承运方式 DIRECT_SHIP-直达TRANSFER_SHIP-中转
/// </summary>
public string carriageType { get; set; }
/// <summary>
/// 承运方式名称 CONTRACT_ORDER-合约订舱SPOT_ORDER-SPOT订舱
/// </summary>
public string carriageTypeName { get; set; }
/// <summary>
/// 订舱方式 CONTRACT_ORDER-合约订舱SPOT_ORDER-SPOT订舱
/// </summary>
public string bookingSlotType { get; set; }
/// <summary>
/// 订舱方式名称 CONTRACT_ORDER-合约订舱SPOT_ORDER-SPOT订舱
/// </summary>
public string bookingSlotTypeName { get; set; }
/// <summary>
/// 签单方式 ORIGINAL-正本TELEX-电放SEAWAY BILL-海运单;
/// </summary>
public string issueType { get; set; }
/// <summary>
/// 箱型箱量
/// </summary>
public string ctnStat { get; set; }
/// <summary>
/// 所在周数
/// </summary>
public string weekAt { get; set; }
/// <summary>
/// 危险品类别
/// </summary>
public string dClass { get; set; }
/// <summary>
/// 危险品编号
/// </summary>
public string duNo { get; set; }
/// <summary>
/// 危险品页号
/// </summary>
public string dPage { get; set; }
/// <summary>
/// 危险品标签
/// </summary>
public string dLabel { get; set; }
/// <summary>
/// 危险品联系人
/// </summary>
public string linkMan { get; set; }
/// <summary>
/// 预计运输天数
/// </summary>
public Nullable<int> transportEstDay { get; set; }
/// <summary>
/// 订舱回执ID
/// </summary>
public string requestAcknowledgementId { get; set; }
/// <summary>
/// 订舱回执预定号
/// </summary>
public string bookingReference { get; set; }
/// <summary>
/// 状态 SUCC-成功FAILURE-失败
/// </summary>
public string status { get; set; }
/// <summary>
/// 发送备注
/// </summary>
public string notes { get; set; }
/// <summary>
/// 发送时间
/// </summary>
public Nullable<DateTime> sendTime { get; set; }
/// <summary>
/// 是否定时任务
/// </summary>
public bool isJob { get; set; }
/// <summary>
/// 定时时间
/// </summary>
public Nullable<DateTime> jobTime { get; set; }
}
}

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
internal class BookingDeliveryRecordPageDto
public class BookingDeliveryRecordPageDto
{
}
}

@ -94,7 +94,6 @@ namespace Myshipping.Application
config.ForType<MSKBookingDto, BookingDeliveryRecord>()
.Map(dest => dest.CARRIERID, src => src.carrierId)
.Map(dest => dest.BookingId, src => src.bookingId)
.Map(dest => dest.PRICE_REFERENCE, src => src.priceReference)
.Map(dest => dest.PRODUCT_CODE, src => src.productCode)
.Map(dest => dest.SENDER, src => src.sender)
@ -136,6 +135,67 @@ namespace Myshipping.Application
.Map(dest => dest.CTN_NUM, src => src.ctnNum)
.Map(dest => dest.CTN_SUFFER_WEIGHT, src => src.ctnSufferWeight);
config.ForType<BookingDeliveryRecord, BookingDeliveryRecordDto>()
.Map(dest => dest.id, src => src.Id)
.Map(dest => dest.carrierId, src => src.CARRIERID)
.Map(dest => dest.priceReference, src => src.PRICE_REFERENCE)
.Map(dest => dest.productCode, src => src.PRODUCT_CODE)
.Map(dest => dest.sender, src => src.SENDER)
.Map(dest => dest.bookedByCompanyName, src => src.BOOKEDBY_COMPANY_NAME)
.Map(dest => dest.bookedByCompanyPartyCode, src => src.BOOKEDBY_COMPANY_PARTYCODE)
.Map(dest => dest.bookedByCompanyContact, src => src.BOOKEDBY_COMPANY_CONTACT)
.Map(dest => dest.bookedByCompanyEmail, src => src. BOOKEDBY_COMPANY_CONTACT_EMAIL)
.Map(dest => dest.isbookingPartOwnPrice, src => src.IS_BOOKING_PART_OWN_PRICE)
.Map(dest => dest.priceOwnerCompanyName, src => src.PRICE_OWNER_COMPANY_NAME)
.Map(dest => dest.priceOwnerCompanyPartyCode, src => src.PRICE_OWNER_COMPANY_PARTYCODE)
.Map(dest => dest.priceOwnerCompanyContact, src => src.PRICE_OWNER_COMPANY_CONTACT)
.Map(dest => dest.priceOwnerCompanyContactEmail, src => src.PRICE_OWNER_COMPANY_CONTACT_EMAIL)
.Map(dest => dest.carrierCode, src => src.CARRIER_CODE)
.Map(dest => dest.earliestDepartureDate, src => src.EARLIEST_DEPARTURE_DATE)
.Map(dest => dest.exportServiceMode, src => src.EXPORT_SERVICE_MODE)
.Map(dest => dest.importServiceMode, src => src.IMPORT_SERVICE_MODE)
.Map(dest => dest.placeReceiptCity, src => src.PLACERECEIPT_CITY)
.Map(dest => dest.placeReceiptUnlocCode, src => src.PLACERECEIPT_UNLOC_CODE)
.Map(dest => dest.placeDeliveryCity, src => src.PLACEDELIVERY_CITY)
.Map(dest => dest.placeDeliveryUnlocCode, src => src.PLACEDELIVERY_UNLOC_CODE)
.Map(dest => dest.etd, src => src.ETD)
.Map(dest => dest.atd, src => src.ETA)
.Map(dest => dest.vessel, src => src.VESSEL)
.Map(dest => dest.vesselCode, src => src.VESSEL_CODE)
.Map(dest => dest.voyno, src => src.VOYNO)
.Map(dest => dest.transportMode, src => src.TRANSPORT_MODE)
.Map(dest => dest.totalCargoWeight, src => src.TOTAL_CARGO_WEIGHT)
.Map(dest => dest.noOfProbes, src => src.NO_OF_PROBES)
.Map(dest => dest.tempSet, src => src.TEMPSET)
.Map(dest => dest.tempId, src => src.TEMPID)
.Map(dest => dest.vent, src => src.VENT)
.Map(dest => dest.humidity, src => src.HUMIDITY)
.Map(dest => dest.commodityCodeType, src => src.COMMODITY_CODE_TYPE)
.Map(dest => dest.goodsCode, src => src.GOODSCODE)
.Map(dest => dest.goodsName, src => src.GOODSNAME)
.Map(dest => dest.isReefer, src => src.IS_REEFER)
.Map(dest => dest.cargoType, src => src.CARGO_TYPE)
.Map(dest => dest.placeDeliveryId, src => src.PLACEDELIVERYID)
.Map(dest => dest.placeDelivery, src => src.PLACEDELIVERY)
.Map(dest => dest.portLoadId, src => src.PORTLOADID)
.Map(dest => dest.portLoad, src => src.PORTLOAD)
.Map(dest => dest.portDischargeId, src => src.PORTDISCHARGEID)
.Map(dest => dest.portDischarge, src => src.PORTDISCHARGE)
.Map(dest => dest.laneCode, src => src.LANECODE)
.Map(dest => dest.laneName, src => src.LANENAME)
.Map(dest => dest.carriageType, src => src.CARRIAGE_TYPE)
.Map(dest => dest.carriageTypeName, src => src.CARRIAGE_TYPE_NAME)
.Map(dest => dest.bookingSlotType, src => src.BOOKING_SLOT_TYPE)
.Map(dest => dest.bookingSlotTypeName, src => src.BOOKING_SLOT_TYPE_NAME)
.Map(dest => dest.issueType, src => src.ISSUETYPE)
.Map(dest => dest.ctnStat, src => src.CTN_STAT)
.Map(dest => dest.weekAt, src => src.WEEK_AT)
.Map(dest => dest.sendTime, src => src.SEND_TIME)
.Map(dest => dest.cargoType, src => src.CARGO_TYPE);
}
}
}

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class QueryBookingDeliveryRecordDto
{
}
}

@ -43,9 +43,13 @@ namespace Myshipping.Application
/// </summary>
/// <param name="QuerySearch">查询条件</param>
/// <returns>返回台账列表</returns>
//Task<SqlSugarPagedList<BookingDeliveryRecordPageDto>> GetPageAsync(QueryBookingTruckDto QuerySearch);
Task<SqlSugarPagedList<BookingDeliveryRecordPageDto>> GetPageAsync(QueryBookingDeliveryRecordDto QuerySearch);
//Task<>
/// <summary>
/// 获取马士基API订舱详情
/// </summary>
/// <param name="id">马士基API订舱ID</param>
/// <returns>返回详情</returns>
Task<BookingDeliveryRecordDto> GetInfo(long id);
}
}

@ -17,6 +17,7 @@ using System.Net.Http;
using Myshipping.Application.Service.BookingYunZong.Dto;
using Myshipping.Core.Entity;
using Mapster;
using Furion.JsonSerialization;
namespace Myshipping.Application
{
@ -34,8 +35,9 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingStatusLogDetail> _statuslogdetail;
private readonly SqlSugarRepository<BookingStatus> _repBookingStatus;
private readonly IBookingOrderService _bookingorderservice;
private readonly IBookingValueAddedService _bookingValueAddedService;
public BookingYunZongService(ILogger<BookingYunZongService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService account, SqlSugarRepository<BookingStatus> repBookingStatus,
SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingStatusLog> repStatuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail, IBookingOrderService bookingorderservice)
SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingStatusLog> repStatuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail, IBookingOrderService bookingorderservice, IBookingValueAddedService bookingValueAddedService)
{
_cache = cache;
_account = account;
@ -45,6 +47,7 @@ namespace Myshipping.Application
_statuslogdetail = statuslogdetail;
_repBookingStatus = repBookingStatus;
_bookingorderservice = bookingorderservice;
_bookingValueAddedService = bookingValueAddedService;
}
/// <summary>
@ -206,6 +209,19 @@ namespace Myshipping.Application
bookingStatusLog.MBLNO = mblno;
await _repStatuslog.InsertAsync(bookingStatusLog);
//发送服务状态
var pushModel = new ModifyServiceProjectStatusDto
{
BookingId = bookingId,
SourceType = TrackingSourceTypeEnum.AUTO,
StatusCodes = new List<ModifyServiceProjectStatusDetailDto> {
new ModifyServiceProjectStatusDetailDto { StatusCode = "YTX", SetActDate = bookingStatusLog.OpTime } }
};
var saveStatusRlt = await _bookingValueAddedService.SaveServiceStatus(pushModel);
_logger.LogInformation("请求JSON={json} 异步推送服务状态完成,结果={rlt}", JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
foreach (var dt in yarddto)
{
var BookingStatusLogDetail = new BookingStatusLogDetail();

@ -2352,7 +2352,7 @@ namespace Myshipping.Application
var saveStatusRlt = await _bookingValueAddedService.SaveServiceStatus(pushModel);
_logger.LogInformation("请求JSON={json} 异步推送下货纸比对状态完成,结果={rlt}", JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
_logger.LogInformation("请求JSON={json} 异步推送服务状态完成,结果={rlt}", JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
#endregion
}
#endregion

@ -683,7 +683,7 @@ namespace Myshipping.Application
if (bcOrder.BOOKING_ORDER_ID.HasValue && bcOrder.BOOKING_ORDER_ID.Value > 0)
{
throw Oops.Oh($"当前BC任务已生成订舱或舱位,不能重复生成");
throw Oops.Oh($"当前BC任务已生成订舱,不能重复生成");
}
if (model.GenerateMethod == "GEN_BOOKING_SLOT")

Loading…
Cancel
Save