diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs index 51dde6ce..9fd3f1c6 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs @@ -6,12 +6,14 @@ using Furion.FriendlyException; using Furion.JsonSerialization; using Furion.RemoteRequest.Extensions; using Mapster; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Myshipping.Application.Entity; using Myshipping.Core; using Myshipping.Core.Entity; using Myshipping.Core.Service; +using Org.BouncyCastle.Asn1.X9; using StackExchange.Profiling.Internal; using System; using System.Collections.Generic; @@ -283,6 +285,7 @@ namespace Myshipping.Application /// /// 比对回写详情 /// 返回回执 + [AllowAnonymous, HttpPost("/TaskShippingOrderCompare/AutoTaskShippingOrderCompareCallBack")] public async Task AutoTaskShippingOrderCompareCallBackAsync([FromBody] ShippingOrderCompareCallBackInfo model) { TaskManageExcuteResultDto result = new TaskManageExcuteResultDto(); @@ -306,6 +309,30 @@ namespace Myshipping.Application var bookingOrder = await _bookingOrderRepository.AsQueryable() .FirstAsync(a => a.Id == long.Parse(model.reqBusiId)); + + if (bookingOrder == null) + { + throw Oops.Oh($"订舱信息检索失败,ID={model.reqBusiId}"); + } + + bookingOrder.LstShipOrderCompareId = model.compareId; + bookingOrder.LstShipOrderCompareDate = model.compareDate; + bookingOrder.LstShipOrderCompareRlt = model.compareRltCode; + bookingOrder.LstShipOrderCompareRltName = model.compareRltName; + bookingOrder.LstShipOrderCompareMode = model.compareMode; + + //更新 + await _bookingOrderRepository.AsUpdateable(bookingOrder).UpdateColumns(it => new + { + it.LstShipOrderCompareId, + it.LstShipOrderCompareDate, + it.LstShipOrderCompareRlt, + it.LstShipOrderCompareRltName, + it.LstShipOrderCompareMode, + }).ExecuteCommandAsync(); + + result.succ = true; + result.msg = "更新完成"; } catch (Exception ex) {