From 6abf2726b3ca4de569ede4c2d578df027cd1dcd6 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 12 May 2023 17:24:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EBC=E3=80=81Draft=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingValueAddedService.cs | 89 +++++++++++++++++++ .../BookingOrder/IBookingValueAddedService.cs | 29 ++++++ 2 files changed, 118 insertions(+) create mode 100644 Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs create mode 100644 Myshipping.Application/Service/BookingOrder/IBookingValueAddedService.cs diff --git a/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs b/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs new file mode 100644 index 00000000..75e6b575 --- /dev/null +++ b/Myshipping.Application/Service/BookingOrder/BookingValueAddedService.cs @@ -0,0 +1,89 @@ +using Furion.DependencyInjection; +using Furion.DynamicApiController; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using Myshipping.Application.Entity; +using Myshipping.Core; +using Myshipping.Core.Service; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Myshipping.Application +{ + /// + /// 订舱增值类服务 + /// + [ApiDescriptionSettings("Application", Name = "BookingValueAdded", Order = 9)] + public class BookingValueAddedService : IBookingValueAddedService, IDynamicApiController, ITransient + { + private readonly ISysCacheService _cache; + private readonly ILogger _logger; + private readonly SqlSugarRepository _bookingOrderRepository; + + public BookingValueAddedService(ISysCacheService cache, ILogger logger, + SqlSugarRepository bookingOrderRepository) + { + _cache = cache; + _logger = logger; + + _bookingOrderRepository = bookingOrderRepository; + } + + + /// + /// 批量下载BC + /// + /// 订舱主键数组 + /// + public async Task DownloadBookingConfirm(long[] bookingIds) + { + TaskManageOrderResultDto result = new TaskManageOrderResultDto(); + + try + { + //var id = await InnerSave(info); + + result.succ = true; + result.msg = "批量下载BC成功"; + //result.ext = id; + } + catch (Exception ex) + { + result.succ = false; + result.msg = $"批量下载BC异常,原因:{ex.Message}"; + } + + return result; + } + + + /// + /// 批量下载Draft + /// + /// 订舱主键数组 + /// + public async Task DownloadDraft(long[] bookingIds) + { + TaskManageOrderResultDto result = new TaskManageOrderResultDto(); + + try + { + //var id = await InnerSave(info); + + result.succ = true; + result.msg = "批量下载Draft成功"; + //result.ext = id; + } + catch (Exception ex) + { + result.succ = false; + result.msg = $"批量下载Draft异常,原因:{ex.Message}"; + } + + return result; + } + } +} diff --git a/Myshipping.Application/Service/BookingOrder/IBookingValueAddedService.cs b/Myshipping.Application/Service/BookingOrder/IBookingValueAddedService.cs new file mode 100644 index 00000000..48fd97b0 --- /dev/null +++ b/Myshipping.Application/Service/BookingOrder/IBookingValueAddedService.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Myshipping.Application +{ + /// + /// 订舱增值类服务 + /// + public interface IBookingValueAddedService + { + /// + /// 批量下载BC + /// + /// 订舱主键数组 + /// + Task DownloadBookingConfirm(long[] bookingIds); + + + /// + /// 批量下载Draft + /// + /// 订舱主键数组 + /// + Task DownloadDraft(long[] bookingIds); + } +}