|
|
@ -97,6 +97,13 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
list = queryList.Select(a => a.Pol.Adapt<TaskPOLContainerNotPickUpShowDto>()).ToList();
|
|
|
|
list = queryList.Select(a => a.Pol.Adapt<TaskPOLContainerNotPickUpShowDto>()).ToList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<long> noList = new List<long>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 2000; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
noList.Add(SnowFlakeSingle.Instance.NextId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return DataResult<List<TaskPOLContainerNotPickUpShowDto>>.Success(list);
|
|
|
|
return DataResult<List<TaskPOLContainerNotPickUpShowDto>>.Success(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
@ -109,7 +116,13 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
public async Task<DataResult<SeaExportOrderExtension>> SearchAndMarkBookingOrder(long taskPKId)
|
|
|
|
public async Task<DataResult<SeaExportOrderExtension>> SearchAndMarkBookingOrder(long taskPKId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entity = tenantDb.Queryable<TaskPolContainerNotPickup>().Filter(null, true).First(a => a.TASK_ID == taskPKId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await _seaExportService.SearchOrderInfo(entity.MBL_NO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
@ -121,6 +134,10 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
public async Task<DataResult> SendEmailToCustomer(long taskPKId)
|
|
|
|
public async Task<DataResult> SendEmailToCustomer(long taskPKId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//先匹配订单记录(这里可能关联的是拆票或者合票订单,如果是拆票需要所有拆票记录都要发邮件通知)
|
|
|
|
|
|
|
|
var searchInfo = SearchAndMarkBookingOrder(taskPKId).GetAwaiter().GetResult().Data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//BusinessTaskMail? mailConfig = null;
|
|
|
|
//BusinessTaskMail? mailConfig = null;
|
|
|
|
//if (context.AdditionalData.TryGetValue(nameof(BusinessTaskMail) + "." + nameof(BusinessTaskMail.Id), out var id))
|
|
|
|
//if (context.AdditionalData.TryGetValue(nameof(BusinessTaskMail) + "." + nameof(BusinessTaskMail.Id), out var id))
|
|
|
|
//{
|
|
|
|
//{
|
|
|
@ -147,8 +164,38 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
// //return;
|
|
|
|
// //return;
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var model = new MailTemplateModel<TaskPOLContainerNotPickUpShowDto>(order)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// BusinessId = context.TaskInfo.BusinessId,
|
|
|
|
|
|
|
|
// BusinessType = context.TaskInfo.BusinessType,
|
|
|
|
|
|
|
|
//};
|
|
|
|
|
|
|
|
//MailService mailService = new MailService(context.ServiceProvider);
|
|
|
|
|
|
|
|
//var result3 = await mailService.SendAsync(mailConfig, model);
|
|
|
|
|
|
|
|
//if (!result3.Succeeded)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// await LogService.WriteLogAsync(context.TaskInfo, result.Message);
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//await SetTaskCompleteAsync(context.TaskInfo,
|
|
|
|
|
|
|
|
// context.ServiceProvider.GetRequiredService<ITaskService>(), LogService);
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 发送邮件通知给客户(任务自动机调取)
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 发送邮件通知给客户(任务自动机调取)
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="dataContext">数据上下文</param>
|
|
|
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
|
|
|
public async Task<DataResult> SendEmailToCustomerTask(TaskFlowDataContext dataContext)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var taskPKId = dataContext.Get<Nullable<long>>(TaskFlowDataNameConst.TaskPKId) ?? throw new ArgumentException($"缺少参数:{nameof(TaskFlowDataNameConst.TaskPKId)}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await SendEmailToCustomer(taskPKId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|