wet 2 years ago
commit 77184f2c77

@ -101,5 +101,10 @@ namespace Myshipping.Application.Entity
/// 订舱业务主键 /// 订舱业务主键
/// </summary> /// </summary>
public string BOOK_ORDER_NO { get; set; } public string BOOK_ORDER_NO { get; set; }
/// <summary>
/// 反馈结果
/// </summary>
public string RESULT_NOTE { get; set; }
} }
} }

@ -99,5 +99,10 @@ namespace Myshipping.Application.Entity
/// 是否东胜接收 1-是 0-否 /// 是否东胜接收 1-是 0-否
/// </summary> /// </summary>
public int IS_DONGSHENG { get; set; } public int IS_DONGSHENG { get; set; }
/// <summary>
/// 主单号
/// </summary>
public string MBL_NO { get; set; }
} }
} }

@ -3651,6 +3651,11 @@
订舱业务主键 订舱业务主键
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Application.Entity.TaskBaseInfo.RESULT_NOTE">
<summary>
反馈结果
</summary>
</member>
<member name="T:Myshipping.Application.Entity.TaskBillFeeDetailInfo"> <member name="T:Myshipping.Application.Entity.TaskBillFeeDetailInfo">
<summary> <summary>
任务账单费用明细 任务账单费用明细
@ -3741,6 +3746,11 @@
是否东胜接收 1-是 0-否 是否东胜接收 1-是 0-否
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Application.Entity.TaskBillFeeDetailInfo.MBL_NO">
<summary>
主单号
</summary>
</member>
<member name="T:Myshipping.Application.Entity.TaskEmailInfo"> <member name="T:Myshipping.Application.Entity.TaskEmailInfo">
<summary> <summary>
任务邮件表 任务邮件表
@ -10539,6 +10549,41 @@
是否东胜接收 1-是 0-否 是否东胜接收 1-是 0-否
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderFeeInfo.MBlNo">
<summary>
主单号
</summary>
</member>
<member name="T:Myshipping.Application.TaskManageOrderFileInfo">
<summary>
</summary>
</member>
<member name="P:Myshipping.Application.TaskManageOrderFileInfo.FilePath">
<summary>
文件路径
</summary>
</member>
<member name="P:Myshipping.Application.TaskManageOrderFileInfo.FileType">
<summary>
文件类型
</summary>
</member>
<member name="P:Myshipping.Application.TaskManageOrderFileInfo.FileName">
<summary>
文件名
</summary>
</member>
<member name="T:Myshipping.Application.TaskManageOrderMailInfo">
<summary>
邮件
</summary>
</member>
<member name="P:Myshipping.Application.TaskManageOrderMailInfo.MailPath">
<summary>
邮件路径
</summary>
</member>
<member name="T:Myshipping.Application.TaskManageOrderMessageHeadInfo"> <member name="T:Myshipping.Application.TaskManageOrderMessageHeadInfo">
<summary> <summary>
@ -10665,6 +10710,11 @@
主单号 主单号
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderMessageMainInfo.ResultNote">
<summary>
反馈结果
</summary>
</member>
<member name="P:Myshipping.Application.TaskManageOrderMessageMainInfo.IsException"> <member name="P:Myshipping.Application.TaskManageOrderMessageMainInfo.IsException">
<summary> <summary>
是否异常 1-异常 0-未异常 是否异常 1-异常 0-未异常
@ -10710,6 +10760,16 @@
VGM反馈详情列表 VGM反馈详情列表
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderMessageMainInfo.FileList">
<summary>
附件列表
</summary>
</member>
<member name="P:Myshipping.Application.TaskManageOrderMessageMainInfo.EmailList">
<summary>
邮件列表
</summary>
</member>
<member name="T:Myshipping.Application.TaskManageOrderResultDto"> <member name="T:Myshipping.Application.TaskManageOrderResultDto">
<summary> <summary>
回执 回执
@ -10856,16 +10916,19 @@
<summary> <summary>
运输条款 运输条款
</summary> </summary>
<example>CY-CY</example>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.IssueType"> <member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.IssueType">
<summary> <summary>
签单方式 签单方式
</summary> </summary>
<example>TELEX</example>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortLoadId"> <member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortLoadId">
<summary> <summary>
装货港代码 装货港代码
</summary> </summary>
<example>CNTAO</example>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortLoad"> <member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortLoad">
<summary> <summary>
@ -10874,8 +10937,9 @@
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortDischargeId"> <member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortDischargeId">
<summary> <summary>
卸港代码 港代码
</summary> </summary>
<example>GUPIT</example>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortDischarge"> <member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortDischarge">
<summary> <summary>
@ -10886,6 +10950,7 @@
<summary> <summary>
中转港代码 中转港代码
</summary> </summary>
<example>GUPIT</example>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortTrans"> <member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.PortTrans">
<summary> <summary>
@ -10896,6 +10961,7 @@
<summary> <summary>
目的地代码 目的地代码
</summary> </summary>
<example>GUPIT</example>
</member> </member>
<member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.Destination"> <member name="P:Myshipping.Application.TaskManageOrderSIFeedBackInfo.Destination">
<summary> <summary>
@ -10989,6 +11055,13 @@
<param name="info">任务详情</param> <param name="info">任务详情</param>
<returns>返回回执</returns> <returns>返回回执</returns>
</member> </member>
<member name="M:Myshipping.Application.ITaskManageService.GetParaInfo(System.String)">
<summary>
获取查询参数
</summary>
<param name="ParaType">参数类型 STATUS-任务状态;TASK_TYPE-任务类型;SOURCE-任务来源</param>
<returns>返回回执</returns>
</member>
<member name="T:Myshipping.Application.TaskManageService"> <member name="T:Myshipping.Application.TaskManageService">
<summary> <summary>
任务管理 任务管理
@ -11008,5 +11081,13 @@
<param name="info">任务详情</param> <param name="info">任务详情</param>
<returns>返回回执</returns> <returns>返回回执</returns>
</member> </member>
<member name="M:Myshipping.Application.TaskManageService.GetParaInfo(System.String)">
<summary>
获取查询参数
</summary>
<param name="ParaType">参数类型 STATUS-任务状态;TASK_TYPE-任务类型;SOURCE-任务来源</param>
<returns>返回回执</returns>
<example>TASK_TYPE</example>
</member>
</members> </members>
</doc> </doc>

@ -43,6 +43,35 @@ namespace Myshipping.Application
.Map(dest => dest.CBM, src => src.CBM) .Map(dest => dest.CBM, src => src.CBM)
.Map(dest => dest.CONTA_TYPE, src => src.ContaType) .Map(dest => dest.CONTA_TYPE, src => src.ContaType)
.Map(dest => dest.CONTA_TYPE_NAME, src => src.ContaTypeName); .Map(dest => dest.CONTA_TYPE_NAME, src => src.ContaTypeName);
config.ForType<TaskManageOrderFeeInfo, TaskBillFeeDetailInfo>()
.Map(dest => dest.SORT_NO, src => src.SortNo)
.Map(dest => dest.FEE_CODE, src => src.FeeCode)
.Map(dest => dest.FEE_NAME, src => src.FeeName)
.Map(dest => dest.AMOUNT, src => src.Amount)
.Map(dest => dest.AMOUNT_USD, src => src.AmountUSD)
.Map(dest => dest.CURRENCY, src => src.Currency)
.Map(dest => dest.S20, src => src.S20)
.Map(dest => dest.S40, src => src.S40)
.Map(dest => dest.S45, src => src.S45)
.Map(dest => dest.CTNALL, src => src.Ctnall)
.Map(dest => dest.QTY, src => src.Qty)
.Map(dest => dest.UNIT, src => src.Unit)
.Map(dest => dest.TAX_TYPE, src => src.TaxType)
.Map(dest => dest.RATE, src => src.Rate)
.Map(dest => dest.TOTAL_AMOUNT, src => src.TotalAmount)
.Map(dest => dest.IS_DONGSHENG, src => src.IsDongSheng);
config.ForType<TaskManageOrderVGMFeedBackInfo, TaskVGMFeedBackInfo>()
.Map(dest => dest.CONTA_NO, src => src.ContaNo)
.Map(dest => dest.SEAL_NO, src => src.SealNo)
.Map(dest => dest.CONTA_TYPE, src => src.ContaType)
.Map(dest => dest.CONTA_TYPE_NAME, src => src.ContaTypeName)
.Map(dest => dest.KGS, src => src.KGS)
.Map(dest => dest.TAREWEIGHT, src => src.TAREWEIGHT)
.Map(dest => dest.WEIGHKGS, src => src.WEIGHKGS)
.Map(dest => dest.WEIGHTYPE, src => src.WEIGHTYPE);
} }
} }
} }

@ -90,5 +90,10 @@ namespace Myshipping.Application
/// 是否东胜接收 1-是 0-否 /// 是否东胜接收 1-是 0-否
/// </summary> /// </summary>
public int IsDongSheng { get; set; } public int IsDongSheng { get; set; }
/// <summary>
/// 主单号
/// </summary>
public string MBlNo { get; set; }
} }
} }

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
///
/// </summary>
public class TaskManageOrderFileInfo
{
/// <summary>
/// 文件路径
/// </summary>
public string FilePath { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FileType { get; set; }
/// <summary>
/// 文件名
/// </summary>
public string FileName { get; set; }
}
}

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 邮件
/// </summary>
public class TaskManageOrderMailInfo
{
/// <summary>
/// 邮件路径
/// </summary>
public string MailPath { get; set; }
}
}

@ -48,6 +48,11 @@ namespace Myshipping.Application
/// </summary> /// </summary>
public string MBlNo { get; set; } public string MBlNo { get; set; }
/// <summary>
/// 反馈结果
/// </summary>
public string ResultNote { get; set; }
/// <summary> /// <summary>
/// 是否异常 1-异常 0-未异常 /// 是否异常 1-异常 0-未异常
/// </summary> /// </summary>
@ -92,5 +97,15 @@ namespace Myshipping.Application
/// VGM反馈详情列表 /// VGM反馈详情列表
/// </summary> /// </summary>
public List<TaskManageOrderVGMFeedBackInfo> VGMFeedBackList { get; set; } public List<TaskManageOrderVGMFeedBackInfo> VGMFeedBackList { get; set; }
/// <summary>
/// 附件列表
/// </summary>
public List<TaskManageOrderFileInfo> FileList { get; set; }
/// <summary>
/// 邮件列表
/// </summary>
public List<TaskManageOrderMailInfo> EmailList { get; set; }
} }
} }

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -42,22 +43,28 @@ namespace Myshipping.Application
/// <summary> /// <summary>
/// 运输条款 /// 运输条款
/// </summary> /// </summary>
/// <example>CY-CY</example>
public string Service { get; set; } public string Service { get; set; }
/// <summary> /// <summary>
/// 签单方式 /// 签单方式
/// </summary> /// </summary>
/// <example>TELEX</example>
public string IssueType { get; set; } public string IssueType { get; set; }
/// <summary> /// <summary>
/// 装货港代码 /// 装货港代码
/// </summary> /// </summary>
/// <example>CNTAO</example>
[MaxLength(5,ErrorMessage = "装货港代码需要5位编码")]
public string PortLoadId { get; set; } public string PortLoadId { get; set; }
/// <summary> /// <summary>
/// 装货港 /// 装货港
/// </summary> /// </summary>
public string PortLoad { get; set; } public string PortLoad { get; set; }
/// <summary> /// <summary>
/// 卸港代码 /// 卸港代码
/// </summary> /// </summary>
/// <example>GUPIT</example>
[MaxLength(5, ErrorMessage = "卸货港代码需要5位编码")]
public string PortDischargeId { get; set; } public string PortDischargeId { get; set; }
/// <summary> /// <summary>
/// 卸货港 /// 卸货港
@ -66,6 +73,8 @@ namespace Myshipping.Application
/// <summary> /// <summary>
/// 中转港代码 /// 中转港代码
/// </summary> /// </summary>
/// <example>GUPIT</example>
[MaxLength(5, ErrorMessage = "中转港代码需要5位编码")]
public string PortTransId { get; set; } public string PortTransId { get; set; }
/// <summary> /// <summary>
/// 中转港 /// 中转港
@ -74,6 +83,8 @@ namespace Myshipping.Application
/// <summary> /// <summary>
/// 目的地代码 /// 目的地代码
/// </summary> /// </summary>
/// <example>GUPIT</example>
[MaxLength(5, ErrorMessage = "目的地代码需要5位编码")]
public string DestinationId { get; set; } public string DestinationId { get; set; }
/// <summary> /// <summary>
/// 目的地 /// 目的地

@ -17,5 +17,12 @@ namespace Myshipping.Application
/// <param name="info">任务详情</param> /// <param name="info">任务详情</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> CreateTaskJob(TaskManageOrderMessageInfo info); Task<TaskManageOrderResultDto> CreateTaskJob(TaskManageOrderMessageInfo info);
/// <summary>
/// 获取查询参数
/// </summary>
/// <param name="ParaType">参数类型 STATUS-任务状态;TASK_TYPE-任务类型;SOURCE-任务来源</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetParaInfo(string ParaType);
} }
} }

@ -2,14 +2,17 @@
using Furion.DistributedIDGenerator; using Furion.DistributedIDGenerator;
using Furion.DynamicApiController; using Furion.DynamicApiController;
using Furion.FriendlyException; using Furion.FriendlyException;
using Furion.RemoteRequest;
using Mapster; using Mapster;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Myshipping.Application.Entity; using Myshipping.Application.Entity;
using Myshipping.Core; using Myshipping.Core;
using MySqlX.XDevAPI.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -26,17 +29,29 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseInfoRepository; private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseInfoRepository;
private readonly SqlSugarRepository<TaskSIFeedBackInfo> _taskSIFeedBackInfoRepository; private readonly SqlSugarRepository<TaskSIFeedBackInfo> _taskSIFeedBackInfoRepository;
private readonly SqlSugarRepository<TaskSIFeedBackContaInfo> _taskSIFeedBackContaInfoRepository; private readonly SqlSugarRepository<TaskSIFeedBackContaInfo> _taskSIFeedBackContaInfoRepository;
private readonly SqlSugarRepository<TaskBillFeeDetailInfo> _taskBillFeeDetailInfoRepository;
private readonly SqlSugarRepository<TaskFileInfo> _taskFileInfoRepository;
private readonly SqlSugarRepository<TaskEmailInfo> _taskEmailInfoRepository;
private readonly SqlSugarRepository<TaskVGMFeedBackInfo> _taskVGMFeedBackInfoRepository;
private readonly ILogger<BookingOrderService> _logger; private readonly ILogger<BookingOrderService> _logger;
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository, public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
SqlSugarRepository<TaskSIFeedBackInfo> taskSIFeedBackInfoRepository, SqlSugarRepository<TaskSIFeedBackInfo> taskSIFeedBackInfoRepository,
SqlSugarRepository<TaskSIFeedBackContaInfo> taskSIFeedBackContaInfoRepository, SqlSugarRepository<TaskSIFeedBackContaInfo> taskSIFeedBackContaInfoRepository,
SqlSugarRepository<TaskBillFeeDetailInfo> taskBillFeeDetailInfoRepository,
SqlSugarRepository<TaskFileInfo> taskFileInfoRepository,
SqlSugarRepository<TaskEmailInfo> taskEmailInfoRepository,
SqlSugarRepository<TaskVGMFeedBackInfo> taskVGMFeedBackInfoRepository,
ILogger<BookingOrderService> logger) ILogger<BookingOrderService> logger)
{ {
_taskBaseInfoRepository = taskBaseInfoRepository; _taskBaseInfoRepository = taskBaseInfoRepository;
_taskSIFeedBackInfoRepository = taskSIFeedBackInfoRepository; _taskSIFeedBackInfoRepository = taskSIFeedBackInfoRepository;
_taskSIFeedBackContaInfoRepository = taskSIFeedBackContaInfoRepository; _taskSIFeedBackContaInfoRepository = taskSIFeedBackContaInfoRepository;
_taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository;
_taskFileInfoRepository = taskFileInfoRepository;
_taskEmailInfoRepository = taskEmailInfoRepository;
_taskVGMFeedBackInfoRepository = taskVGMFeedBackInfoRepository;
_logger = logger; _logger = logger;
} }
@ -120,6 +135,52 @@ namespace Myshipping.Application
//新增 //新增
await _taskBaseInfoRepository.InsertAsync(taskInfo); await _taskBaseInfoRepository.InsertAsync(taskInfo);
//附件
if(info.Main.FileList != null && info.Main.FileList.Count > 0)
{
info.Main.FileList.ForEach(async file => {
var fileInfo = new TaskFileInfo();
fileInfo.PK_ID = IDGen.NextID().ToString();
fileInfo.TASK_PKID = taskInfo.PK_ID;
fileInfo.CreatedTime = taskInfo.CreatedTime;
fileInfo.UpdatedTime = taskInfo.CreatedTime;
fileInfo.FILE_PATH = file.FilePath;
fileInfo.FILE_NAME = file.FileName;
fileInfo.FILE_TYPE = file.FileType;
if(string.IsNullOrWhiteSpace(fileInfo.FILE_NAME))
{
var fileModel = new FileInfo(file.FilePath);
fileInfo.FILE_NAME = fileModel.Name;
fileInfo.FILE_TYPE = fileModel.Extension?.Replace(".","");
}
await _taskFileInfoRepository.InsertAsync(fileInfo);
});
}
//邮件
if (info.Main.EmailList != null && info.Main.EmailList.Count > 0)
{
info.Main.EmailList.ForEach(async email => {
var emailInfo = new TaskEmailInfo();
emailInfo.PK_ID = IDGen.NextID().ToString();
emailInfo.TASK_PKID = taskInfo.PK_ID;
emailInfo.CreatedTime = taskInfo.CreatedTime;
emailInfo.UpdatedTime = taskInfo.CreatedTime;
emailInfo.MAIL_PATH = email.MailPath;
await _taskEmailInfoRepository.InsertAsync(emailInfo);
});
}
//SI反馈入库 //SI反馈入库
if (info.Main.TaskType == TaskBaseTypeEnum.SI_FEEDBACK) if (info.Main.TaskType == TaskBaseTypeEnum.SI_FEEDBACK)
{ {
@ -153,6 +214,41 @@ namespace Myshipping.Application
} }
} }
//费用明细
if(info.Main.TaskType == TaskBaseTypeEnum.INVOICE_BILL_MAIL || info.Main.TaskType == TaskBaseTypeEnum.PER_BILL)
{
if (info.Main.FeeList != null && info.Main.FeeList.Count > 0)
{
info.Main.FeeList.ForEach(async fee => {
var feeInfo = fee.Adapt<TaskBillFeeDetailInfo>();
feeInfo.PK_ID = IDGen.NextID().ToString();
feeInfo.TASK_PKID = taskInfo.PK_ID;
feeInfo.CreatedTime = taskInfo.CreatedTime;
feeInfo.UpdatedTime = taskInfo.CreatedTime;
await _taskBillFeeDetailInfoRepository.InsertAsync(feeInfo);
});
}
}
//VGM反馈入库
if (info.Main.VGMFeedBackList != null && info.Main.VGMFeedBackList.Count > 0)
{
info.Main.VGMFeedBackList.ForEach(async vgm => {
var vgmInfo = vgm.Adapt<TaskVGMFeedBackInfo>();
vgmInfo.PK_ID = IDGen.NextID().ToString();
vgmInfo.TASK_PKID = taskInfo.PK_ID;
vgmInfo.CreatedTime = taskInfo.CreatedTime;
vgmInfo.UpdatedTime = taskInfo.CreatedTime;
await _taskVGMFeedBackInfoRepository.InsertAsync(vgmInfo);
});
}
result.succ = true; result.succ = true;
result.msg = "新增任务成功"; result.msg = "新增任务成功";
} }
@ -163,5 +259,45 @@ namespace Myshipping.Application
return result; return result;
} }
/// <summary>
/// 获取查询参数
/// </summary>
/// <param name="ParaType">参数类型 STATUS-任务状态;TASK_TYPE-任务类型;SOURCE-任务来源</param>
/// <returns>返回回执</returns>
/// <example>TASK_TYPE</example>
[HttpGet("/TaskManage/GetParaInfo")]
public async Task<TaskManageOrderResultDto> GetParaInfo([QueryString]string ParaType)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
Dictionary<int, string> dict = new Dictionary<int, string>();
if (ParaType == "STATUS")
{
dict = EnumUtil.GetEnumDictionary(typeof(TaskStatusEnum));
}
else if (ParaType == "TASK_TYPE")
{
dict = EnumUtil.GetEnumDictionary(typeof(TaskBusiTypeEnum));
}
else if (ParaType == "SOURCE")
{
dict = EnumUtil.GetEnumDictionary(typeof(TaskSourceEnum));
}
result.succ = true;
result.rows = dict.Select(t => new { Code = t.Value.ToString(), Name = t.Key }).ToList();
}
catch (Exception ex)
{
result.succ = false;
result.msg = ex.Message;
}
return result;
}
} }
} }

Loading…
Cancel
Save