diff --git a/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs b/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs index 439bc18f..ee2ddb53 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs @@ -972,5 +972,15 @@ namespace Myshipping.Application.Service.BookingOrder.Dto public BookingExtendState ExtendState { get; set; } + + /// + /// 最后格式单比对状态 NO_DIFF-无异常;DIFF-有差异; + /// + public string LstDraftCompareRlt { get; set; } + + /// + /// 最后格式单比对时间 + /// + public Nullable LstDraftCompareDate { get; set; } } } diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageExcuteResultDto.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageExcuteResultDto.cs index 8f74f1a8..6760c36a 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageExcuteResultDto.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageExcuteResultDto.cs @@ -170,4 +170,51 @@ namespace Myshipping.Application /// public bool IsPrimaryKey { get; set; } } + + + /// + /// + /// + public class TaskManageExcuteCommonResultDto + { + /// + /// 是否成功 true=成功 false=失败 + /// + public bool succ { get; set; } = false; + + /// + /// 状态 0-成功 + /// + public int status { get; set; } = 0; + + /// + /// 返回消息 + /// + public string msg { get; set; } + + /// + /// 总记录数 + /// + public int total { get; set; } + + /// + /// 当前页列表数据 + /// + public object rows { get; set; } + + /// + /// 扩展值 + /// + public object extra { get; set; } + + /// + /// 扩展值2 + /// + public object extra2 { get; set; } + + /// + /// 扩展值3 + /// + public object extra3 { get; set; } + } } diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskMessageInfoDto.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskMessageInfoDto.cs index 7d4c2320..bae10621 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskMessageInfoDto.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskMessageInfoDto.cs @@ -261,6 +261,11 @@ namespace Myshipping.Application /// 尺码 /// public Nullable CBM { get; set; } + + /// + /// 箱量 + /// + public int CtnNum { get; set; } } /// diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs index b0774a7c..3ceea975 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs @@ -149,7 +149,6 @@ namespace Myshipping.Application billNo = readModel.MasterBlNo; } - if(string.IsNullOrWhiteSpace(billNo)) { _logger.LogInformation("批次={no} 请求Draft文件解析未获取到有效提单号", batchNo); @@ -160,7 +159,7 @@ namespace Myshipping.Application var bookingOrder = _bookingOrderRepository.AsQueryable().Filter(null, true) .First(a => a.MBLNO.Equals(billNo)); - if (model == null) + if (bookingOrder == null) { _logger.LogInformation("批次={no} 提单号{billNo}无法获取业务信息", batchNo, billNo); @@ -206,6 +205,7 @@ namespace Myshipping.Application } msgModel.Main.BusinessInfo = mainInfo; + msgModel.Main.DraftInfo = readModel; //推送Draft比对 DateTime bCompareDate = DateTime.Now; @@ -285,10 +285,10 @@ namespace Myshipping.Application /// 请求类型 /// 返回回执 [NonAction] - private async Task ExcuteReadPDF(NameValueCollection nameValueCollection, dynamic fileInfo, + private async Task ExcuteReadPDF(NameValueCollection nameValueCollection, dynamic fileInfo, string contentType = "application/json") { - TaskManageExcuteResultDto model = null; + TaskManageExcuteCommonResultDto model = null; var result = string.Empty; using (var httpClient = new HttpClient()) @@ -332,7 +332,7 @@ namespace Myshipping.Application var response = httpClient.PostAsync(App.Configuration["DraftReadUrl"], reduceAttach).Result; result = response.Content.ReadAsStringAsync().Result; - model = JSON.Deserialize(result); + model = JSON.Deserialize(result); } } catch (Exception ex) diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageCompareMapper.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageCompareMapper.cs index bb031198..6713ddf5 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageCompareMapper.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageCompareMapper.cs @@ -47,7 +47,8 @@ namespace Myshipping.Application .Map(dest => dest.TareWeight, src => src.TAREWEIGHT) .Map(dest => dest.PKGs, src => src.PKGS) .Map(dest => dest.KGs, src => src.KGS) - .Map(dest => dest.CBM, src => src.CBM); + .Map(dest => dest.CBM, src => src.CBM) + .Map(dest => dest.CtnNum, src => src.CTNNUM); config.ForType() .Map(dest => dest.BookingNo, src => src.BOOKINGNO) diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index 202b9ad5..f46c9822 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -4870,9 +4870,9 @@ namespace Myshipping.Application if (taskInfo == null) throw Oops.Oh($"任务不存在"); - if(new string[] { TaskStatusEnum.Complete.ToString(), TaskStatusEnum.Pending.ToString(),TaskStatusEnum.Pending.ToString() } + if(new string[] { TaskStatusEnum.Pending.ToString(),TaskStatusEnum.Cancel.ToString() } .Contains(taskInfo.STATUS)) - throw Oops.Oh($"任务状态是已完成/已挂起/已取消的不能撤销"); + throw Oops.Oh($"任务状态是已挂起/已取消的不能撤销"); var truckInfo = _taskTruckInfoRepository.AsQueryable().First(a => a.TASK_ID == taskInfo.PK_ID);