提箱小票

booking_auth_dev
wanghaomei 2 years ago
parent 681099c7ad
commit 3ca6171f7d

@ -3363,6 +3363,13 @@
<param name="type">类型1pdf、2xlsx</param>
<returns></returns>
</member>
<member name="M:Myshipping.Application.BookingOrderService.TxxpLink(System.Int64)">
<summary>
获取提箱小票链接
</summary>
<param name="bookingId"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Application.BookingOrderService.GenReportJson(System.Int64)">
<summary>
获取用户报表的json

@ -61,13 +61,15 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingPrintTemplate> _repPrintTemplate;
private readonly SqlSugarRepository<BookingLetteryard> _repLetterYard;
private readonly SqlSugarRepository<SysUser> _repUser;
private readonly SqlSugarRepository<BookingOrderUrl> _repOrderUrl;
public BookingOrderService(SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn, SqlSugarRepository<BookingCtnDetail> ctndetailrep,
SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark,
SqlSugarRepository<BookingFile> bookingfile, SqlSugarRepository<DjyWebsiteAccountConfig> webconfig, SqlSugarRepository<BookingPrintTemplate> repPrint,
SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail,
ILogger<BookingOrderService> logger, ISysCacheService cache,
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser)
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser,
SqlSugarRepository<BookingOrderUrl> repOrderUrl)
{
this._logger = logger;
this._rep = rep;
@ -86,6 +88,7 @@ namespace Myshipping.Application
this._repPrintTemplate = repPrintTemplate;
this._repLetterYard = repLetterYard;
this._repUser = repUser;
this._repOrderUrl = repOrderUrl;
}
#region 主表和箱信息
@ -784,6 +787,49 @@ namespace Myshipping.Application
#endregion
#region 小票链接
/// <summary>
/// 获取提箱小票链接
/// </summary>
/// <param name="bookingId"></param>
/// <returns></returns>
[HttpGet("/BookingOrder/txxplink")]
public async Task TxxpLink(long bookingId)
{
var order = _rep.FirstOrDefault(x => x.Id == bookingId);
var ordUrl = _repOrderUrl.FirstOrDefault(x => x.BookingId == bookingId);
if (order == null)
{
ordUrl = new BookingOrderUrl();
ordUrl.BookingId = bookingId;
await _repOrderUrl.InsertAsync(ordUrl);
}
//校验船公司
if (string.IsNullOrEmpty(order.CARRIERID))
{
throw Oops.Oh(ErrorCode.BOOK118);
}
//判断船公司是否支持
var allowCarrier = _cache.GetAllDictData().Result.Where(x => x.TypeCode == "txxp_carrier_list").Select(x => x.Code).ToList();
if (allowCarrier.Contains(order.CARRIERID))
{
throw Oops.Oh(ErrorCode.BOOK117);
}
//亿通账号
var ytAcc = _webconfig.FirstOrDefault(x => x.CreatedUserId == UserManager.UserId && x.TypeCode == "YitongWeb");
if(ytAcc == null)
{
throw Oops.Oh(ErrorCode.BOOK119);
}
}
#endregion
#region 其他
/// <summary>
/// 获取用户报表的json

@ -454,6 +454,24 @@ public enum ErrorCode
/// </summary>
[ErrorCodeItemMetadata("放舱信息不存在")]
BOOK116,
/// <summary>
/// 不支持的船公司
/// </summary>
[ErrorCodeItemMetadata("不支持的船公司")]
BOOK117,
/// <summary>
/// 船公司未正确填写
/// </summary>
[ErrorCodeItemMetadata("船公司未正确填写")]
BOOK118,
/// <summary>
/// 亿通账号未正确配置
/// </summary>
[ErrorCodeItemMetadata("亿通账号未正确配置")]
BOOK119,
#endregion
#region 邮箱账号

@ -3920,6 +3920,21 @@
放舱信息不存在
</summary>
</member>
<member name="F:Myshipping.Core.ErrorCode.BOOK117">
<summary>
不支持的船公司
</summary>
</member>
<member name="F:Myshipping.Core.ErrorCode.BOOK118">
<summary>
船公司未正确填写
</summary>
</member>
<member name="F:Myshipping.Core.ErrorCode.BOOK119">
<summary>
亿通账号未正确配置
</summary>
</member>
<member name="F:Myshipping.Core.ErrorCode.EMAIL001">
<summary>
邮箱账号已存在
@ -6645,7 +6660,7 @@
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.AddOrUpdateMappingCtn(Myshipping.Core.Entity.MappingCtn)">
<summary>
新增编辑船公司映射信息
新增编辑箱型映射信息
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.FrtList(Myshipping.Core.Service.NameQueryDto)">
@ -6653,6 +6668,21 @@
付费方式
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.AddFrt(Myshipping.Core.Entity.CodeFrt)">
<summary>
新增付费方式
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.MappingFrtList(Myshipping.Core.Service.MappingQueryDto)">
<summary>
获取付费映射列表信息
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.AddOrUpdateMappingFrt(Myshipping.Core.Entity.MappingFrt)">
<summary>
新增编辑付费映射信息
</summary>
</member>
<member name="P:Myshipping.Core.Service.MappingQueryDto.Module">
<summary>
模块
@ -6734,6 +6764,23 @@
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.ICommonDBService.GetAllMappingCtn">
<summary>
获取箱型映射
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.ICommonDBService.GetAllFrt">
<summary>
付费方式
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.ICommonDBService.GetAllMappingFrt">
<summary>
付费方式映射
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonService.GetEntityInfos(System.Boolean)">
<summary>
获取库表信息

Loading…
Cancel
Save