|
|
|
@ -27,7 +27,9 @@ using Myshipping.Core.Service;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
using NPOI.SS.Formula.PTG;
|
|
|
|
|
using NPOI.XWPF.UserModel;
|
|
|
|
|
using RabbitMQ.Client;
|
|
|
|
|
using StackExchange.Profiling.Internal;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
@ -854,120 +856,6 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 查询船期数据EMC(即将作废,用QueryShipInfo接口替代)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/BookingCustomerOrder/QueryShipInfoEMC")]
|
|
|
|
|
public async Task<dynamic> QueryShipInfoEMC(long custOrdId)
|
|
|
|
|
{
|
|
|
|
|
var allSysConfig = await _cache.GetAllSysConfig();
|
|
|
|
|
var sCfgSpiderUrl = allSysConfig.FirstOrDefault(x => x.Code == "BookingPostApiServerAddr" && x.GroupCode == "DJY_CONST");
|
|
|
|
|
if (sCfgSpiderUrl == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("订舱API的爬虫URL地址未配置,请联系管理员");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sCfgUserKey = allSysConfig.FirstOrDefault(x => x.Code == "BookingPostApiKey" && x.GroupCode == "DJY_CONST");
|
|
|
|
|
var sCfgUserSecret = allSysConfig.FirstOrDefault(x => x.Code == "BookingPostApiSecret" && x.GroupCode == "DJY_CONST");
|
|
|
|
|
if (sCfgUserKey == null || sCfgUserSecret == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("订舱API的KEY和密钥未配置,请联系管理员");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var apiUrl = sCfgSpiderUrl.Value;
|
|
|
|
|
if (!apiUrl.EndsWith("/"))
|
|
|
|
|
{
|
|
|
|
|
apiUrl += "/";
|
|
|
|
|
}
|
|
|
|
|
apiUrl += "v1/emc/ship/query";
|
|
|
|
|
|
|
|
|
|
var custOrder = await _rep.AsQueryable().FirstAsync(x => x.Id == custOrdId);
|
|
|
|
|
var ctns = await _repCtn.AsQueryable().Where(x => x.BILLID == custOrdId).ToListAsync();
|
|
|
|
|
|
|
|
|
|
var mappingCtn = await _cache.GetAllMappingCtn();
|
|
|
|
|
var mappingPortLoad = await _cache.GetAllMappingPortLoad();
|
|
|
|
|
var mappingPort = await _cache.GetAllMappingPort();
|
|
|
|
|
|
|
|
|
|
//收货地
|
|
|
|
|
var mapPlaceReceipt = mappingPortLoad.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "EMC" && x.Code == custOrder.PLACERECEIPTCODE);
|
|
|
|
|
if (mapPlaceReceipt == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未找到收货地映射信息:{custOrder.PLACERECEIPTCODE}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//起运港
|
|
|
|
|
var mapPortLoad = mappingPortLoad.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "EMC" && x.Code == custOrder.PORTLOADCODE);
|
|
|
|
|
if (mapPortLoad == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未找到起运港映射信息:{custOrder.PORTLOADCODE}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//卸货港
|
|
|
|
|
var mapPort = mappingPort.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "EMC" && x.Code == custOrder.PORTDISCHARGECODE);
|
|
|
|
|
if (mapPort == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未找到卸货港映射信息:{custOrder.PORTDISCHARGECODE}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//目的地
|
|
|
|
|
var mapDestination = mappingPort.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "EMC" && x.Code == custOrder.DESTINATIONCODE);
|
|
|
|
|
if (mapDestination == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未找到目的地映射信息:{custOrder.DESTINATIONCODE}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//箱型转换
|
|
|
|
|
var disCtnCode = ctns.Select(x => x.CTNCODE).Distinct().ToList();
|
|
|
|
|
var mapCtnCode = new List<string>();
|
|
|
|
|
foreach (var ctnall in disCtnCode)
|
|
|
|
|
{
|
|
|
|
|
var mapCtn = mappingCtn.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "EMC" && x.Code == ctnall);
|
|
|
|
|
if (mapCtn == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未找到箱型映射信息:{ctnall}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mapCtnCode.Add(mapCtn.MapName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var postModel = new
|
|
|
|
|
{
|
|
|
|
|
userKey = sCfgUserKey.Value,
|
|
|
|
|
userSecret = sCfgUserSecret.Value,
|
|
|
|
|
webAccount = custOrder.BookingAccount,
|
|
|
|
|
webPassword = custOrder.BookingPassword,
|
|
|
|
|
searchConditionDate = custOrder.ETD.Value.AddDays(-7).ToString("yyyy-MM-dd"),
|
|
|
|
|
originName = mapPlaceReceipt.MapName,
|
|
|
|
|
destinationName = mapDestination.MapName,
|
|
|
|
|
polPortName = mapPortLoad.MapName,
|
|
|
|
|
podPortName = mapPort.MapName,
|
|
|
|
|
serviceType = custOrder.ServiceType,
|
|
|
|
|
serviceMode = custOrder.ServiceMode,
|
|
|
|
|
bookingOffice = custOrder.BookingAddr,
|
|
|
|
|
isReefer = "N",
|
|
|
|
|
contractType = custOrder.ContractType,
|
|
|
|
|
contractNo = custOrder.CONTRACTNO,
|
|
|
|
|
containerTypeList = mapCtnCode
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"发送查询API数据给爬虫({apiUrl}):{postModel.ToJsonString()}");
|
|
|
|
|
var rtnQuery = await apiUrl.SetBody(postModel)
|
|
|
|
|
.PostAsStringAsync();
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"爬虫返回:{rtnQuery}");
|
|
|
|
|
var jobjRtnQuery = JObject.Parse(rtnQuery);
|
|
|
|
|
if (jobjRtnQuery.GetIntValue("code") != 200)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"查询船期数据出错:{jobjRtnQuery.GetStringValue("msg")}");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var jarrVessel = jobjRtnQuery.GetJArrayValue("data");
|
|
|
|
|
return jarrVessel;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 查询船期数据
|
|
|
|
|
/// </summary>
|
|
|
|
@ -1291,49 +1179,50 @@ namespace Myshipping.Application
|
|
|
|
|
//进入客户订舱系统的订舱台账
|
|
|
|
|
if (recModel.Accept)
|
|
|
|
|
{
|
|
|
|
|
var bkOrder = model.Adapt<BookingOrder>();
|
|
|
|
|
bkOrder.Id = YitIdHelper.NextId();
|
|
|
|
|
bkOrder.BSSTATUS = "已录入";
|
|
|
|
|
bkOrder.ParentId = 0;
|
|
|
|
|
bkOrder.LANENAME = bkOrder.LANECODE;
|
|
|
|
|
await _repOrder.InsertAsync(bkOrder);
|
|
|
|
|
|
|
|
|
|
model.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
|
|
|
|
|
bookingId = bkOrder.Id;
|
|
|
|
|
await _rep.UpdateAsync(model);
|
|
|
|
|
|
|
|
|
|
var bkEdiExt = new BookingEDIExt();
|
|
|
|
|
bkEdiExt.Id = YitIdHelper.NextId();
|
|
|
|
|
bkEdiExt.BookingId = bkOrder.Id;
|
|
|
|
|
bkEdiExt.SalerCode = model.SaleCode;
|
|
|
|
|
await _repEdiExt.InsertAsync(bkEdiExt);
|
|
|
|
|
|
|
|
|
|
var ctnList = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == model.Id).ToListAsync();
|
|
|
|
|
foreach (var ctn in ctnList)
|
|
|
|
|
{
|
|
|
|
|
ctn.Id = YitIdHelper.NextId();
|
|
|
|
|
ctn.BILLID = bkOrder.Id;
|
|
|
|
|
await _repCtn.InsertAsync(ctn);
|
|
|
|
|
}
|
|
|
|
|
bookingId = await CustomerToOrder(model);
|
|
|
|
|
//var bkOrder = model.Adapt<BookingOrder>();
|
|
|
|
|
//bkOrder.Id = YitIdHelper.NextId();
|
|
|
|
|
//bkOrder.BSSTATUS = "已录入";
|
|
|
|
|
//bkOrder.ParentId = 0;
|
|
|
|
|
//bkOrder.LANENAME = bkOrder.LANECODE;
|
|
|
|
|
//await _repOrder.InsertAsync(bkOrder);
|
|
|
|
|
|
|
|
|
|
//model.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
|
|
|
|
|
//bookingId = bkOrder.Id;
|
|
|
|
|
//await _rep.UpdateAsync(model);
|
|
|
|
|
|
|
|
|
|
//var bkEdiExt = new BookingEDIExt();
|
|
|
|
|
//bkEdiExt.Id = YitIdHelper.NextId();
|
|
|
|
|
//bkEdiExt.BookingId = bkOrder.Id;
|
|
|
|
|
//bkEdiExt.SalerCode = model.SaleCode;
|
|
|
|
|
//await _repEdiExt.InsertAsync(bkEdiExt);
|
|
|
|
|
|
|
|
|
|
//var ctnList = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == model.Id).ToListAsync();
|
|
|
|
|
//foreach (var ctn in ctnList)
|
|
|
|
|
//{
|
|
|
|
|
// ctn.Id = YitIdHelper.NextId();
|
|
|
|
|
// ctn.BILLID = bkOrder.Id;
|
|
|
|
|
// await _repCtn.InsertAsync(ctn);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//服务项目
|
|
|
|
|
var servList = await _repServiceItem.Where(x => x.BookingId == model.Id).ToListAsync();
|
|
|
|
|
foreach (var serv in servList)
|
|
|
|
|
{
|
|
|
|
|
serv.Id = YitIdHelper.NextId();
|
|
|
|
|
serv.BookingId = bkOrder.Id;
|
|
|
|
|
await _repServiceItem.InsertAsync(serv);
|
|
|
|
|
}
|
|
|
|
|
////服务项目
|
|
|
|
|
//var servList = await _repServiceItem.Where(x => x.BookingId == model.Id).ToListAsync();
|
|
|
|
|
//foreach (var serv in servList)
|
|
|
|
|
//{
|
|
|
|
|
// serv.Id = YitIdHelper.NextId();
|
|
|
|
|
// serv.BookingId = bkOrder.Id;
|
|
|
|
|
// await _repServiceItem.InsertAsync(serv);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//附件
|
|
|
|
|
var files = await _repFile.AsQueryable().Filter(null, true).Where(x => x.BookingId == model.Id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
foreach (var file in files)
|
|
|
|
|
{
|
|
|
|
|
file.Id = YitIdHelper.NextId();
|
|
|
|
|
file.BookingId = bkOrder.Id;
|
|
|
|
|
////附件
|
|
|
|
|
//var files = await _repFile.AsQueryable().Filter(null, true).Where(x => x.BookingId == model.Id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
//foreach (var file in files)
|
|
|
|
|
//{
|
|
|
|
|
// file.Id = YitIdHelper.NextId();
|
|
|
|
|
// file.BookingId = bkOrder.Id;
|
|
|
|
|
|
|
|
|
|
await _repFile.InsertAsync(file);
|
|
|
|
|
}
|
|
|
|
|
// await _repFile.InsertAsync(file);
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1769,9 +1658,125 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 多订舱编号
|
|
|
|
|
else if (feedbackType == BookingFeedbackType.OneToMulti.ToString())
|
|
|
|
|
{
|
|
|
|
|
var recModel = JsonConvert.DeserializeObject<BookingCustomerMultiCustNODto>(jsonContent);
|
|
|
|
|
|
|
|
|
|
var id = Convert.ToInt64(recModel.Id);
|
|
|
|
|
var model = _rep.AsQueryable().Filter(null, true).First(x => x.Id == id);
|
|
|
|
|
if (model == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("未找到数据");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var lstResp = new List<BookingCustomerMultiCustNORespDto>();
|
|
|
|
|
|
|
|
|
|
var ctns = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
foreach (var bookNO in recModel.ListCustNO)
|
|
|
|
|
{
|
|
|
|
|
var respDtO = new BookingCustomerMultiCustNORespDto();
|
|
|
|
|
lstResp.Add(respDtO);
|
|
|
|
|
|
|
|
|
|
//生成id并插入客户订舱数据
|
|
|
|
|
model.Id = YitIdHelper.NextId();
|
|
|
|
|
model.BOOKINGNO = $"BK{YitIdHelper.NextId()}";
|
|
|
|
|
JObject jobjExt = null;
|
|
|
|
|
if (!string.IsNullOrEmpty(model.ExtendData))
|
|
|
|
|
{
|
|
|
|
|
jobjExt = JObject.Parse(model.ExtendData);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
jobjExt = new JObject();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jobjExt["CustNO"] = bookNO;
|
|
|
|
|
|
|
|
|
|
await _rep.InsertAsync(model);
|
|
|
|
|
|
|
|
|
|
foreach (var ctn in ctns)
|
|
|
|
|
{
|
|
|
|
|
ctn.Id = YitIdHelper.NextId();
|
|
|
|
|
ctn.BILLID = model.Id;
|
|
|
|
|
await _repCtn.InsertAsync(ctn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
respDtO.CustOrderId = model.Id;
|
|
|
|
|
respDtO.BookingNO = model.BOOKINGNO;
|
|
|
|
|
respDtO.CustNO = bookNO;
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"根据客户订舱 {recModel.Id} 生成了相同的数据 {model.Id}");
|
|
|
|
|
|
|
|
|
|
//插入订舱台账
|
|
|
|
|
var ordId = await CustomerToOrder(model);
|
|
|
|
|
respDtO.OrderId = ordId;
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"生成了订舱台账数据 {ordId}");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"反馈给运营端生成的数据 {lstResp.ToJsonString()}");
|
|
|
|
|
|
|
|
|
|
return lstResp;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 客户订舱数据生成订舱台账
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[NonAction]
|
|
|
|
|
public async Task<long> CustomerToOrder(BookingCustomerOrder custOrd)
|
|
|
|
|
{
|
|
|
|
|
var bkOrder = custOrd.Adapt<BookingOrder>();
|
|
|
|
|
bkOrder.Id = YitIdHelper.NextId();
|
|
|
|
|
bkOrder.BSSTATUS = "已录入";
|
|
|
|
|
bkOrder.ParentId = 0;
|
|
|
|
|
bkOrder.LANENAME = bkOrder.LANECODE;
|
|
|
|
|
await _repOrder.InsertAsync(bkOrder);
|
|
|
|
|
|
|
|
|
|
custOrd.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
|
|
|
|
|
await _rep.UpdateAsync(custOrd);
|
|
|
|
|
|
|
|
|
|
var bkEdiExt = new BookingEDIExt();
|
|
|
|
|
bkEdiExt.Id = YitIdHelper.NextId();
|
|
|
|
|
bkEdiExt.BookingId = bkOrder.Id;
|
|
|
|
|
bkEdiExt.SalerCode = custOrd.SaleCode;
|
|
|
|
|
await _repEdiExt.InsertAsync(bkEdiExt);
|
|
|
|
|
|
|
|
|
|
var ctnList = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == custOrd.Id).ToListAsync();
|
|
|
|
|
foreach (var ctn in ctnList)
|
|
|
|
|
{
|
|
|
|
|
ctn.Id = YitIdHelper.NextId();
|
|
|
|
|
ctn.BILLID = bkOrder.Id;
|
|
|
|
|
await _repCtn.InsertAsync(ctn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//服务项目
|
|
|
|
|
var servList = await _repServiceItem.Where(x => x.BookingId == custOrd.Id).ToListAsync();
|
|
|
|
|
foreach (var serv in servList)
|
|
|
|
|
{
|
|
|
|
|
serv.Id = YitIdHelper.NextId();
|
|
|
|
|
serv.BookingId = bkOrder.Id;
|
|
|
|
|
await _repServiceItem.InsertAsync(serv);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//附件
|
|
|
|
|
var files = await _repFile.AsQueryable().Filter(null, true).Where(x => x.BookingId == custOrd.Id && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
foreach (var file in files)
|
|
|
|
|
{
|
|
|
|
|
file.Id = YitIdHelper.NextId();
|
|
|
|
|
file.BookingId = bkOrder.Id;
|
|
|
|
|
|
|
|
|
|
await _repFile.InsertAsync(file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bkOrder.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 导入
|
|
|
|
|
/// </summary>
|
|
|
|
@ -2300,7 +2305,8 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogWarning($"自动订舱失败:{ord},错误信息:{ex.Message}");
|
|
|
|
|
_logger.LogError($"自动订舱失败:{ord},错误信息:{ex.Message}");
|
|
|
|
|
_logger.LogError(ex.StackTrace);
|
|
|
|
|
await AuditBooking(ord.Id, false, ex.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2443,27 +2449,40 @@ namespace Myshipping.Application
|
|
|
|
|
extObj = JObject.Parse(model.ExtendData);
|
|
|
|
|
if (model.CARRIERID == "COSCO")
|
|
|
|
|
{
|
|
|
|
|
var bookingNO = extObj.GetStringValue("BookingNO");
|
|
|
|
|
bkOrder.CUSTNO = bookingNO;
|
|
|
|
|
var custNO = extObj.GetStringValue("CustNO");
|
|
|
|
|
if (!string.IsNullOrEmpty(custNO))
|
|
|
|
|
{
|
|
|
|
|
bkOrder.CUSTNO = custNO;
|
|
|
|
|
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync((long)id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
_logger.LogInformation($"回写订舱号并回推客户端:{id} {bookingNO}");
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync(id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
_logger.LogInformation($"回写订舱号并回推客户端:{id} {custNO}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (model.CARRIERID == "EMC")
|
|
|
|
|
{
|
|
|
|
|
var bookingNOArr = extObj.GetJArrayValue("BookingNO");
|
|
|
|
|
if (bookingNOArr.Count == 1)
|
|
|
|
|
var custNOArr = extObj.GetJArrayValue("CustNO");
|
|
|
|
|
if (custNOArr.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
bkOrder.CUSTNO = bookingNOArr.First().ToString();
|
|
|
|
|
var custNO = custNOArr.First().ToString();
|
|
|
|
|
bkOrder.CUSTNO = custNO;
|
|
|
|
|
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync((long)id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync(id, BookingOrderSyncTypeEnum.CC.ToString());
|
|
|
|
|
_logger.LogInformation($"回写订舱号并回推客户端:{id} {bkOrder.CUSTNO}");
|
|
|
|
|
|
|
|
|
|
//有多票订舱编号,后台自动创建数据并对应
|
|
|
|
|
custNOArr.RemoveAt(0);
|
|
|
|
|
if (custNOArr.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerMultiCustNOSync(new BookingCustomerMultiCustNODto()
|
|
|
|
|
{
|
|
|
|
|
Id = model.BSNO,
|
|
|
|
|
ListCustNO = custNOArr.Select(x => x.ToString()).ToList()
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//扣费
|
|
|
|
|
if (accept)
|
|
|
|
@ -2472,6 +2491,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 测试多票订舱编号
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/BookingCustomerOrder/TestMultiBookingNO"), AllowAnonymous]
|
|
|
|
|
public async Task TestMultiBookingNO(long id)
|
|
|
|
|
{
|
|
|
|
|
JArray bookingNOArr = new JArray
|
|
|
|
|
{
|
|
|
|
|
"Test001",
|
|
|
|
|
"Test002"
|
|
|
|
|
};
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerMultiCustNOSync(new BookingCustomerMultiCustNODto()
|
|
|
|
|
{
|
|
|
|
|
Id = id.ToString(),
|
|
|
|
|
ListCustNO = bookingNOArr.Select(x => x.ToString()).ToList()
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 接收客户订舱系统取消提交的数据
|
|
|
|
@ -2684,8 +2721,16 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
var staLog = new BookingStatusLog();
|
|
|
|
|
staLog.Status = status;
|
|
|
|
|
if (App.User.FindFirst(ClaimConst.CLAINM_USERID) == null)
|
|
|
|
|
{
|
|
|
|
|
staLog.CreatedUserId = 0;
|
|
|
|
|
staLog.CreatedUserName = "系统";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
staLog.CreatedUserId = UserManager.UserId;
|
|
|
|
|
staLog.CreatedUserName = UserManager.Name;
|
|
|
|
|
}
|
|
|
|
|
staLog.CreatedTime = DateTime.Now;
|
|
|
|
|
staLog.OpTime = DateTime.Now;
|
|
|
|
|
staLog.BookingId = bookId;
|
|
|
|
|