diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/BC/TaskBCShowBaseDto.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/BC/TaskBCShowBaseDto.cs index c0c4898c..624205ed 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Dtos/BC/TaskBCShowBaseDto.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/BC/TaskBCShowBaseDto.cs @@ -240,5 +240,10 @@ namespace Myshipping.Application /// 集装箱列表 /// public List CtnList { get; set; } + + /// + /// 任务附件 + /// + public List FileList { get; set; } } } diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskFileDto.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskFileDto.cs new file mode 100644 index 00000000..c57b0624 --- /dev/null +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskFileDto.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Myshipping.Application +{ + /// + /// 任务附件 + /// + public class TaskFileDto + { + /// + /// 文件路径 + /// + public string FilePath { get; set; } + /// + /// 文件类型 + /// + public string FileType { get; set; } + /// + /// 文件名 + /// + public string FileName { get; set; } + + /// + /// 附件类型代码 BC-Booking Confirmation + /// + public string FileCategory { get; set; } + + /// + /// 附件类型名称 BC-Booking Confirmation + /// + public string FileCategoryName { get; set; } + } +} diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs index 06037a40..a9192224 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs @@ -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() + .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() .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() + .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); } } diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs index e6384ee3..4099e2bf 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs @@ -17,7 +17,7 @@ namespace Myshipping.Application /// /// BC任务 /// - [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 _taskBCInfoRepository; private readonly SqlSugarRepository _taskBCCTNInfoRepository; private readonly SqlSugarRepository _taskBaseRepository; + private readonly SqlSugarRepository _taskFileRepository; public TaskManageBCService(SqlSugarRepository taskBCInfoRepository, SqlSugarRepository taskBaseRepository, - SqlSugarRepository taskBCCTNInfoRepository) + SqlSugarRepository taskBCCTNInfoRepository, + SqlSugarRepository taskFileRepository) { _taskBaseRepository = taskBaseRepository; _taskBCInfoRepository = taskBCInfoRepository; _taskBCCTNInfoRepository = taskBCCTNInfoRepository; + _taskFileRepository = taskFileRepository; } #region 获取BC详情 @@ -62,6 +65,11 @@ namespace Myshipping.Application model.CtnList = BCCtnList.Adapt>(); + var fileList = _taskFileRepository.AsQueryable().Where(a => a.TASK_PKID == bcOrder.TASK_ID).ToList(); + + if (fileList.Count > 0) + model.FileList = fileList.Adapt>(); + result.succ = true; result.ext = model; @@ -106,6 +114,11 @@ namespace Myshipping.Application if (bcCtnList.Count > 0) model.CtnList = bcCtnList.Adapt>(); + var fileList = _taskFileRepository.AsQueryable().Where(a => a.TASK_PKID == bcOrder.TASK_ID).ToList(); + + if (fileList.Count > 0) + model.FileList = fileList.Adapt>(); + result.succ = true; result.ext = model;