|
|
@ -1,4 +1,5 @@
|
|
|
|
using Furion;
|
|
|
|
using Furion;
|
|
|
|
|
|
|
|
using Furion.DependencyInjection;
|
|
|
|
using Furion.DynamicApiController;
|
|
|
|
using Furion.DynamicApiController;
|
|
|
|
using Furion.FriendlyException;
|
|
|
|
using Furion.FriendlyException;
|
|
|
|
using Furion.JsonSerialization;
|
|
|
|
using Furion.JsonSerialization;
|
|
|
@ -32,7 +33,7 @@ namespace Myshipping.Application
|
|
|
|
/// 任务目的港未提货未返箱
|
|
|
|
/// 任务目的港未提货未返箱
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
[ApiDescriptionSettings("Application", Name = "PODDischargeGateoutFull", Order = 10)]
|
|
|
|
[ApiDescriptionSettings("Application", Name = "PODDischargeGateoutFull", Order = 10)]
|
|
|
|
public class TaskManagePODDischargeGateoutFullService: ITaskManagePODDischargeGateoutFullService, IDynamicApiController
|
|
|
|
public class TaskManagePODDischargeGateoutFullService: ITaskManagePODDischargeGateoutFullService, IDynamicApiController, ITransient
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullInfo> _taskPODDischargeGateoutFullInfoRep;
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullInfo> _taskPODDischargeGateoutFullInfoRep;
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullDetailInfo> _taskPODDischargeGateoutFullDetailInfoRep;
|
|
|
|
private readonly SqlSugarRepository<TaskPODDischargeGateoutFullDetailInfo> _taskPODDischargeGateoutFullDetailInfoRep;
|
|
|
@ -521,7 +522,12 @@ namespace Myshipping.Application
|
|
|
|
if (opEmailList.Count > 0)
|
|
|
|
if (opEmailList.Count > 0)
|
|
|
|
opEmail = string.Join(";", opEmailList.Distinct().ToArray());
|
|
|
|
opEmail = string.Join(";", opEmailList.Distinct().ToArray());
|
|
|
|
|
|
|
|
|
|
|
|
string emailTitle = $"{model.MBL_NO}-/ 目的港未提箱";
|
|
|
|
string emailTitle = $"{model.MBL_NO}-/ 卸船未提货";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(model.NOTICE_TYPE == "GATEOUT_FULL")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
emailTitle = $"{model.MBL_NO}-/ 提箱未返空箱";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//提取当前公共邮箱的配置
|
|
|
|
//提取当前公共邮箱的配置
|
|
|
|
DjyUserMailAccount publicMailAccount = _djyUserMailAccount.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ShowName == "PublicSend"
|
|
|
|
DjyUserMailAccount publicMailAccount = _djyUserMailAccount.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ShowName == "PublicSend"
|
|
|
@ -765,5 +771,43 @@ namespace Myshipping.Application
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 自动转发目的港未提货未返箱
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 自动转发目的港未提货未返箱
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="taskPKId">目的港未提货未返箱任务主键</param>
|
|
|
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
|
|
|
[HttpGet("/PODDischargeGateoutFull/AutoTransferNotice")]
|
|
|
|
|
|
|
|
public async Task<TaskManageOrderResultDto> AutoTransferNotice(string taskPKId)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryRlt = QueryBookingOrder(taskPKId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 检索对应的订舱记录完成,结果:{JSON.Serialize(queryRlt)}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//_logger.LogInformation($"taskPKId={taskPKId} 当前租户未开启货物运输计划已变更是否同批次同客户合并邮件通知,按照单票推送邮件处理");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果没有配置批量,则按单票发送邮件
|
|
|
|
|
|
|
|
var rlt = SendEmailToCustomer(taskPKId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 推送邮件完成,结果:{JSON.Serialize(rlt)}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result.succ = false;
|
|
|
|
|
|
|
|
result.msg = $"自动转发目的港未提货未返箱失败,原因:{ex.Message}";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"taskPKId={taskPKId} 自动转发目的港未提货未返箱失败,原因:{ex.Message}");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|