|
|
|
@ -52,6 +52,7 @@ using DS.Module.Core.Data;
|
|
|
|
|
using DS.WMS.Core.TaskPlat.Dtos;
|
|
|
|
|
using NPOI.XSSF.UserModel;
|
|
|
|
|
using AngleSharp.Dom;
|
|
|
|
|
using DS.WMS.Core.TaskPlat.Entity;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
@ -819,15 +820,18 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
/// </summary>
|
|
|
|
|
public async Task<DataResult<BookingSlotBase?>> ApiReceiveTask(TaskFlowDataContext dataContext)
|
|
|
|
|
{
|
|
|
|
|
//var a = user.UserId;
|
|
|
|
|
//var b = user.UserName;
|
|
|
|
|
//var c = user.TenantId;
|
|
|
|
|
var messageInfo = dataContext.Get<TaskManageOrderMessageInfo>(TaskFlowDataNameConst.TaskManageOrderMessageInfo);
|
|
|
|
|
if (messageInfo == null)
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentNullException($"缺少参数:{TaskFlowDataNameConst.TaskManageOrderMessageInfo}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var taskBcId = dataContext.Get<long?>(TaskFlowDataNameConst.TaskBCId);
|
|
|
|
|
if (taskBcId == null)
|
|
|
|
|
{
|
|
|
|
|
Logger.Log(NLog.LogLevel.Info, $"执行ApiReceiveTask时,未获取到{TaskFlowDataNameConst.TaskBCId}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DynameFileInfo bcFileInfo = null;
|
|
|
|
|
DynameFileInfo bcNoticeFileInfo = null;
|
|
|
|
|
|
|
|
|
@ -932,6 +936,20 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
var rlt = await InnerApiReceive(slotModel, bcFileInfo, bcNoticeFileInfo);
|
|
|
|
|
|
|
|
|
|
// 回写舱位主键到BC任务
|
|
|
|
|
if (rlt.Succeeded && rlt.Data != null && taskBcId != null)
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
var taskBcInfo = await tenantDb.Queryable<TaskBCInfo>().Where(x => x.Id == taskBcId).FirstAsync();
|
|
|
|
|
if (taskBcInfo != null && taskBcInfo.BOOKING_SLOT_ID == null)
|
|
|
|
|
{
|
|
|
|
|
taskBcInfo.BOOKING_SLOT_ID = rlt.Data.Id;
|
|
|
|
|
await tenantDb.Updateable<TaskBCInfo>(taskBcInfo).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
x.BOOKING_SLOT_ID
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return rlt;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
@ -1468,7 +1486,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
/// <param name="fileTypeName">附件类型名称</param>
|
|
|
|
|
/// <param name="moudle">附件模块代码</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private async Task<DataResult<string>> SaveEDIFile(long boookId, string FilePath, string fileName, long tenantId,int fileSize,
|
|
|
|
|
private async Task<DataResult<string>> SaveEDIFile(long boookId, string FilePath, string fileName, long tenantId, int fileSize,
|
|
|
|
|
string fileTypeCode = "bc", string fileTypeName = "Booking Confirmation", string moudle = "BookingSlot")
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
@ -2414,6 +2432,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
Logger.Log(NLog.LogLevel.Info, "根据舱位生成订舱,开始调用Save保存订舱");
|
|
|
|
|
|
|
|
|
|
var bkRlt = await _seaExportService.EditSeaExport(bkModel);
|
|
|
|
|
if (bkRlt.Data == null)
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("根据舱位生成订舱后,订舱主键为空,messsage:" + bkRlt.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Logger.Log(NLog.LogLevel.Info, $"根据舱位生成订舱,调用Save保存订舱完成,id:{bkRlt.Data}");
|
|
|
|
|
|
|
|
|
@ -3596,7 +3618,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
Logger.Log(NLog.LogLevel.Info, $"批次={batchNo} 开始查询台账");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//序列化查询条件
|
|
|
|
@ -4163,7 +4185,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
orderInfo = orderRlt.Data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(orderInfo == null)
|
|
|
|
|
if (orderInfo == null)
|
|
|
|
|
{
|
|
|
|
|
//海运出口详情获取失败,已作废或数据不存在
|
|
|
|
|
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SeaExportInfoNotExists)));
|
|
|
|
|