修改马士基API的批量复制和批量发送功能

master
jianghaiqing 8 months ago
parent c97b247aed
commit 25d59e3f1e

@ -478,22 +478,8 @@ namespace Myshipping.Application.Service.BookingOrder
var jsonBody = Newtonsoft.Json.JsonConvert.SerializeObject(bookingDto); var jsonBody = Newtonsoft.Json.JsonConvert.SerializeObject(bookingDto);
#if DEBUG var rlt = await sendUrl.SetBody(jsonBody)
//测试用造假数据
var rlt = JSON.Serialize(new MSKAPIBookingResultDto
{
code = 200,
data = new MSKAPIBookingResultDataDto
{
bookingReference = DateTime.Now.ToString("yyyyMMddHHmmssfffff"),
requestAcknowledgementId = Guid.NewGuid().ToString(),
}
});
#else
var rlt = await sendUrl.SetBody(jsonBody)
.PostAsStringAsync(); .PostAsStringAsync();
#endif
_logger.LogInformation($"开始请求MSK API订舱返回结果 JSON={JSON.Serialize(rlt)}"); _logger.LogInformation($"开始请求MSK API订舱返回结果 JSON={JSON.Serialize(rlt)}");
@ -1396,13 +1382,14 @@ var rlt = await sendUrl.SetBody(jsonBody)
var model = GetInfo(entity.Id).GetAwaiter().GetResult(); var model = GetInfo(entity.Id).GetAwaiter().GetResult();
result = InnerSendMSKBooking(model, entity.Id, false).GetAwaiter().GetResult(); result = InnerSendMSKBooking(model, entity.Id, false).GetAwaiter().GetResult();
if (result.succ)
return string.Empty;
} }
catch (Exception ex) catch (Exception ex)
{ {
msgList.Add(ex.Message); msgList.Add(ex.Message);
} }
return string.Empty;
} }
return string.Join("#", msgList.ToArray()); return string.Join("#", msgList.ToArray());
@ -1477,7 +1464,7 @@ var rlt = await sendUrl.SetBody(jsonBody)
}); });
} }
entity = model.Adapt<BookingDeliveryRecord>(); entity = model.bookingDto.Adapt<BookingDeliveryRecord>();
entity.CreatedTime = nowDate; entity.CreatedTime = nowDate;
entity.UpdatedTime = nowDate; entity.UpdatedTime = nowDate;

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 马士基API批量复制
/// </summary>
public class MSKAPIBookingCopyDto
{
/// <summary>
/// 被复制马士基API订舱主键
/// </summary>
public long originalId { get; set; }
/// <summary>
/// 操作类型 only_copy-只单票复制copy_edit-复制使用提交的编辑信息
/// </summary>
public string opType { get; set; }
/// <summary>
/// 编辑详情(弹出编辑框后修改的详情内容)
/// </summary>
public MSKBookingDto bookingDto { get; set; }
/// <summary>
/// 复制数量
/// </summary>
public int copyNum { get; set; } = 1;
}
}

@ -2039,6 +2039,16 @@
等级 等级
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.DjyCustomer.CustSysId">
<summary>
客户端系统ID
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyCustomer.DjyGid">
<summary>
大简云GID
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyCustomerAddr"> <member name="T:Myshipping.Core.Entity.DjyCustomerAddr">
<summary> <summary>
客户地址 客户地址
@ -2124,6 +2134,16 @@
备注 备注
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.DjyCustomerContact.CustSysId">
<summary>
客户端系统ID
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyCustomerContact.DjyGid">
<summary>
大简云GID
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyDingtalkGroupConfig"> <member name="T:Myshipping.Core.Entity.DjyDingtalkGroupConfig">
<summary> <summary>
钉钉客服通知群配置 钉钉客服通知群配置

@ -423,6 +423,7 @@ public class SyncHisRecord: ISyncHisRecord,ITransient
} }
} }

Loading…
Cancel
Save