修改MSK SPOT

master
jianghaiqing 5 months ago
parent c2b7df4870
commit d62bb7f335

@ -1373,6 +1373,7 @@ namespace Myshipping.Application.Service.BookingOrder
x.BookingId,
x.REQUEST_ACKNOWLEDGEMENT_ID,
x.STATUS,
x.STATUS_NAME,
x.TenantId,
x.IS_RECV_BC,
x.LST_RECV_BC_DATE,
@ -1693,8 +1694,6 @@ namespace Myshipping.Application.Service.BookingOrder
[HttpPost("/BookingMSKSPOTAPI/BatchCopy")]
public async Task<string> BatchCopy(MSKAPISPOTBookingCopyDto model)
{
if (model.copyNum < 1)
throw Oops.Oh($"复制数量不能小于1");
@ -1763,6 +1762,20 @@ namespace Myshipping.Application.Service.BookingOrder
entity.CTN_STAT = ctnStat;
}
MSKAPISPOTSearchScheduleRateResultDataDto selectedShipSchedule = null;
if (entity.SHIP_RATE_PID > 0)
{
BookingDeliveryRecordShipSchedule shipScheduleRecord = await _bookingDeliveryRecordShipScheduleRep.AsQueryable()
.FirstAsync(a => a.RECORD_ID == entity.Id && a.SHIP_RATE_PID != null &&
a.SHIP_RATE_PID.Value == entity.SHIP_RATE_PID && a.IsDeleted == false);
if (shipScheduleRecord != null)
{
selectedShipSchedule = JSON.Deserialize<MSKAPISPOTSearchScheduleRateResultDataDto>(shipScheduleRecord.SHIP_JSON);
}
}
int totalNum = 0;
foreach (var a in numArg)
@ -1804,6 +1817,27 @@ namespace Myshipping.Application.Service.BookingOrder
await _bookingDeliveryRecordCtnRep.InsertAsync(ctnEntity);
});
}
if (copyEntity.SHIP_RATE_PID > 0 && selectedShipSchedule != null)
{
var shipScheduleRecord = new BookingDeliveryRecordShipSchedule
{
Id = YitIdHelper.NextId(),
RECORD_ID = copyEntity.Id,
PRICE_ID = copyEntity.PRICE_ID,
SHIP_RATE_PID = selectedShipSchedule.PId,
SHIP_RATE_MD5 = selectedShipSchedule.MD5,
SHIP_RATE_TOTAL_AMOUNT = selectedShipSchedule.totalAmount.HasValue ? selectedShipSchedule.totalAmount.Value : 0,
SHIP_RATE_TOTAL_CURRENCY = selectedShipSchedule.totalCurrency,
SHIP_JSON = Newtonsoft.Json.JsonConvert.SerializeObject(selectedShipSchedule),
CreatedTime = nowDate,
UpdatedTime = nowDate,
CreatedUserId = UserManager.UserId,
CreatedUserName = UserManager.Name
};
await _bookingDeliveryRecordShipScheduleRep.InsertAsync(shipScheduleRecord);
}
}
return JSON.Serialize(new { Total = totalNum });

@ -14,7 +14,7 @@ namespace Myshipping.Application
/// <summary>
/// 订舱方备案编号(马士基)
/// </summary>
public string bookedMaerskByPartyCode { get; set; }
public string bookedByMaerskPartyCode { get; set; }
/// <summary>
/// 订舱方备案全称(马士基)
@ -24,12 +24,12 @@ namespace Myshipping.Application
/// <summary>
/// 订舱方联系人(马士基)
/// </summary>
public string bookedByPartyContactName { get; set; }
public string bookedByCompanyContactName { get; set; }
/// <summary>
/// 订舱方联系邮箱(马士基)
/// </summary>
public string bookedByPartyContactEmail { get; set; }
public string bookedByCompanyContactEmail { get; set; }
/// <summary>
/// 持约方备案代码(马士基)

Loading…
Cancel
Save