修改所有自动转发,增加默认抄送邮件给操作,通过判断租户参数

master
jianghaiqing 4 months ago
parent 11294c8fea
commit 33027d7668

@ -49,6 +49,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<SysUser> _sysUserRepository; private readonly SqlSugarRepository<SysUser> _sysUserRepository;
private readonly SqlSugarRepository<BookingPrintTemplate> _repPrintTemplate; private readonly SqlSugarRepository<BookingPrintTemplate> _repPrintTemplate;
private readonly SqlSugarRepository<TaskFileInfo> _taskFileRepository; private readonly SqlSugarRepository<TaskFileInfo> _taskFileRepository;
private readonly IDjyTenantParamService _djyTenantParamService;
public RouteChangeAdvisoryService(ISysCacheService cache, ILogger<TaskCautionNoticeService> logger, public RouteChangeAdvisoryService(ISysCacheService cache, ILogger<TaskCautionNoticeService> logger,
SqlSugarRepository<TaskBaseInfo> taskBaseRepository, SqlSugarRepository<TaskBaseInfo> taskBaseRepository,
@ -59,7 +60,7 @@ namespace Myshipping.Application
SqlSugarRepository<SysUser> sysUserRepository, SqlSugarRepository<SysUser> sysUserRepository,
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingPrintTemplate> repPrintTemplate,
SqlSugarRepository<TaskFileInfo> taskFileRepository, SqlSugarRepository<TaskFileInfo> taskFileRepository,
SqlSugarRepository<BookingOrder> bookingOrderRepository) SqlSugarRepository<BookingOrder> bookingOrderRepository, IDjyTenantParamService djyTenantParamService)
{ {
_cache = cache; _cache = cache;
_logger = logger; _logger = logger;
@ -74,6 +75,7 @@ namespace Myshipping.Application
_repPrintTemplate = repPrintTemplate; _repPrintTemplate = repPrintTemplate;
_taskFileRepository = taskFileRepository; _taskFileRepository = taskFileRepository;
_djyTenantParamService = djyTenantParamService;
} }
#region 获取船舶相关截止时间的通知详情 #region 获取船舶相关截止时间的通知详情
@ -558,6 +560,14 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
//如果配置了租户参数AUTO_TRANS_EMAIL_OP_CCTO-自动转发是否默认抄送操作=ENABLE发送邮件时自动抄送操作
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");
TaskFileInfo fileInfo = null; TaskFileInfo fileInfo = null;

@ -1905,6 +1905,7 @@ namespace Myshipping.Application
filePath = Path.Combine(dirAbs, fileInfo.FILE_PATH); filePath = Path.Combine(dirAbs, fileInfo.FILE_PATH);
EmailApiUserDefinedDto emailApiUserDefinedDto = new EmailApiUserDefinedDto EmailApiUserDefinedDto emailApiUserDefinedDto = new EmailApiUserDefinedDto
{ {
SendTo = toEmail, SendTo = toEmail,
@ -1919,6 +1920,15 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
//如果配置了租户参数AUTO_TRANS_EMAIL_OP_CCTO-自动转发是否默认抄送操作=ENABLE发送邮件时自动抄送操作
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");

@ -56,7 +56,7 @@ namespace Myshipping.Application
private readonly INamedServiceProvider<IBookingOrderService> _namedBookingOrderServiceProvider; private readonly INamedServiceProvider<IBookingOrderService> _namedBookingOrderServiceProvider;
private readonly SqlSugarRepository<BookingSlotBase> _bookingSlotBaseRepository; private readonly SqlSugarRepository<BookingSlotBase> _bookingSlotBaseRepository;
private readonly INamedServiceProvider<ITaskCautionNoticeService> _namedTaskCautionNoticeServiceProvider; private readonly INamedServiceProvider<ITaskCautionNoticeService> _namedTaskCautionNoticeServiceProvider;
private readonly IDjyTenantParamService _djyTenantParamService;
public TaskManageCutDateChangeService(SqlSugarRepository<TaskCutDateChangeInfo> taskCutDateChangeInfoRepository, public TaskManageCutDateChangeService(SqlSugarRepository<TaskCutDateChangeInfo> taskCutDateChangeInfoRepository,
SqlSugarRepository<TaskCutDateChangeDetailInfo> taskCutDateChangeDetailInfoRepository, SqlSugarRepository<TaskCutDateChangeDetailInfo> taskCutDateChangeDetailInfoRepository,
@ -70,7 +70,7 @@ namespace Myshipping.Application
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider, INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
INamedServiceProvider<ITaskCautionNoticeService> namedTaskCautionNoticeServiceProvider, INamedServiceProvider<ITaskCautionNoticeService> namedTaskCautionNoticeServiceProvider,
SqlSugarRepository<BookingSlotBase> bookingSlotBaseRepository, SqlSugarRepository<BookingSlotBase> bookingSlotBaseRepository,
SqlSugarRepository<BookingOrder> bookingOrderRepository) SqlSugarRepository<BookingOrder> bookingOrderRepository, IDjyTenantParamService djyTenantParamService)
{ {
_taskCutDateChangeInfoRepository = taskCutDateChangeInfoRepository; _taskCutDateChangeInfoRepository = taskCutDateChangeInfoRepository;
_taskCutDateChangeDetailInfoRepository = taskCutDateChangeDetailInfoRepository; _taskCutDateChangeDetailInfoRepository = taskCutDateChangeDetailInfoRepository;
@ -83,6 +83,7 @@ namespace Myshipping.Application
_namedBookingOrderServiceProvider = namedBookingOrderServiceProvider; _namedBookingOrderServiceProvider = namedBookingOrderServiceProvider;
_bookingSlotBaseRepository = bookingSlotBaseRepository; _bookingSlotBaseRepository = bookingSlotBaseRepository;
_namedTaskCautionNoticeServiceProvider = namedTaskCautionNoticeServiceProvider; _namedTaskCautionNoticeServiceProvider = namedTaskCautionNoticeServiceProvider;
_djyTenantParamService = djyTenantParamService;
_logger = logger; _logger = logger;
_cache = cache; _cache = cache;
@ -645,6 +646,14 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
//如果配置了租户参数AUTO_TRANS_EMAIL_OP_CCTO-自动转发是否默认抄送操作=ENABLE发送邮件时自动抄送操作
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");
//推送邮件 //推送邮件

@ -40,6 +40,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingOrder> _bookingOrderRepository; private readonly SqlSugarRepository<BookingOrder> _bookingOrderRepository;
private readonly SqlSugarRepository<SysUser> _sysUserRepository; private readonly SqlSugarRepository<SysUser> _sysUserRepository;
private readonly IDjyCustomerService _djyCustomerService; private readonly IDjyCustomerService _djyCustomerService;
private readonly IDjyTenantParamService _djyTenantParamService;
public TaskManageDRAFTService(SqlSugarRepository<TaskBaseInfo> taskBaseRepository, public TaskManageDRAFTService(SqlSugarRepository<TaskBaseInfo> taskBaseRepository,
SqlSugarRepository<TaskFileInfo> taskFileRepository, SqlSugarRepository<TaskFileInfo> taskFileRepository,
@ -50,7 +51,8 @@ namespace Myshipping.Application
SqlSugarRepository<SysUser> sysUserRepository, SqlSugarRepository<SysUser> sysUserRepository,
IDjyCustomerService djyCustomerService, IDjyCustomerService djyCustomerService,
ISysCacheService cache, ISysCacheService cache,
ILogger<TaskManageDRAFTService> logger) ILogger<TaskManageDRAFTService> logger,
IDjyTenantParamService djyTenantParamService)
{ {
_taskBaseRepository = taskBaseRepository; _taskBaseRepository = taskBaseRepository;
_taskFileRepository = taskFileRepository; _taskFileRepository = taskFileRepository;
@ -64,6 +66,7 @@ namespace Myshipping.Application
_logger = logger; _logger = logger;
_cache = cache; _cache = cache;
_djyTenantParamService = djyTenantParamService;
} }
#region 获取DRAFT详情 #region 获取DRAFT详情
@ -379,6 +382,15 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
//如果配置了租户参数AUTO_TRANS_EMAIL_OP_CCTO-自动转发是否默认抄送操作=ENABLE发送邮件时自动抄送操作
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");

@ -45,6 +45,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<SysUser> _sysUserRepository; private readonly SqlSugarRepository<SysUser> _sysUserRepository;
private readonly SqlSugarRepository<BookingPrintTemplate> _repPrintTemplate; private readonly SqlSugarRepository<BookingPrintTemplate> _repPrintTemplate;
private readonly ISysCacheService _cache; private readonly ISysCacheService _cache;
private readonly IDjyTenantParamService _djyTenantParamService;
public TaskManagePODDischargeGateoutFullService(ILogger<TaskManagePODDischargeGateoutFullService> logger, public TaskManagePODDischargeGateoutFullService(ILogger<TaskManagePODDischargeGateoutFullService> logger,
SqlSugarRepository<TaskPODDischargeGateoutFullInfo> taskPODDischargeGateoutFullInfoRep, SqlSugarRepository<TaskPODDischargeGateoutFullInfo> taskPODDischargeGateoutFullInfoRep,
@ -55,7 +56,8 @@ namespace Myshipping.Application
SqlSugarRepository<SysUser> sysUserRepository, SqlSugarRepository<SysUser> sysUserRepository,
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingPrintTemplate> repPrintTemplate,
ISysCacheService cache, ISysCacheService cache,
SqlSugarRepository<BookingOrder> bookingOrderRepository) SqlSugarRepository<BookingOrder> bookingOrderRepository,
IDjyTenantParamService djyTenantParamService)
{ {
_taskPODDischargeGateoutFullInfoRep = taskPODDischargeGateoutFullInfoRep; _taskPODDischargeGateoutFullInfoRep = taskPODDischargeGateoutFullInfoRep;
_taskBaseRepository = taskBaseRepository; _taskBaseRepository = taskBaseRepository;
@ -67,6 +69,7 @@ namespace Myshipping.Application
_sysUserRepository = sysUserRepository; _sysUserRepository = sysUserRepository;
_repPrintTemplate = repPrintTemplate; _repPrintTemplate = repPrintTemplate;
_cache = cache; _cache = cache;
_djyTenantParamService = djyTenantParamService;
} }
#region 获取目的港未提货未返箱详情 #region 获取目的港未提货未返箱详情
@ -571,6 +574,15 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
//如果配置了租户参数AUTO_TRANS_EMAIL_OP_CCTO-自动转发是否默认抄送操作=ENABLE发送邮件时自动抄送操作
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");
//推送邮件 //推送邮件

@ -53,6 +53,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<SysUser> _sysUserRepository; private readonly SqlSugarRepository<SysUser> _sysUserRepository;
private readonly SqlSugarRepository<DjyUserMailAccount> _djyUserMailAccount; private readonly SqlSugarRepository<DjyUserMailAccount> _djyUserMailAccount;
private readonly SqlSugarRepository<BookingOrderContact> _bookingOrderContactRepository; private readonly SqlSugarRepository<BookingOrderContact> _bookingOrderContactRepository;
private readonly IDjyTenantParamService _djyTenantParamService;
private readonly INamedServiceProvider<ITaskManageShareLinkService> _namedServiceProvider; private readonly INamedServiceProvider<ITaskManageShareLinkService> _namedServiceProvider;
@ -68,7 +69,8 @@ namespace Myshipping.Application
SqlSugarRepository<DjyUserMailAccount> djyUserMailAccount, SqlSugarRepository<DjyUserMailAccount> djyUserMailAccount,
SqlSugarRepository<BookingOrderContact> bookingOrderContactRepository, SqlSugarRepository<BookingOrderContact> bookingOrderContactRepository,
INamedServiceProvider<ITaskManageShareLinkService> namedServiceProvider, INamedServiceProvider<ITaskManageShareLinkService> namedServiceProvider,
SqlSugarRepository<BookingCtn> bookingCtnRepository, ISysCacheService cache, ILogger<TaskManageRollingNominationService> logger) SqlSugarRepository<BookingCtn> bookingCtnRepository, ISysCacheService cache, ILogger<TaskManageRollingNominationService> logger,
IDjyTenantParamService djyTenantParamService)
{ {
_taskBaseRepository = taskBaseRepository; _taskBaseRepository = taskBaseRepository;
_taskRollingNominationInfoRepository = taskRollingNominationInfoRepository; _taskRollingNominationInfoRepository = taskRollingNominationInfoRepository;
@ -84,6 +86,7 @@ namespace Myshipping.Application
_bookingOrderContactRepository = bookingOrderContactRepository; _bookingOrderContactRepository = bookingOrderContactRepository;
_namedServiceProvider = namedServiceProvider; _namedServiceProvider = namedServiceProvider;
_djyTenantParamService = djyTenantParamService;
_cache = cache; _cache = cache;
_logger = logger; _logger = logger;
@ -1679,6 +1682,15 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
//如果配置了租户参数AUTO_TRANS_EMAIL_OP_CCTO-自动转发是否默认抄送操作=ENABLE发送邮件时自动抄送操作
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");
string filePath = string.Empty; string filePath = string.Empty;

@ -414,6 +414,14 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");
//推送邮件 //推送邮件

@ -672,6 +672,14 @@ namespace Myshipping.Application
Attaches = new List<AttachesInfo>() Attaches = new List<AttachesInfo>()
}; };
DjyTenantParamValueOutput paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "AUTO_TRANS_EMAIL_OP_CCTO" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
emailApiUserDefinedDto.CCTo = opEmail;
}
_logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}"); _logger.LogInformation($"生成请求邮件参数,结果:{JSON.Serialize(emailApiUserDefinedDto)}");
//推送邮件 //推送邮件

Loading…
Cancel
Save