新增BC、Draft下载功能

optimize
jianghaiqing 2 years ago
parent 667d075852
commit 6abf2726b3

@ -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
{
/// <summary>
/// 订舱增值类服务
/// </summary>
[ApiDescriptionSettings("Application", Name = "BookingValueAdded", Order = 9)]
public class BookingValueAddedService : IBookingValueAddedService, IDynamicApiController, ITransient
{
private readonly ISysCacheService _cache;
private readonly ILogger<BookingTruckService> _logger;
private readonly SqlSugarRepository<BookingOrder> _bookingOrderRepository;
public BookingValueAddedService(ISysCacheService cache, ILogger<BookingTruckService> logger,
SqlSugarRepository<BookingOrder> bookingOrderRepository)
{
_cache = cache;
_logger = logger;
_bookingOrderRepository = bookingOrderRepository;
}
/// <summary>
/// 批量下载BC
/// </summary>
/// <param name="bookingIds">订舱主键数组</param>
/// <returns></returns>
public async Task<TaskManageOrderResultDto> 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;
}
/// <summary>
/// 批量下载Draft
/// </summary>
/// <param name="bookingIds">订舱主键数组</param>
/// <returns></returns>
public async Task<TaskManageOrderResultDto> 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;
}
}
}

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 订舱增值类服务
/// </summary>
public interface IBookingValueAddedService
{
/// <summary>
/// 批量下载BC
/// </summary>
/// <param name="bookingIds">订舱主键数组</param>
/// <returns></returns>
Task<TaskManageOrderResultDto> DownloadBookingConfirm(long[] bookingIds);
/// <summary>
/// 批量下载Draft
/// </summary>
/// <param name="bookingIds">订舱主键数组</param>
/// <returns></returns>
Task<TaskManageOrderResultDto> DownloadDraft(long[] bookingIds);
}
}
Loading…
Cancel
Save