|
|
|
@ -2406,6 +2406,8 @@ namespace Myshipping.Application
|
|
|
|
|
bkOrder.OP = UserManager.Name;
|
|
|
|
|
await _repOrder.InsertAsync(bkOrder);
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"审核通过,进入订舱台账,客户订舱ID:{model.Id},订舱台账ID:{bkOrder.Id},系统编号:{model.BOOKINGNO}");
|
|
|
|
|
|
|
|
|
|
var bkEdiExt = new BookingEDIExt();
|
|
|
|
|
bkEdiExt.Id = YitIdHelper.NextId();
|
|
|
|
|
bkEdiExt.BookingId = bkOrder.Id;
|
|
|
|
@ -2452,10 +2454,12 @@ namespace Myshipping.Application
|
|
|
|
|
var custNO = extObj.GetStringValue("CustNO");
|
|
|
|
|
if (!string.IsNullOrEmpty(custNO))
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"回写订舱编号:{custNO},系统编号:{model.BOOKINGNO}");
|
|
|
|
|
|
|
|
|
|
bkOrder.CUSTNO = custNO;
|
|
|
|
|
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync(id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
_logger.LogInformation($"回写订舱号并回推客户端:{id} {custNO}");
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync(bkOrder.Id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
_logger.LogInformation($"回写订舱号并回推客户端:{bkOrder.Id} {custNO}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (model.CARRIERID == "EMC")
|
|
|
|
@ -2464,15 +2468,18 @@ namespace Myshipping.Application
|
|
|
|
|
if (custNOArr.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var custNO = custNOArr.First().ToString();
|
|
|
|
|
_logger.LogInformation($"回写订舱编号:{custNO},系统编号:{model.BOOKINGNO}");
|
|
|
|
|
|
|
|
|
|
bkOrder.CUSTNO = custNO;
|
|
|
|
|
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync(id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
_logger.LogInformation($"回写订舱号并回推客户端:{id} {bkOrder.CUSTNO}");
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync(bkOrder.Id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
_logger.LogInformation($"回写订舱号并回推客户端:{bkOrder.Id} {bkOrder.CUSTNO}");
|
|
|
|
|
|
|
|
|
|
//有多票订舱编号,后台自动创建数据并对应
|
|
|
|
|
custNOArr.RemoveAt(0);
|
|
|
|
|
if (custNOArr.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"多订舱编号回写,系统编号:{model.BOOKINGNO}");
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerMultiCustNOSync(new BookingCustomerMultiCustNODto()
|
|
|
|
|
{
|
|
|
|
|
Id = model.BSNO,
|
|
|
|
@ -2721,7 +2728,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
var staLog = new BookingStatusLog();
|
|
|
|
|
staLog.Status = status;
|
|
|
|
|
if (App.User.FindFirst(ClaimConst.CLAINM_USERID) == null)
|
|
|
|
|
if (App.User == null)
|
|
|
|
|
{
|
|
|
|
|
staLog.CreatedUserId = 0;
|
|
|
|
|
staLog.CreatedUserName = "系统";
|
|
|
|
@ -3010,15 +3017,28 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah($"未找到匹配的目的地:{input.DESTINATIONCODE}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.SERVICECODE))
|
|
|
|
|
//中远的运输方式不能为空
|
|
|
|
|
CodeService service = null;
|
|
|
|
|
if (input.CARRIERID == "COSCO")
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("运输条款代码不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(input.SERVICECODE))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("运输条款代码不能为空");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
service = serviceList.FirstOrDefault(x => x.Code == input.SERVICECODE);
|
|
|
|
|
if (service == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未找到匹配的运输条款:{input.SERVICECODE}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var service = serviceList.FirstOrDefault(x => x.Code == input.SERVICECODE);
|
|
|
|
|
if (service == null)
|
|
|
|
|
}
|
|
|
|
|
else if (input.CARRIERID == "EMC") //长荣运送方式和运输形态不能为空
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未找到匹配的运输条款:{input.SERVICECODE}");
|
|
|
|
|
if (string.IsNullOrEmpty(input.ServiceMode) || string.IsNullOrEmpty(input.ServiceType))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("运送方式和运输形态都不能为空");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.FRTCODE))
|
|
|
|
@ -3151,12 +3171,12 @@ namespace Myshipping.Application
|
|
|
|
|
custOrder.PORTLOADID = portLoad.EdiCode;
|
|
|
|
|
custOrder.PORTDISCHARGE = portDest.EnName;
|
|
|
|
|
custOrder.PORTDISCHARGEID = portDest.EdiCode;
|
|
|
|
|
custOrder.SERVICE = service.Name;
|
|
|
|
|
custOrder.PLACERECEIPT = placereceipt?.EnName;
|
|
|
|
|
custOrder.PLACERECEIPTID = placereceipt?.EdiCode;
|
|
|
|
|
custOrder.DESTINATION = destination.EnName;
|
|
|
|
|
custOrder.DESTINATIONID = destination.EdiCode;
|
|
|
|
|
custOrder.BLFRT = frt.EnName;
|
|
|
|
|
custOrder.SERVICE = service.Name;
|
|
|
|
|
|
|
|
|
|
//2024年4月19日,将分拆的收发通拼接到大文本的收发通中
|
|
|
|
|
ContactSFT(custOrder);
|
|
|
|
|