订舱号生成多票

master
wanghaomei 5 months ago
parent a705d8aa8c
commit eeaa2b279e

@ -322,6 +322,7 @@ namespace Myshipping.Application.EDI
#endregion
postModel.remark = custOrder.SOREMARK;
postModel.copyNum = custOrder.CopyNum;
var apiUrl = sCfgSpiderUrl.Value;
if (!apiUrl.EndsWith("/"))

@ -898,6 +898,16 @@ namespace Myshipping.Application.Entity
[SugarColumn(ColumnName = "SignType")]
[Description("签约方")]
public string SignType { get; set; }
/// <summary>
/// 复制数量
/// </summary>
public int CopyNum { get; set; }
/// <summary>
/// 父级系统编号
/// </summary>
public string ParentBookingNO { get; set; }
}
/// <summary>

@ -426,7 +426,7 @@ namespace Myshipping.Application.Event
[EventSubscribe("SendToCustomer:MultiCustNO")]
public async Task SendCustomerMultiCustNOSync(EventHandlerExecutingContext context)
{
_logger.LogInformation($"收到推送订舱批量订舱编号到客户订舱系统请求:{context.Source.Payload}");
_logger.LogInformation($"收到推送订舱批量订舱编号到客户订舱系统请求:{context.Source.Payload.ToString()}");
var dto = context.Source.Payload as BookingCustomerMultiCustNODto;
@ -485,6 +485,7 @@ namespace Myshipping.Application.Event
else
{
var dataResp = jobjRtn.GetJArrayValue("data");
var parentBookingNO = custOrder.BOOKINGNO;
foreach (JObject item in dataResp)
{
@ -492,6 +493,7 @@ namespace Myshipping.Application.Event
custOrder.Id = YitIdHelper.NextId();
custOrder.BOOKINGNO = item.GetStringValue("BookingNO");
custOrder.BSNO = item.GetStringValue("CustOrderId");
custOrder.ParentBookingNO = parentBookingNO;
JObject jobjExt = null;
if (!string.IsNullOrEmpty(custOrder.ExtendData))
{
@ -517,6 +519,8 @@ namespace Myshipping.Application.Event
//插入订舱台账
var ordId = await servCustOrder.CustomerToOrder(custOrder);
custOrder.BookingId = ordId;
await repoCutomerOrder.AsUpdateable(custOrder).UpdateColumns(x => new { x.BookingId }).ExecuteCommandAsync();
_logger.LogInformation($"生成了订舱台账数据 {ordId}");

@ -135,6 +135,7 @@ namespace Myshipping.Application
.WhereIF(!string.IsNullOrEmpty(input.NotifypartName), x => x.NotifypartName.Contains(input.NotifypartName))
.WhereIF(!string.IsNullOrEmpty(input.BookingName), x => x.BookingName.Contains(input.BookingName))
.WhereIF(!string.IsNullOrEmpty(input.BookingTenantName), x => x.BookingTenantName.Contains(input.BookingTenantName))
.WhereIF(!string.IsNullOrEmpty(input.ParentBookingNO), x => x.BOOKINGNO.Contains(input.ParentBookingNO) || x.ParentBookingNO.Contains(input.ParentBookingNO))
.WhereIF(input.ETDStart.HasValue, x => x.ETD >= input.ETDStart)
.WhereIF(input.ETDEnd.HasValue, x => x.ETD < input.ETDEnd.Value.Date.AddDays(1))
.WhereIF(input.CreatedTimeStart.HasValue, x => x.CreatedTime >= input.CreatedTimeStart)
@ -1180,49 +1181,10 @@ namespace Myshipping.Application
if (recModel.Accept)
{
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 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);
//}
model.BookingId = bookingId; //客户订舱数据与订舱台账数据关联
await _rep.UpdateAsync(model);
}
@ -1673,6 +1635,7 @@ namespace Myshipping.Application
var lstResp = new List<BookingCustomerMultiCustNORespDto>();
var ctns = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == id && x.IsDeleted == false).ToListAsync();
var parentBookingNO = model.BOOKINGNO;
foreach (var bookNO in recModel.ListCustNO)
{
var respDtO = new BookingCustomerMultiCustNORespDto();
@ -1681,6 +1644,7 @@ namespace Myshipping.Application
//生成id并插入客户订舱数据
model.Id = YitIdHelper.NextId();
model.BOOKINGNO = $"BK{YitIdHelper.NextId()}";
model.ParentBookingNO = parentBookingNO;
JObject jobjExt = null;
if (!string.IsNullOrEmpty(model.ExtendData))
{

@ -114,6 +114,11 @@ namespace Myshipping.Application
/// 订舱公司名称
/// </summary>
public string BookingName { get; set; }
/// <summary>
/// 父级系统编号
/// </summary>
public string ParentBookingNO { get; set; }
}
//dto
@ -771,6 +776,16 @@ namespace Myshipping.Application
/// 签约方
/// </summary>
public string SignType { get; set; }
/// <summary>
/// 复制数量
/// </summary>
public int CopyNum { get; set; }
/// <summary>
/// 父级系统编号
/// </summary>
public string ParentBookingNO { get; set; }
}
//保存dto

Loading…
Cancel
Save