From 9dfe5558a4c7344131d06f3d90b29b52a098313c Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Sun, 23 Apr 2023 19:13:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BE=E8=BD=A6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=9B=9E=E5=86=99=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingTruck/BookingTruckService.cs | 4 +--- .../BookingTruck/Dtos/BookingTruckDto.cs | 5 +++++ .../TaskManagePlat/TaskManageTruckService.cs | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs b/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs index e6f13f4d..4c7cdd2e 100644 --- a/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs +++ b/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs @@ -187,7 +187,6 @@ namespace Myshipping.Application entity.UpdatedUserId = UserManager.UserId; entity.UpdatedUserName = UserManager.Name; - await _bookingTruckRepository.AsUpdateable(entity).IgnoreColumns(it => new { it.TenantId, @@ -208,12 +207,11 @@ namespace Myshipping.Application { ValidateTruck(OperateTypeEnum.DispatchBackSave, new BookingTruck[] { model }); - entity.Status = BookingTruckStatus.SEND_DISPATCH.ToString(); - entity.UpdatedTime = DateTime.Now; entity.UpdatedUserId = UserManager.UserId; entity.UpdatedUserName = UserManager.Name; + entity.Status = info.CallBackStatus; await _bookingTruckRepository.AsUpdateable(entity).IgnoreColumns(it => new { diff --git a/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckDto.cs b/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckDto.cs index cdcb1f1b..cdc6d8a5 100644 --- a/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckDto.cs +++ b/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckDto.cs @@ -182,6 +182,11 @@ namespace Myshipping.Application /// public string FactoryAddr { get; set; } + /// + /// 回写状态 + /// + public string CallBackStatus { get; set; } + /// /// 集装箱列表 /// diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs index 5e55ceaf..cf4bbff6 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs @@ -885,6 +885,8 @@ namespace Myshipping.Application var truckCtnList =_taskTruckContaRepository.AsQueryable().Where(a => a.P_ID == info.PK_ID).ToList(); BookingTruckDto model = info.Adapt(); + model.CallBackStatus = info.Status; + if (truckCtnList.Count > 0) model.ContaList = truckCtnList.Adapt>(); @@ -968,8 +970,24 @@ namespace Myshipping.Application it.TruckCode, }).ExecuteCommandAsync(); + var truckCtnList = _taskTruckContaRepository.AsQueryable().Where(a => a.P_ID == info.PK_ID).ToList(); + BookingTruckDto model = info.Adapt(); + + model.CallBackStatus = info.Status; + + if (truckCtnList.Count > 0) + model.ContaList = truckCtnList.Adapt>(); + + if (info.BookingTruckId.HasValue) + model.Id = info.BookingTruckId.Value; + + //更新完回写订舱的派车信息 + var service = _namedServiceProvider.GetService(nameof(BookingTruckService)); + var rlt = await service.TruckDispatchCompleteCallBack(model); + result.succ = true; result.msg = "取消成功"; + result.ext = rlt; } catch (Exception ex) {