diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskCautionNoticeDetailInfo.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskCautionNoticeDetailInfo.cs
new file mode 100644
index 00000000..128382f9
--- /dev/null
+++ b/Myshipping.Application/Entity/TaskManagePlat/TaskCautionNoticeDetailInfo.cs
@@ -0,0 +1,64 @@
+using Myshipping.Application.Entity;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Myshipping.Application
+{
+ ///
+ /// 重要任务提醒明细
+ ///
+ [SugarTable("task_caution_notice_detail")]
+ [Description("重要任务提醒明细")]
+ public class TaskCautionNoticeDetailInfo : TaskManageDbEntity
+ {
+ ///
+ /// 任务提醒主键
+ ///
+ public string P_ID { get; set; }
+
+ ///
+ /// 通知人ID
+ ///
+ public string NOTIFY_USER_ID { get; set; }
+
+ ///
+ /// 被通知人名称
+ ///
+ public string NOTIFY_USER_NAME { get; set; }
+
+ ///
+ /// 被通知方式
+ ///
+ public string NOTIFY_METHOD { get; set; }
+
+ ///
+ /// 被通知人手机
+ ///
+ public string NOTIFY_MOBILE { get; set; }
+
+ ///
+ /// 被通知人邮箱
+ ///
+ public string NOTIFY_EMAIL { get; set; }
+
+ ///
+ /// 状态
+ ///
+ public string STATUS { get; set; }
+
+ ///
+ /// 状态名称
+ ///
+ public string STATUS_NAME { get; set; }
+
+ ///
+ /// 重试次数
+ ///
+ public int RETRY_NUM { get; set; }
+ }
+}
diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskCautionNoticeInfo.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskCautionNoticeInfo.cs
new file mode 100644
index 00000000..3d9551aa
--- /dev/null
+++ b/Myshipping.Application/Entity/TaskManagePlat/TaskCautionNoticeInfo.cs
@@ -0,0 +1,94 @@
+using Myshipping.Application.Entity;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Myshipping.Application
+{
+ ///
+ /// 重要任务提醒
+ ///
+ [SugarTable("task_caution_notice")]
+ [Description("重要任务提醒")]
+ public class TaskCautionNoticeInfo : TaskManageDbEntity
+ {
+ ///
+ /// 任务主键
+ ///
+ public string TASK_ID { get; set; }
+
+ ///
+ /// 来源系统
+ ///
+ public string SOURCE_SYSTEM { get; set; }
+
+ ///
+ /// 来源业务类型
+ ///
+ public string SOURCE_BUSI_TYPE { get; set; }
+
+ ///
+ /// 来源业务类型名称
+ ///
+ public string SOURCE_BUSI_TYPENAME { get; set; }
+
+ ///
+ /// 通知内容
+ ///
+ public string NOTIFY_CONTENT { get; set; }
+
+ ///
+ /// 提单号
+ ///
+ public string MBL_NO { get; set; }
+
+ ///
+ /// 船公司
+ ///
+ public string CARRIER { get; set; }
+
+ ///
+ /// 是否计费周差异 1-是 0-否
+ ///
+ public bool IS_WEEK_DIFF { get; set; }
+
+ ///
+ /// 是否计费日差异 1-是 0-否
+ ///
+ public bool IS_PRICE_DATE_DIFF { get; set; }
+
+ ///
+ /// 是否转为中转 1-是 0-否
+ ///
+ public bool IS_TRANSFER { get; set; }
+
+ ///
+ /// 是否船名变化 1-是 0-否
+ ///
+ public bool IS_VESSEL_CHANGE { get; set; }
+
+ ///
+ /// 是否截止时间提前 1-是 0-否
+ ///
+ public bool IS_CUT_DATE_ADVANCED { get; set; }
+
+ ///
+ /// 订舱ID
+ ///
+ public Nullable BOOKING_ID { get; set; }
+
+ ///
+ /// 舱位ID
+ ///
+ public Nullable BOOKING_SLOT_ID { get; set; }
+
+ ///
+ /// 任务ID
+ ///
+ public string SOURCE_TASK_ID { get; set; }
+ }
+}
diff --git a/Myshipping.Application/Enum/CautionNoticeTaskEnum.cs b/Myshipping.Application/Enum/CautionNoticeTaskEnum.cs
index 9c93a18b..9dc48bdd 100644
--- a/Myshipping.Application/Enum/CautionNoticeTaskEnum.cs
+++ b/Myshipping.Application/Enum/CautionNoticeTaskEnum.cs
@@ -21,10 +21,25 @@ namespace Myshipping.Application
/// 计费日期差异
///
[Description("计费日期差异")]
- PriceCalcDate
+ PriceCalcDate,
+ ///
+ /// 直达转为中转
+ ///
+ [Description("直达转为中转")]
+ ChangeTransfer,
+ ///
+ /// 船名变化
+ ///
+ [Description("船名变化")]
+ ChangeVessel,
+ ///
+ /// 截止时间提前
+ ///
+ [Description("截止时间提前")]
+ CutDateAdvanced
}
- public enum CautionNoticeTypeEnum
+ public enum CautionNoticeMethodEnum
{
///
/// 钉钉消息
@@ -37,4 +52,23 @@ namespace Myshipping.Application
[Description("邮件提醒")]
Email
}
+
+ public enum TaskCautionNoticeStatusEnum
+ {
+ ///
+ /// 暂存
+ ///
+ [Description("暂存")]
+ TEMP,
+ ///
+ /// 消息发送成功
+ ///
+ [Description("消息发送成功")]
+ SUCC,
+ ///
+ /// 消息发送失败
+ ///
+ [Description("消息发送失败")]
+ FAILURE
+ }
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/TaskManageOrderCautionNoticeInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/TaskManageOrderCautionNoticeInfo.cs
index 047f76a3..bf17afa1 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/TaskManageOrderCautionNoticeInfo.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/TaskManageOrderCautionNoticeInfo.cs
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
+ ///
+ /// 重要提醒任务
+ ///
public class TaskManageOrderCautionNoticeInfo
{
///
@@ -43,6 +46,36 @@ namespace Myshipping.Application
///
public string NewVal { get; set; }
+ ///
+ /// 提单号
+ ///
+ public string MBlNo { get; set; }
+
+ ///
+ /// 船公司
+ ///
+ public string Carrier { get; set; }
+
+ ///
+ /// 来源系统
+ ///
+ public string SourceSystem { get; set; }
+
+ ///
+ /// 来源业务类型
+ ///
+ public string SourceBusiType { get; set; }
+
+ ///
+ /// 来源业务类型名称
+ ///
+ public string SourceBusiTypeName { get; set; }
+
+ ///
+ /// 通知内容
+ ///
+ public string NotifyContent { get; set; }
+
///
/// 消息列表
///
@@ -57,16 +90,26 @@ namespace Myshipping.Application
///
/// 重要提醒消息类型
///
- public CautionNoticeTypeEnum CautionNoticeType { get; set; }
+ public CautionNoticeMethodEnum CautionNoticeType { get; set; }
///
/// 用户ID
///
public string UserId { get; set; }
+ ///
+ /// 用户名称
+ ///
+ public string UserName { get; set; }
+
///
/// 用户手机号
///
public string Mobile { get; set; }
+
+ ///
+ /// 用户邮箱
+ ///
+ public string Email { get; set; }
}
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
index e144f1da..d94c858d 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageMapper.cs
@@ -1143,6 +1143,21 @@ namespace Myshipping.Application
.Map(dest => dest.HSCode, src => src.HSCODE)
.Map(dest => dest.Description, src => src.DESCRIPTION)
.Map(dest => dest.KindPKGS, src => src.KINDPKGS);
+
+ config.ForType()
+ .Map(dest => dest.MBL_NO, src => src.MBlNo)
+ .Map(dest => dest.CARRIER, src => src.Carrier)
+ .Map(dest => dest.BOOKING_ID, src => src.BookingId)
+ .Map(dest => dest.BOOKING_SLOT_ID, src => src.BookingSlotId)
+ .Map(dest => dest.SOURCE_TASK_ID, src => src.TaskPKId)
+ .Map(dest => dest.NOTIFY_CONTENT, src => src.NotifyContent);
+
+ config.ForType()
+ .Map(dest => dest.NOTIFY_USER_ID, src => src.UserId)
+ .Map(dest => dest.NOTIFY_USER_NAME, src => src.UserName)
+ .Map(dest => dest.NOTIFY_EMAIL, src => src.Email)
+ .Map(dest => dest.NOTIFY_MOBILE, src => src.Mobile);
+
}
}
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
index e6c5a9ba..58e60d67 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs
@@ -234,5 +234,10 @@ namespace Myshipping.Application
/// 格式单
///
public TaskManageOrderDraftInfo DraftInfo { get; set; }
-}
+
+ ///
+ /// 重要通知
+ ///
+ public TaskManageOrderCautionNoticeInfo CautionNoticeInfo { get; set; }
+ }
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
index 4af8f556..4d10c72e 100644
--- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
@@ -115,6 +115,8 @@ namespace Myshipping.Application
private readonly SqlSugarRepository _taskPODDischargeGateoutFullInfoRepository;
private readonly SqlSugarRepository _taskPODDischargeGateoutFullDetailInfoRepository;
+ private readonly SqlSugarRepository _taskCautionNoticeInfoRepository;
+ private readonly SqlSugarRepository _taskCautionNoticeDetailInfoRepository;
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
private readonly ISysCacheService _cache;
@@ -176,6 +178,8 @@ namespace Myshipping.Application
SqlSugarRepository taskDraftInfoRepository,
SqlSugarRepository taskPODDischargeGateoutFullInfoRepository,
SqlSugarRepository taskPODDischargeGateoutFullDetailInfoRepository,
+ SqlSugarRepository taskCautionNoticeInfoRepository,
+ SqlSugarRepository taskCautionNoticeDetailInfoRepository,
INamedServiceProvider namedBookingOrderServiceProvider,
IDjyWebsiteAccountConfigService webAccountConfig,
ISysCacheService cache,
@@ -239,6 +243,9 @@ namespace Myshipping.Application
_taskPODDischargeGateoutFullDetailInfoRepository = taskPODDischargeGateoutFullDetailInfoRepository;
_namedBookingMSKAPIServiceProvider = namedBookingMSKAPIServiceProvider;
+
+ _taskCautionNoticeInfoRepository = taskCautionNoticeInfoRepository;
+ _taskCautionNoticeDetailInfoRepository = taskCautionNoticeDetailInfoRepository;
}
#region 创建任务
@@ -1400,6 +1407,69 @@ namespace Myshipping.Application
}
#endregion
+ #region 重要提醒
+ if (info.Main.TaskType == TaskBaseTypeEnum.CAUTION_NOTICE)
+ {
+ TaskCautionNoticeInfo taskCautionNoticeInfo = info.Main.CautionNoticeInfo.Adapt();
+
+ taskCautionNoticeInfo.PK_ID = IDGen.NextID().ToString();
+ taskCautionNoticeInfo.TASK_ID = taskInfo.PK_ID;
+
+ taskCautionNoticeInfo.CreatedTime = taskInfo.CreatedTime;
+ taskCautionNoticeInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ taskCautionNoticeInfo.CreatedUserId = taskInfo.CreatedUserId;
+ taskCautionNoticeInfo.CreatedUserName = taskInfo.CreatedUserName;
+ taskCautionNoticeInfo.TenantId = taskInfo.TenantId;
+ taskCautionNoticeInfo.TenantName = taskInfo.TenantName;
+
+ if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.WeekAt)
+ {
+ taskCautionNoticeInfo.IS_WEEK_DIFF = true;
+ }
+ else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.PriceCalcDate)
+ {
+ taskCautionNoticeInfo.IS_PRICE_DATE_DIFF = true;
+ }
+ else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.ChangeVessel)
+ {
+ taskCautionNoticeInfo.IS_VESSEL_CHANGE = true;
+ }
+ else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.ChangeTransfer)
+ {
+ taskCautionNoticeInfo.IS_TRANSFER = true;
+ }
+ else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.CutDateAdvanced)
+ {
+ taskCautionNoticeInfo.IS_CUT_DATE_ADVANCED = true;
+ }
+
+ await _taskCautionNoticeInfoRepository.InsertAsync(taskCautionNoticeInfo);
+
+ //异步写入集装箱
+ info.Main.CautionNoticeInfo.NoticeList.ForEach(async notice =>
+ {
+ var noticeInfo = notice.Adapt();
+
+ noticeInfo.PK_ID = IDGen.NextID().ToString();
+ noticeInfo.P_ID = taskCautionNoticeInfo.PK_ID;
+
+ noticeInfo.CreatedTime = taskInfo.CreatedTime;
+ noticeInfo.UpdatedTime = taskInfo.CreatedTime;
+
+ noticeInfo.CreatedUserId = taskInfo.CreatedUserId;
+ noticeInfo.CreatedUserName = taskInfo.CreatedUserName;
+ noticeInfo.TenantId = taskInfo.TenantId;
+ noticeInfo.TenantName = taskInfo.TenantName;
+
+ noticeInfo.STATUS = TaskCautionNoticeStatusEnum.TEMP.ToString();
+ noticeInfo.STATUS_NAME = TaskCautionNoticeStatusEnum.TEMP.GetDescription();
+
+ await _taskCautionNoticeDetailInfoRepository.InsertAsync(noticeInfo);
+ });
+ }
+ #endregion
+
if (info.Main.SerialMsgInfo != null)
{
var storeInfo = new TaskStoreMsgInfo