From 9d8e412d19e26e3d5321997e9cc6a802771e5466 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 12 Jun 2023 18:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E8=B4=A7=E7=BA=B8?= =?UTF-8?q?=E6=AF=94=E5=AF=B9=E5=9B=9E=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskShippingOrderCompareService.cs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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) {