修改我的任务,单票账单查询

optimize
jianghaiqing 2 years ago
parent 4a1578eb9a
commit f41e30abbd

@ -306,6 +306,34 @@ namespace Myshipping.Application
.Map(dest => dest.S20, src => src.S20)
.Map(dest => dest.S40, src => src.S40)
.Map(dest => dest.S45, src => src.S45);
config.ForType<TaskPerBillBaseInfo, TaskPerBillBaseInfoDto>()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.TaskPKId, src => src.TASK_PKID)
.Map(dest => dest.MBLNo, src => src.MBL_NO)
.Map(dest => dest.InvoiceNo, src => src.INVOICE_NO)
.Map(dest => dest.CancelNo, src => src.CANCEL_NO)
.Map(dest => dest.TotalAmount, src => src.TOTAL_AMOUNT)
.Map(dest => dest.IsDongshengRecv, src => src.IS_DONGSH_RECV)
.Map(dest => dest.DongshengRecvTime, src => src.DONGSH_RECV_TIME.HasValue? src.DONGSH_RECV_TIME.Value.ToString("yyyy-MM-dd HH:mm:ss") : "")
.Map(dest => dest.IsDongshengResult, src => src.IS_DONGSH_RESULT)
.Map(dest => dest.DongshengResultTime, src => src.DONGSH_RESULT_TIME.HasValue ? src.DONGSH_RESULT_TIME.Value.ToString("yyyy-MM-dd HH:mm:ss") : "")
.Map(dest => dest.DongshengRecvReason, src => src.DONGSH_RECV_REASON);
config.ForType<TaskBillFeeDetailInfo, TaskPerBillFeeDto>()
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.FeeCode, src => src.FEE_CODE)
.Map(dest => dest.FeeName, src => src.FEE_NAME)
.Map(dest => dest.Amount, src => src.AMOUNT)
.Map(dest => dest.Currency, src => src.CURRENCY)
.Map(dest => dest.AmountUSD, src => src.AMOUNT_USD)
.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, src => src.TAX_TYPE)
.Map(dest => dest.Rate, src => src.RATE);
}
}
}

@ -55,12 +55,12 @@ namespace Myshipping.Application
/// <summary>
/// 东胜接收时间
/// </summary>
public Nullable<DateTime> DongshengRecvTime { get; set; }
public string DongshengRecvTime { get; set; }
/// <summary>
/// 东胜回执时间
/// </summary>
public Nullable<DateTime> DongshengResultTime { get; set; }
public string DongshengResultTime { get; set; }
/// <summary>
/// 东胜反馈原因

@ -6,7 +6,74 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
///
/// </summary>
public class TaskPerBillFeeDto
{
/// <summary>
/// 主键
/// </summary>
public string PKId { get; set; }
/// <summary>
/// 任务主键
/// </summary>
public string TaskPKId { get; set; }
/// <summary>
/// 费用代码
/// </summary>
public string FeeCode { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 费用金额
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// 币制
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 顺序号
/// </summary>
public int SortNo { get; set; }
/// <summary>
/// 集装箱型
/// </summary>
public string CTNALL { get; set; }
/// <summary>
/// 数量
/// </summary>
public int Qty { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率类型
/// </summary>
public string Tax { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal? Rate { get; set; }
/// <summary>
/// 费用金额(美金)
/// </summary>
public decimal AmountUSD { get; set; }
}
}

@ -6,6 +6,9 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 单票账单
/// </summary>
public class TaskPerBillResultInfo
{
/// <summary>
@ -18,6 +21,11 @@ namespace Myshipping.Application
/// </summary>
public TaskBookingOrderDto BookingOrder { get; set; }
/// <summary>
/// 单票账单详情
/// </summary>
public TaskPerBillBaseInfoDto TaskPerBillBaseInfoDto { get; set; }
/// <summary>
/// 费用明细
/// </summary>

@ -66,6 +66,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<TaskOriginalDownloadHisInfo> _taskOriginalDownloadHisInfoRepository;
private readonly SqlSugarRepository<TaskChargesHisInfo> _taskChargesHisInfoRepository;
private readonly SqlSugarRepository<TaskLARAPaperInfo> _taskLARAPaperInfoRepository;
private readonly SqlSugarRepository<TaskPerBillBaseInfo> _taskPerBillBaseInfoRepository;
private readonly SqlSugarRepository<BookingOrder> _bookingOrderRepository;
private readonly SqlSugarRepository<BookingCtn> _bookingOrderContaRepository;
@ -102,6 +103,7 @@ namespace Myshipping.Application
SqlSugarRepository<BookingCtnDetail> bookingOrderContaCargoRepository,
SqlSugarRepository<BookingStatus> bookingStatusRepository,
SqlSugarRepository<DjyUserMailAccount> djyUserMailAccountRepository,
SqlSugarRepository<TaskPerBillBaseInfo> taskPerBillBaseInfoRepository,
IDjyWebsiteAccountConfigService webAccountConfig,
ISysCacheService cache,
ILogger<BookingOrderService> logger)
@ -123,6 +125,7 @@ namespace Myshipping.Application
_bookingOrderContaCargoRepository = bookingOrderContaCargoRepository;
_bookingStatusRepository = bookingStatusRepository;
_djyUserMailAccountRepository = djyUserMailAccountRepository;
_taskPerBillBaseInfoRepository = taskPerBillBaseInfoRepository;
_webAccountConfig = webAccountConfig;
_cache = cache;
@ -2287,7 +2290,8 @@ namespace Myshipping.Application
/// </summary>
/// <param name="taskPKId">任务主键</param>
/// <returns>返回结果</returns>
public async Task<TaskPerBillResultInfo> GetTaskPerBillInfo(string taskPKId)
[HttpGet("/TaskManage/GetTaskPerBillInfo")]
public async Task<TaskPerBillResultInfo> GetTaskPerBillInfo([FromQuery] string taskPKId)
{
TaskPerBillResultInfo model = new TaskPerBillResultInfo();
@ -2310,6 +2314,13 @@ namespace Myshipping.Application
model.TaskId = taskInfo.PK_ID;
var perBillInfo = _taskPerBillBaseInfoRepository.AsQueryable().First(t => t.TASK_PKID == taskInfo.PK_ID);
if (perBillInfo == null)
Oops.Oh($"单票账单不存在");
model.TaskPerBillBaseInfoDto = perBillInfo.Adapt<TaskPerBillBaseInfoDto>();
if (orderInfo != null)
{
//订舱

Loading…
Cancel
Save