diff --git a/Myshipping.Application/Entity/BookingCustomerOrder.cs b/Myshipping.Application/Entity/BookingCustomerOrder.cs index fe99187a..a4d1312b 100644 --- a/Myshipping.Application/Entity/BookingCustomerOrder.cs +++ b/Myshipping.Application/Entity/BookingCustomerOrder.cs @@ -283,6 +283,11 @@ namespace Myshipping.Application.Entity /// 目的地 /// public string DESTINATION { get; set; } + + /// + /// 附加数据 + /// + public string ExtendData { get; set; } } /// diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskDraftInfo.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskDraftInfo.cs index e569df8f..78c21469 100644 --- a/Myshipping.Application/Entity/TaskManagePlat/TaskDraftInfo.cs +++ b/Myshipping.Application/Entity/TaskManagePlat/TaskDraftInfo.cs @@ -10,10 +10,10 @@ using System.Threading.Tasks; namespace Myshipping.Application { /// - /// 任务目的港未提货未返箱 + /// 任务格式单 /// - [SugarTable("task_pod_discharge_gateout_full")] - [Description("任务目的港未提货未返箱")] + [SugarTable("task_draft_info")] + [Description("任务格式单")] public class TaskDraftInfo : TaskManageDbEntity { /// diff --git a/Myshipping.Application/Enum/TaskFileCategoryEnum.cs b/Myshipping.Application/Enum/TaskFileCategoryEnum.cs index 9c725be8..c246102e 100644 --- a/Myshipping.Application/Enum/TaskFileCategoryEnum.cs +++ b/Myshipping.Application/Enum/TaskFileCategoryEnum.cs @@ -43,6 +43,16 @@ namespace Myshipping.Application [Description("Booking Cancellation Notice")] BC_CANCEL_NOTICE, /// + /// Booking Cancellation + /// + [Description("Draft")] + DRAFT, + /// + /// Booking Cancellation Notice + /// + [Description("Draft Notice")] + DRAFT_NOTICE, + /// /// 空 /// [Description("NONE")] diff --git a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs index d239e473..447886d6 100644 --- a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs +++ b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs @@ -386,6 +386,7 @@ namespace Myshipping.Application outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id && x.Category == StaLogCateAudit).OrderByDescending(x => x.OpTime).ToList().Adapt>(); outModel.ServiceItemList = _repServiceItem.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt>(); + return outModel; } @@ -1908,6 +1909,19 @@ namespace Myshipping.Application ins = true; } + //订舱账号、密码 + var jobj = new JObject(); + if (!string.IsNullOrEmpty(custOrder.ExtendData)) + { + jobj = JObject.Parse(custOrder.ExtendData); + } + + var jobjBookAcc=new JObject(); + jobjBookAcc["Account"] = input.BOOKINGACCOUNT; + jobjBookAcc["Password"] = input.BOOKINGPASSWORD; + jobj["BookingAccount"] = jobjBookAcc; + custOrder.ExtendData = jobjBookAcc.ToJsonString(); + var ctns = input.CtnList.Adapt>(); var servList = input.ServiceItemList.Adapt>(); diff --git a/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs b/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs index c90bf365..0bf18f31 100644 --- a/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs +++ b/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs @@ -397,6 +397,11 @@ namespace Myshipping.Application /// public string UpdatedTime { get; set; } + /// + /// 附加数据 + /// + public string ExtendData { get; set; } + /// /// 文件列表 /// @@ -553,6 +558,11 @@ namespace Myshipping.Application /// 回推接口秘钥 /// public string FeedbackSecret { get; set; } + + /// + /// 附加数据 + /// + public string ExtendData { get; set; } } @@ -889,13 +899,15 @@ namespace Myshipping.Application /// 服务项目 /// public List ServiceItemList { get; set; } - ///// - ///// 订舱账号 - ///// - //public string BOOKINGACCOUNT { get; set; } - ///// - ///// 订舱密码 - ///// - //public string BOOKINGPASSWORD { get; set; } + + /// + /// 订舱账号 + /// + public string BOOKINGACCOUNT { get; set; } + + /// + /// 订舱密码 + /// + public string BOOKINGPASSWORD { get; set; } } } diff --git a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs index 89b123df..b4b10f48 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs @@ -33,6 +33,7 @@ namespace Myshipping.Application.Service.BookingOrder private readonly ISysCacheService _cache; private readonly IDjyWebsiteAccountConfigService _webAccountConfig; private readonly ILogger _logger; + private readonly ISysDataUserMenu _sysDataUserMenuService; const string CONST_MSK_API_COMMODITY_URL = "MSKApiCommodity"; const string CONST_MSK_API_BOOKING_URL = "MSKApiBooking"; @@ -41,6 +42,7 @@ namespace Myshipping.Application.Service.BookingOrder public BookingMSKAPIService(ILogger logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig, SqlSugarRepository bookingDeliveryRecordRep, + ISysDataUserMenu sysDataUserMenuService, SqlSugarRepository bookingDeliveryRecordCtnRep) { _logger = logger; @@ -48,7 +50,7 @@ namespace Myshipping.Application.Service.BookingOrder _webAccountConfig = webAccountConfig; _bookingDeliveryRecordRep = bookingDeliveryRecordRep; _bookingDeliveryRecordCtnRep = bookingDeliveryRecordCtnRep; - + _sysDataUserMenuService = sysDataUserMenuService; } #region 检索海运船期详情 @@ -984,20 +986,27 @@ namespace Myshipping.Application.Service.BookingOrder //这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段 if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); - /* + //菜单375504048771141=我的任务台账 - List userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuTaskManage); + List userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi); - if (userlist == null) - userlist = new List { UserManager.UserId }; + bool isAdmin = false; - if (userlist.Count > 0) + if(userlist == null) + { + isAdmin = true; + userlist = new List(); + } + else if (userlist != null && userlist.Count > 0) + { + userlist.Add(UserManager.UserId); userlist = userlist.Distinct().ToList(); + } _logger.LogInformation("任务台账权限范围 {list}", userlist); - */ - + var entities = await _bookingDeliveryRecordRep.AsQueryable() + .Where(t => isAdmin || userlist.Contains(t.CreatedUserId.Value)) .WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin) .WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd) .WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin) @@ -1293,6 +1302,7 @@ namespace Myshipping.Application.Service.BookingOrder /// /// 马士基API订舱ID组 /// 返回执行结果消息 + [HttpPost("/BookingMSKAPI/BatchSend")] public async Task BatchSend(long[] ids) { var list = await _bookingDeliveryRecordRep.AsQueryable() @@ -1313,6 +1323,7 @@ namespace Myshipping.Application.Service.BookingOrder /// 马士基API订舱ID /// 需要复制生成记录 /// 返回执行结果消息 + [HttpGet("/BookingMSKAPI/BatchSend")] public async Task BatchCopy(long id, int copyNum) { diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index bfa70016..41568672 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -1487,7 +1487,7 @@ namespace Myshipping.Application if (input.ctnInputs != null) { - var groupList = input.ctnInputs.Where(x => x.CTNNUM > 0).GroupBy(c => c.CTNALL).Select(g => $"{g.Key}*{g.Sum(gg => gg.CTNNUM)}"); + var groupList = input.ctnInputs.GroupBy(c => c.CTNALL).Select(g => $"{g.Key}*{g.Sum(gg => gg.CTNNUM)}"); input.CNTRTOTAL = string.Join(" / ", groupList); } //条件限制 重复限制 diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BookingDeliveryRecordPageDto.cs b/Myshipping.Application/Service/BookingOrder/Dto/BookingDeliveryRecordPageDto.cs index a47f389e..74417e0f 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/BookingDeliveryRecordPageDto.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/BookingDeliveryRecordPageDto.cs @@ -433,7 +433,7 @@ namespace Myshipping.Application /// /// 最后BC接收时间 /// - public bool LstRecvBCDate { get; set; } + public Nullable LstRecvBCDate { get; set; } /// /// 是否已有BookingCancellation @@ -443,7 +443,7 @@ namespace Myshipping.Application /// /// 最后BookingCancellation接收时间 /// - public bool LstRecvBKCancelDate { get; set; } + public Nullable LstRecvBKCancelDate { get; set; } /// /// 预计航行天数 diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderSIFeedBackInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderSIFeedBackInfo.cs index 76583f00..fe34ddb3 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderSIFeedBackInfo.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderSIFeedBackInfo.cs @@ -134,6 +134,26 @@ namespace Myshipping.Application /// public string ThirdPayAddr { get; set; } + /// + /// 截单上传时间 + /// + public string SubmittedDate { get; set; } + + /// + /// 签单方式(seaway、original、telex) + /// + public string DocumentType { get; set; } + + /// + /// 提单份数 + /// + public string BillOfNum { get; set; } + + /// + /// 放单方式 + /// + public string ReleaseInstruction { get; set; } + /// /// 箱信息 /// diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index a42cd1b4..d18abe85 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -417,6 +417,12 @@ namespace Myshipping.Application fileCategory = TaskFileCategoryEnum.BC_CANCEL.ToString(); } + else if (TaskBaseTypeEnum.DRAFT.ToString() == taskInfo.TASK_BASE_TYPE) + { + attachFileType = "draftfiles"; + + fileCategory = TaskFileCategoryEnum.DRAFT.ToString(); + } var noExtensionFileName = Path.GetFileNameWithoutExtension(file.FileName); var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName, @@ -466,6 +472,12 @@ namespace Myshipping.Application fileCategory = TaskFileCategoryEnum.BC_CANCEL_NOTICE.ToString(); } + else if (TaskBaseTypeEnum.DRAFT.ToString() == taskInfo.TASK_BASE_TYPE) + { + attachFileType = "draftnoticefiles"; + + fileCategory = TaskFileCategoryEnum.DRAFT.ToString(); + } var noExtensionFileName = Path.GetFileNameWithoutExtension(modifyFile.FileName); var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName, @@ -1290,7 +1302,7 @@ namespace Myshipping.Application #endregion #region 任务目的港未提货/任务目的港提货未返空 - if (info.Main.TaskType == TaskBaseTypeEnum.POD_DISCHARGE_FULL) + if (info.Main.TaskType == TaskBaseTypeEnum.POD_DISCHARGE_FULL || info.Main.TaskType == TaskBaseTypeEnum.POD_GATEOUT_FULL) { TaskPODDischargeGateoutFullInfo dischargeGateout = info.Main.PODDischargeGateoutFull.Adapt(); diff --git a/Myshipping.Core/Const/MenuConst.cs b/Myshipping.Core/Const/MenuConst.cs index 145a136c..5d3b5735 100644 --- a/Myshipping.Core/Const/MenuConst.cs +++ b/Myshipping.Core/Const/MenuConst.cs @@ -16,5 +16,10 @@ namespace Myshipping.Core.Const /// 我的任务台账 /// public const long MenuTaskManage = 375504048771141; + + /// + /// 马士基API订舱 + /// + public const long MenuMSKApi = 526643045195845; } } diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index c7412b4f..e7eb3e4d 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -842,6 +842,11 @@ 我的任务台账 + + + 马士基API订舱 + + 租户参数Code常量