From 7df5128c3569c4bf756b60c2c26b91c46401c218 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Mon, 14 Nov 2022 10:09:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E8=88=B1=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Myshipping.Application.xml | 16 ++++++++++++++ .../BookingOrder/BookingOrderService.cs | 22 +++++++++++++++++-- .../BookingOrder/Dto/BookingLetteryardDto.cs | 20 +++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index aef87979..64628cac 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -3654,6 +3654,22 @@ 主键Id + + + 链接信息 + + + + + 提箱小票链接 + + + + + VGM链接 + + + 订舱主表输出参数 diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index c5baecc0..11af7c8d 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -657,7 +657,16 @@ namespace Myshipping.Application }; } - return letterYard.Adapt(); + var output = letterYard.Adapt(); + + //链接信息 + var urlModel = _repOrderUrl.FirstOrDefault(x => x.BookingId == bookingId); + if (urlModel != null) + { + output.OrderUrl = urlModel.Adapt(); + } + + return output; } /// @@ -680,7 +689,16 @@ namespace Myshipping.Application await _repLetterYard.UpdateAsync(entity); } - //todo:生成提箱小票、vgm、vgm&si链接 + var order = _rep.FirstOrDefault(x => x.Id == input.BookingId); + + //生成提箱小票 + var allowCarrier = _cache.GetAllDictData().Result.Where(x => x.TypeCode == "txxp_carrier_list").Select(x => x.Code).ToList(); + if (allowCarrier.Contains(order.CARRIERID)) + { + var txxpLink = await TxxpLink(input.BookingId); + } + + //todo:vgm、vgm&si链接 //... } diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs b/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs index b7986563..899896d2 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/BookingLetteryardDto.cs @@ -106,5 +106,25 @@ namespace Myshipping.Application /// public long Id { get; set; } + /// + /// 链接信息 + /// + public BookingOrderUrlLetterYardOutput OrderUrl { get; set; } + } + + public class BookingOrderUrlLetterYardOutput + { + /// + /// 提箱小票链接 + /// + public string UrlTxxp { get; set; } + /// + /// VGM链接 + /// + public string UrlVgm { get; set; } + /// + /// VGM&SI链接 + /// + public string UrlVgmSi { get; set; } } }