|
|
|
@ -42,6 +42,9 @@ using DS.Module.Core.Data;
|
|
|
|
|
using LanguageExt.Common;
|
|
|
|
|
using DS.WMS.Core.Op.Method.TaskInteraction;
|
|
|
|
|
using DS.WMS.Core.Op.Entity.TaskInteraction;
|
|
|
|
|
using DS.WMS.Core.Op.Interface.TaskInteraction;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
{
|
|
|
|
@ -53,19 +56,18 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
private readonly ITaskLogService _logService;
|
|
|
|
|
private readonly ITaskMailService _taskMailService;
|
|
|
|
|
|
|
|
|
|
public TaskPOLContainerNotPickUpService(IUser user,
|
|
|
|
|
ILogger<TaskPOLContainerNotPickUpService> logger,
|
|
|
|
|
public TaskPOLContainerNotPickUpService(IUser user,ILogger<TaskPOLContainerNotPickUpService> logger,
|
|
|
|
|
ISaasDbService saasDbService,
|
|
|
|
|
IServiceProvider serviceProvider,
|
|
|
|
|
IWebHostEnvironment environment) : base(user, logger, saasDbService, serviceProvider, environment)
|
|
|
|
|
{
|
|
|
|
|
_serviceProvider = serviceProvider;
|
|
|
|
|
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
|
|
|
|
user = _serviceProvider.GetRequiredService<IUser>();
|
|
|
|
|
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
|
|
|
|
_seaExportService = _serviceProvider.GetRequiredService<ISeaExportService>();
|
|
|
|
|
_configService = _serviceProvider.GetRequiredService<IConfigService>();
|
|
|
|
|
_userService = _serviceProvider.GetRequiredService<IUserService>();
|
|
|
|
|
//_serviceProvider = serviceProvider;
|
|
|
|
|
//db = serviceProvider.GetRequiredService<ISqlSugarClient>();
|
|
|
|
|
user = serviceProvider.GetRequiredService<IUser>();
|
|
|
|
|
//saasService = serviceProvider.GetRequiredService<ISaasDbService>();
|
|
|
|
|
_seaExportService = serviceProvider.GetRequiredService<ISeaExportService>();
|
|
|
|
|
_configService = serviceProvider.GetRequiredService<IConfigService>();
|
|
|
|
|
_userService = serviceProvider.GetRequiredService<IUserService>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 通过任务主键获取起运港未提箱详情
|
|
|
|
@ -141,14 +143,14 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
BusinessId = taskPKId,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
AutoCreateNext = true,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.POL_CTN_NOT_PICKUP.GetDescription(),
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.POL_CTN_NOT_PICKUP.ToString(),
|
|
|
|
|
|
|
|
|
|
}, $"未能根据任务配置值获取邮件模板设置");
|
|
|
|
|
|
|
|
|
|
return DataResult.Failed("未能根据任务配置值获取邮件模板设置");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
var entity = tenantDb.Queryable<TaskPolContainerNotPickup>().Filter(null, true).First(a => a.TASK_ID == taskPKId);
|
|
|
|
|
|
|
|
|
@ -162,7 +164,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
MailService mailService = new MailService(_serviceProvider);
|
|
|
|
|
MailService mailService = new MailService(serviceProvider);
|
|
|
|
|
var result = await mailService.SendAsync(mailConfig, model);
|
|
|
|
|
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
@ -172,7 +174,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
BusinessId = taskPKId,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
AutoCreateNext = true,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.POL_CTN_NOT_PICKUP.GetDescription(),
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.POL_CTN_NOT_PICKUP.ToString(),
|
|
|
|
|
|
|
|
|
|
}, result.Message);
|
|
|
|
|
|
|
|
|
@ -203,7 +205,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
BusinessId = taskPKId,
|
|
|
|
|
BusinessType = BusinessType.OceanShippingExport,
|
|
|
|
|
AutoCreateNext = true,
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.POL_CTN_NOT_PICKUP.GetDescription(),
|
|
|
|
|
TaskTypeName = TaskBaseTypeEnum.POL_CTN_NOT_PICKUP.ToString(),
|
|
|
|
|
|
|
|
|
|
}, $"缺少参数:{nameof(BusinessTaskMail)}.{nameof(BusinessTaskMail.Id)}");
|
|
|
|
|
|
|
|
|
|