修改BC任务获取详情接口

optimize
jianghaiqing 1 year ago
parent f9cbaf6598
commit 2c0d9c82ab

@ -240,5 +240,10 @@ namespace Myshipping.Application
/// 集装箱列表
/// </summary>
public List<TaskBCCTNInfoDto> CtnList { get; set; }
/// <summary>
/// 任务附件
/// </summary>
public List<TaskFileDto> FileList { get; set; }
}
}

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务附件
/// </summary>
public class TaskFileDto
{
/// <summary>
/// 文件路径
/// </summary>
public string FilePath { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FileType { get; set; }
/// <summary>
/// 文件名
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 附件类型代码 BC-Booking Confirmation
/// </summary>
public string FileCategory { get; set; }
/// <summary>
/// 附件类型名称 BC-Booking Confirmation
/// </summary>
public string FileCategoryName { get; set; }
}
}

@ -662,6 +662,54 @@ namespace Myshipping.Application
.Map(dest => dest.RecvEmail, src => src.RECV_EMAIL)
.Map(dest => dest.BookingOrderId, src => src.BOOKING_ORDER_ID);
config.ForType<TaskBCInfo, TaskBCShowBaseDto>()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.TaskId, src => src.TASK_ID)
.Map(dest => dest.BookingParty, src => src.BOOKING_PARTY)
.Map(dest => dest.Shipper, src => src.SHIPPER)
.Map(dest => dest.Consignee, src => src.CONSIGNEE)
.Map(dest => dest.NotifyParty, src => src.NOTIFYPARTY)
.Map(dest => dest.BCModifyTimes, src => src.BC_MODIFY_TIMES)
.Map(dest => dest.BCModifyDate, src => src.BC_MODIFY_DATE)
.Map(dest => dest.MBLNo, src => src.MBL_NO)
.Map(dest => dest.TaskId, src => src.TASK_ID)
.Map(dest => dest.Vessel, src => src.VESSEL)
.Map(dest => dest.VoyNo, src => src.VOYNO)
.Map(dest => dest.Carrier, src => src.CARRIER)
.Map(dest => dest.PlaceReceipt, src => src.PLACERECEIPT)
.Map(dest => dest.Portload, src => src.PORTLOAD)
.Map(dest => dest.ClosingDate, src => src.CLOSING_DATE)
.Map(dest => dest.VGMCutoffTime, src => src.VGM_CUTOFF_TIME)
.Map(dest => dest.ETA, src => src.ETA)
.Map(dest => dest.ETD, src => src.ETD)
.Map(dest => dest.PODETA, src => src.POD_ETA)
.Map(dest => dest.CutSingleTime, src => src.CUT_SINGLE_TIME)
.Map(dest => dest.PortDischarge, src => src.PORTDISCHARGE)
.Map(dest => dest.PlaceDelivery, src => src.PLACEDELIVERY)
.Map(dest => dest.ShippingMethod, src => src.SHIPPING_METHOD)
.Map(dest => dest.Service, src => src.SERVICE)
.Map(dest => dest.PreTransMode, src => src.PRETRANS_MODE)
.Map(dest => dest.Description, src => src.DESCRIPTION)
.Map(dest => dest.IssuePlace, src => src.ISSUEPLACE)
.Map(dest => dest.CollectionTerminal, src => src.COLLECTION_TERMINAL)
.Map(dest => dest.ContractNo, src => src.CONTRACTNO)
.Map(dest => dest.PrepardAT, src => src.PREPARDAT)
.Map(dest => dest.ShipAgent, src => src.SHIP_AGENT)
.Map(dest => dest.Yard, src => src.YARD)
.Map(dest => dest.YardContactUserName, src => src.YARD_CONTACT_USR)
.Map(dest => dest.YardContactTel, src => src.YARD_CONTACT_TEL)
.Map(dest => dest.FstCustomerSerUserName, src => src.FST_CUSTOMER_SER_USRNAME)
.Map(dest => dest.FstCustomerSerUserTel, src => src.FST_CUSTOMER_SER_TEL)
.Map(dest => dest.FstCustomerSerUserEmail, src => src.FST_CUSTOMER_SER_EMAIL)
.Map(dest => dest.Remark1, src => src.REMARK1)
.Map(dest => dest.CYCutoffTime, src => src.CY_CUTOFF_TIME)
.Map(dest => dest.Status, src => src.STATUS)
.Map(dest => dest.FileMD5, src => src.FILE_MD5)
.Map(dest => dest.LastToBookingDate, src => src.LAST_TOBOOKING_DATE)
.Map(dest => dest.FromEmail, src => src.FROM_EMAIL)
.Map(dest => dest.RecvEmail, src => src.RECV_EMAIL)
.Map(dest => dest.BookingOrderId, src => src.BOOKING_ORDER_ID);
config.ForType<TaskManageOrderBCInfo, TaskBCInfo>()
.Map(dest => dest.BOOKING_PARTY, src => src.BookingParty)
.Map(dest => dest.SHIPPER, src => src.Shipper)
@ -731,6 +779,13 @@ namespace Myshipping.Application
.Map(dest => dest.TAKE_CTN_TIME, src => src.TakeCTNTime)
.Map(dest => dest.RETURN_CTN_YARD, src => src.ReturnCTNYard);
config.ForType<TaskFileInfo, TaskFileDto>()
.Map(dest => dest.FilePath, src => src.FILE_PATH)
.Map(dest => dest.FileType, src => src.FILE_TYPE)
.Map(dest => dest.FileName, src => src.FILE_NAME)
.Map(dest => dest.FileCategory, src => src.FILE_CATEGORY)
.Map(dest => dest.FileCategoryName, src => src.FILE_CATEGORY_NAME);
}
}

@ -17,7 +17,7 @@ namespace Myshipping.Application
/// <summary>
/// BC任务
/// </summary>
[ApiDescriptionSettings("Application", Name = "TaskManageBCService", Order = 10)]
[ApiDescriptionSettings("Application", Name = "TaskManageBC", Order = 10)]
public class TaskManageBCService: ITaskManageBCService, IDynamicApiController
{
private readonly ISysCacheService _cache;
@ -26,14 +26,17 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<TaskBCInfo> _taskBCInfoRepository;
private readonly SqlSugarRepository<TaskBCCTNInfo> _taskBCCTNInfoRepository;
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseRepository;
private readonly SqlSugarRepository<TaskFileInfo> _taskFileRepository;
public TaskManageBCService(SqlSugarRepository<TaskBCInfo> taskBCInfoRepository,
SqlSugarRepository<TaskBaseInfo> taskBaseRepository,
SqlSugarRepository<TaskBCCTNInfo> taskBCCTNInfoRepository)
SqlSugarRepository<TaskBCCTNInfo> taskBCCTNInfoRepository,
SqlSugarRepository<TaskFileInfo> taskFileRepository)
{
_taskBaseRepository = taskBaseRepository;
_taskBCInfoRepository = taskBCInfoRepository;
_taskBCCTNInfoRepository = taskBCCTNInfoRepository;
_taskFileRepository = taskFileRepository;
}
#region 获取BC详情
@ -62,6 +65,11 @@ namespace Myshipping.Application
model.CtnList = BCCtnList.Adapt<List<TaskBCCTNInfoDto>>();
var fileList = _taskFileRepository.AsQueryable().Where(a => a.TASK_PKID == bcOrder.TASK_ID).ToList();
if (fileList.Count > 0)
model.FileList = fileList.Adapt<List<TaskFileDto>>();
result.succ = true;
result.ext = model;
@ -106,6 +114,11 @@ namespace Myshipping.Application
if (bcCtnList.Count > 0)
model.CtnList = bcCtnList.Adapt<List<TaskBCCTNInfoDto>>();
var fileList = _taskFileRepository.AsQueryable().Where(a => a.TASK_PKID == bcOrder.TASK_ID).ToList();
if (fileList.Count > 0)
model.FileList = fileList.Adapt<List<TaskFileDto>>();
result.succ = true;
result.ext = model;

Loading…
Cancel
Save