|
|
@ -101,6 +101,11 @@ namespace Myshipping.Application
|
|
|
|
private readonly SqlSugarRepository<TaskTruckInfo> _taskTruckInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskTruckInfo> _taskTruckInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskTruckCtn> _taskTruckCtnRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskTruckCtn> _taskTruckCtnRepository;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskCutDateChangeInfo> _taskCutDateChangeInfoRepository;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationInfo> _taskRollingNominationInfoRepository;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationShipInfo> _taskRollingNominationShipInfoRepository;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<TaskRollingNominationDetailInfo> _taskRollingNominationDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
|
private readonly ILogger<BookingOrderService> _logger;
|
|
|
|
private readonly ILogger<BookingOrderService> _logger;
|
|
|
@ -144,6 +149,10 @@ namespace Myshipping.Application
|
|
|
|
SqlSugarRepository<TaskTruckCtn> taskTruckCtnRepository,
|
|
|
|
SqlSugarRepository<TaskTruckCtn> taskTruckCtnRepository,
|
|
|
|
SqlSugarRepository<TaskBCInfo> taskBCInfoRepository,
|
|
|
|
SqlSugarRepository<TaskBCInfo> taskBCInfoRepository,
|
|
|
|
SqlSugarRepository<TaskBCCTNInfo> taskBCCTNInfoRepository,
|
|
|
|
SqlSugarRepository<TaskBCCTNInfo> taskBCCTNInfoRepository,
|
|
|
|
|
|
|
|
SqlSugarRepository<TaskCutDateChangeInfo> taskCutDateChangeInfoRepository,
|
|
|
|
|
|
|
|
SqlSugarRepository<TaskRollingNominationInfo> taskRollingNominationInfoRepository,
|
|
|
|
|
|
|
|
SqlSugarRepository<TaskRollingNominationShipInfo> taskRollingNominationShipInfoRepository,
|
|
|
|
|
|
|
|
SqlSugarRepository<TaskRollingNominationDetailInfo> taskRollingNominationDetailInfoRepository,
|
|
|
|
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
|
|
|
|
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
|
|
|
|
IDjyWebsiteAccountConfigService webAccountConfig,
|
|
|
|
IDjyWebsiteAccountConfigService webAccountConfig,
|
|
|
|
ISysCacheService cache,
|
|
|
|
ISysCacheService cache,
|
|
|
@ -175,6 +184,10 @@ namespace Myshipping.Application
|
|
|
|
_taskTruckCtnRepository = taskTruckCtnRepository;
|
|
|
|
_taskTruckCtnRepository = taskTruckCtnRepository;
|
|
|
|
_taskBCInfoRepository = taskBCInfoRepository;
|
|
|
|
_taskBCInfoRepository = taskBCInfoRepository;
|
|
|
|
_taskBCCTNInfoRepository = taskBCCTNInfoRepository;
|
|
|
|
_taskBCCTNInfoRepository = taskBCCTNInfoRepository;
|
|
|
|
|
|
|
|
_taskCutDateChangeInfoRepository = taskCutDateChangeInfoRepository;
|
|
|
|
|
|
|
|
_taskRollingNominationInfoRepository = taskRollingNominationInfoRepository;
|
|
|
|
|
|
|
|
_taskRollingNominationShipInfoRepository = taskRollingNominationShipInfoRepository;
|
|
|
|
|
|
|
|
_taskRollingNominationDetailInfoRepository = taskRollingNominationDetailInfoRepository;
|
|
|
|
|
|
|
|
|
|
|
|
_namedBookingOrderServiceProvider = namedBookingOrderServiceProvider;
|
|
|
|
_namedBookingOrderServiceProvider = namedBookingOrderServiceProvider;
|
|
|
|
|
|
|
|
|
|
|
@ -743,6 +756,107 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 截止时间变更通知
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Rolling Nomination(预甩货通知)
|
|
|
|
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.ROLLING_NOMINATION || info.Main.TaskType == TaskBaseTypeEnum.TRANSFER_NOMINATION)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var rollingNomination = info.Main.RollingNomination.Adapt<TaskRollingNominationInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNomination.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
rollingNomination.TASK_ID = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNomination.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
rollingNomination.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNomination.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
|
|
|
rollingNomination.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
rollingNomination.TenantId = taskInfo.TenantId;
|
|
|
|
|
|
|
|
rollingNomination.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//这里把多条的预甩计划列表合并保存,展示时只需要用\n拆分返回给前端
|
|
|
|
|
|
|
|
if (info.Main.RollingNomination.RollingPlanList != null && info.Main.RollingNomination.RollingPlanList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rollingNomination.PLAN_TXT = string.Join("\\n", info.Main.RollingNomination.RollingPlanList.ToArray());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _taskRollingNominationInfoRepository.InsertAsync(rollingNomination);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.Main.RollingNomination.From != null && info.Main.RollingNomination.From.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
info.Main.RollingNomination.From.ForEach(k =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var rollingNominationShip = k.Adapt<TaskRollingNominationShipInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationShip.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
rollingNominationShip.TASK_ID = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
rollingNominationShip.NOM_ID = rollingNomination.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationShip.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
rollingNominationShip.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationShip.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
|
|
|
rollingNominationShip.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
rollingNominationShip.TenantId = taskInfo.TenantId;
|
|
|
|
|
|
|
|
rollingNominationShip.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_taskRollingNominationShipInfoRepository.Insert(rollingNominationShip);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.Main.RollingNomination.ToDetail != null && info.Main.RollingNomination.ToDetail.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
info.Main.RollingNomination.ToDetail.ForEach(t =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var rollingNominationShip = t.Adapt<TaskRollingNominationShipInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationShip.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
rollingNominationShip.TASK_ID = taskInfo.PK_ID;
|
|
|
|
|
|
|
|
rollingNominationShip.NOM_ID = rollingNomination.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationShip.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
rollingNominationShip.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationShip.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
|
|
|
rollingNominationShip.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
rollingNominationShip.TenantId = taskInfo.TenantId;
|
|
|
|
|
|
|
|
rollingNominationShip.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_taskRollingNominationShipInfoRepository.Insert(rollingNominationShip);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (t.NominationList != null && t.NominationList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
t.NominationList.ForEach(x =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var rollingNominationDetail = x.Adapt<TaskRollingNominationDetailInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationDetail.PK_ID = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
rollingNominationDetail.NOM_SHIP_ID = rollingNominationShip.PK_ID;
|
|
|
|
|
|
|
|
rollingNominationDetail.NOM_ID = rollingNomination.PK_ID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationDetail.CreatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
rollingNominationDetail.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rollingNominationDetail.CreatedUserId = taskInfo.CreatedUserId;
|
|
|
|
|
|
|
|
rollingNominationDetail.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
rollingNominationDetail.TenantId = taskInfo.TenantId;
|
|
|
|
|
|
|
|
rollingNominationDetail.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_taskRollingNominationDetailInfoRepository.Insert(rollingNominationDetail);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
if (info.Main.SerialMsgInfo != null)
|
|
|
|
if (info.Main.SerialMsgInfo != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var storeInfo = new TaskStoreMsgInfo
|
|
|
|
var storeInfo = new TaskStoreMsgInfo
|
|
|
|