|
|
|
@ -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 });
|
|
|
|
@ -1994,12 +2028,12 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
|
|
|
|
|
dto = new MSKSPOTBookingInitDto
|
|
|
|
|
{
|
|
|
|
|
bookedMaerskByPartyCode = webAccountConfig.RegistPartyCode,
|
|
|
|
|
bookedByMaerskPartyCode = webAccountConfig.RegistPartyCode,
|
|
|
|
|
bookedByCompanyName = webAccountConfig.RegistPartyName,
|
|
|
|
|
priceOwnerMaerskPartyCode = webAccountConfig.RegistPartyCode,
|
|
|
|
|
priceOwnerCompanyName = webAccountConfig.RegistPartyName,
|
|
|
|
|
bookedByPartyContactName = webAccountConfig.RegistContractName,
|
|
|
|
|
bookedByPartyContactEmail = webAccountConfig.RegistContractEmail,
|
|
|
|
|
bookedByCompanyContactName = webAccountConfig.RegistContractName,
|
|
|
|
|
bookedByCompanyContactEmail = webAccountConfig.RegistContractEmail,
|
|
|
|
|
priceOwnerContactName = webAccountConfig.RegistContractName,
|
|
|
|
|
priceOwnerContactEmail = webAccountConfig.RegistContractEmail,
|
|
|
|
|
};
|
|
|
|
|