修改下货纸比对回写

optimize
jianghaiqing 1 year ago
parent 45b6ac0a56
commit 9d8e412d19

@ -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
/// </summary>
/// <param name="model">比对回写详情</param>
/// <returns>返回回执</returns>
[AllowAnonymous, HttpPost("/TaskShippingOrderCompare/AutoTaskShippingOrderCompareCallBack")]
public async Task<TaskManageExcuteResultDto> 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)
{

Loading…
Cancel
Save